From: Colin Watson Date: Sat, 23 Nov 2002 01:19:06 +0000 (+0000) Subject: Start and stop cfsd when mounting and unmounting the USB keyfob, and remove X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?p=bin.git;a=commitdiff_plain;h=975c4864300bf758da4531b5ab3e08577f0ddebd;ds=sidebyside Start and stop cfsd when mounting and unmounting the USB keyfob, and remove the various kernel modules involved on unmount. --- diff --git a/mount-keys b/mount-keys index 4e2d1d7..5d3ae88 100755 --- a/mount-keys +++ b/mount-keys @@ -1,4 +1,5 @@ #! /bin/sh +sudo /etc/init.d/cfsd start || sudo /etc/init.d/cfsd restart # kludge grep -q '/mnt/usb ' /proc/mounts || sudo mount /mnt/usb sudo losetup /dev/loop0 /mnt/usb/cjwatson grep -q '/mnt/usb/keys ' /proc/mounts || sudo mount -t ext2 /dev/loop0 /mnt/usb/keys diff --git a/umount-keys b/umount-keys index fa45b02..15e2e5a 100755 --- a/umount-keys +++ b/umount-keys @@ -3,3 +3,5 @@ cdetach cjwatson-keys sudo umount /mnt/usb/keys sudo losetup -d /dev/loop0 sudo umount /mnt/usb +sudo /etc/init.d/cfsd stop +sudo modprobe -r nfs nfsd sd_mod usb-storage