diff options
-rwxr-xr-x | hal-automounter.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hal-automounter.pl b/hal-automounter.pl index 2ea4133..22e8f6f 100755 --- a/hal-automounter.pl +++ b/hal-automounter.pl @@ -2,12 +2,15 @@ use strict; use warnings; use lib '/home/dakkar/perl5/lib/perl5','/home/dakkar/perl5/lib/perl5/x86_64-linux-thread-multi'; - +use IO::Socket::INET; # for locking use Net::DBus; use Net::DBus::Reactor; use File::Temp; use Cwd 'realpath'; +my $lock=IO::Socket::INET->new(LocalAddr=>'127.0.0.1',LocalPort=>9999,Type=>SOCK_STREAM,Listen=>1) + or die 'already running'; + sub add_to_fstab { my ($dev_path,$mount_point,$fs_type,$opts)=@_; |