fiddle with DB->new parameters
[id3fs.git] / sbin / id3fsd
index 3e95597..96a4f57 100755 (executable)
@@ -12,12 +12,14 @@ $me=($0=~/(?:.*\/)?(.*)/)[0];
 
 my $verbose=0;
 my $help=0;
+my $dbpath=undef;
 
 Configure(qw(bundling no_ignore_case));
 my $optret=GetOptions(
     "verbose|v"  => \$verbose,
     "quiet|q"    => sub { $verbose=0; },
     "help|h"     => \$help,
+    "database|db=s"  => \$dbpath,
     );
 
 usage() if(scalar(@ARGV) != 2 || !$optret || $help);
@@ -25,7 +27,7 @@ usage() if(scalar(@ARGV) != 2 || !$optret || $help);
 my $source=shift;
 my $mountpoint=shift;
 
-my $db=ID3FS::DB->new($source, 0, $me);
+my $db=ID3FS::DB->new($me, $dbpath, $source);
 my $fuse=ID3FS::Fuse->new($db, $source, $mountpoint, $verbose);
 $fuse->run();