Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

disconnecting cgd volumes at sleep-time



I've added the following code to my pre-sleep script:

                /sbin/mount | dd bs=16k | while read dev x dir y
                do
                        case "$dev" in
                                /dev/cgd*) /sbin/umount -f $dev;;
                                *) ;;
                        esac
                done
                for i in $(/sbin/sysctl -n hw.disknames)
                do
                        case "$i" in
                                cgd*) /sbin/cgdconfig -u $i;;
                        esac
                done

Is the 'dd' necessary?  I included it because of the umount call in the
loop; I don't want the mount table to change in the middle.

                --Steve Bellovin, http://www.cs.columbia.edu/~smb


Home | Main Index | Thread Index | Old Index