#!/usr/bin/perl -w use strict; use Muck::FS; use ConfigReader::Simple; =head1 NAME muckFS - mount muckFS filesystem =head1 SYNOPSIS muckFS muckFS.conf /mnt =head1 DESCRIPTION TBD =cut my ($config_file,$mount) = @ARGV; unless ($config_file && $mount) { print STDERR <<_USAGE_; usage: $0 muckFS.conf /mnt For more information see perldoc muckFS _USAGE_ exit 1; } system "fusermount -u $mount" unless (-w $mount); unless (-w $mount) { print STDERR "Current user doesn't have permission on mount point $mount: $!"; exit 1; } unless (-e $config_file ) { print STDERR "Unable to read config file: $!"; exit 1; } my $cfg = ConfigReader::Simple->new($config_file); my $mnt = Muck::FS->mount({ aws_access_key_id => $cfg->get('aws_access_key_id'), aws_secret_access_key => $cfg->get('aws_secret_access_key'), s3_bucket => $cfg->get('s3_bucket'), cachedir => $cfg->get('cachedir'), dsn => $cfg->get('dsn'), user => $cfg->get('dbuser'), password => $cfg->get('dbpass'), memcached => $cfg->get('memcache_servers'), mount => $mount, fork => 0, debug => $cfg->get('debug'), }); if (! $mnt) { print STDERR "can't mount filesystem!"; exit 1; } #print "Press enter to exit..."; #my $foo = ; #$mnt->umount; =head1 SEE ALSO C website L C website L =head1 AUTHOR Mike Schroeder, Emike-cpan@donorware.comE =head1 COPYRIGHT AND LICENSE Copyright (C) 2007 by DonorWare LLC This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available. =cut