From: gobo72 Date: Sun, 15 May 2011 02:53:16 +0000 (+0000) Subject: Démontage automatique des disques USB en suspend X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=fb8039587f9ad0db2bf4e3cf420b10f7071245bf;p=hvlinux.git Démontage automatique des disques USB en suspend --- diff --git a/stage2/misc/hvs2ram b/stage2/misc/hvs2ram index 8b68703..376b1db 100755 --- a/stage2/misc/hvs2ram +++ b/stage2/misc/hvs2ram @@ -10,6 +10,11 @@ trap 'rm -f $TMP_FILE' 0 1 15 # write all unwritten data (just in case) sync +# Unmount all removable media +for p in $(ls /dev/disk/by-id/usb* | grep "\-part"); do + umount ${p} +done + # dump current data from the video card to the # temporary file cat /proc/bus/pci/$ID > $TMP_FILE