All pastes #781311 Raw Edit

Toggle samba

public text v1 · immutable
·published 2007-11-18 20:41 UTC
rendered paste body
#!/bin/sh
#script samba toogles the mount to umount and vice versa

if mount | grep /tmp/harddisk/external ; then   #is already mounted
   smbumount /tmp/harddisk/external
   echo -n "/tmp/harddisk/external unmounted "
   date
  else # is not mounted  
   smbmount //192.168.150.210/alle /tmp/harddisk/external -o rw,guest
   sleep 1
   echo -n "SMB-share 192.168.150.210 mounted to /tmp/harddisk/external "
   date
fi