Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
if i ran the script on a terminal (eg. open terminal ang type perl myscript.pl) it was able to mount properly. but the problem here is that if i called the script via a shortcut (launcher) it simply doesnt mount. not sure what is happening. so i tried this..my $cmd = "sudo mount -o username='admin',password='',rw,uid='customer +',gid='customer' '//192.168.1.103/shared' '/home/customer/mnt'"; my $res = `$cmd`;
it now works, but the problem is that i dont know how to wait for the mounting. my script simply opens a gnome-terminal then continues with the script and exits. it didnt even wait for the mounting to complete. i need to catch if it mounted or not. so how can i do this?my $cmd = "sudo mount -o username='admin',password='',rw,uid='customer +',gid='customer' '//192.168.1.103/shared' '/home/customer/mnt'"; my $res = `gnome-terminal -e "$cmd"`;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: mount cifs using perl and sudo and mount
by JavaFan (Canon) on Aug 28, 2010 at 11:06 UTC | |
|
Re: mount cifs using perl and sudo and mount
by dasgar (Priest) on Aug 28, 2010 at 05:19 UTC | |
|
Re: mount cifs using perl and sudo and mount
by oko1 (Deacon) on Aug 28, 2010 at 14:46 UTC | |
by Anonymous Monk on Aug 30, 2010 at 00:22 UTC |