check : if the disk is in RO and can not be pushed in RW, umount, FSCK and remount
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3980 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
10
check
10
check
@@ -256,6 +256,16 @@ function testMount()
|
|||||||
checklog "Disque $PNT en RO : Passage en RW"
|
checklog "Disque $PNT en RO : Passage en RW"
|
||||||
mount -o remount,rw $PNT
|
mount -o remount,rw $PNT
|
||||||
fi
|
fi
|
||||||
|
# The drive is again in RO : umount, fsck, and remount
|
||||||
|
ST=`egrep -v "^{none|rootfs|binfmt_misc|gvfs-fuse-daemon} " /proc/mounts | cut -d " " -f 2,4| egrep "^$PNT " | cut -d " " -f 2 | cut -d "," -f 1`
|
||||||
|
TYPE=`egrep -v "^{none|rootfs|binfmt_misc|gvfs-fuse-daemon} " /proc/mounts | cut -d " " -f 2,3,4 | egrep "^$PNT " | cut -d " " -f 2`
|
||||||
|
DISK=`egrep -v "^{none|rootfs|binfmt_misc|gvfs-fuse-daemon} " /proc/mounts | cut -d " " -f 1,2 | egrep " $PNT\$" | cut -d " " -f 1`
|
||||||
|
if [ "$ST" == "ro" ]; then
|
||||||
|
checklog "Disque $PNT toujours en RO : Démonte, FSCK et remonte"
|
||||||
|
umount $DISK
|
||||||
|
fsck.$TYPE $DISK
|
||||||
|
mount $DISK
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function testRepertoireVide()
|
function testRepertoireVide()
|
||||||
|
|||||||
Reference in New Issue
Block a user