mount-test verfeinert

This commit is contained in:
lars 2005-06-13 18:11:31 +00:00
parent 66144b9790
commit e0d7a18bfe

View file

@ -4,7 +4,7 @@
# encrypted block devices # encrypted block devices
# #
# this script was slightly modified by age-at-systemausfall-dot-org, # this script was slightly modified by age-at-systemausfall-dot-org,
# it now also executes mount commands. search for "MOD". # it now also executes mount commands. search for "MODED".
# it probably won't work with losetup (just devmapper)! # it probably won't work with losetup (just devmapper)!
CRYPTCMD=/sbin/cryptsetup CRYPTCMD=/sbin/cryptsetup
@ -170,13 +170,13 @@ start)
fi fi
done done
echo "." echo "."
### MOD: mount stuff von age ### MODED: mount stuff by age
partitions=`dmsetup ls | cut -f1` partitions=`dmsetup ls | cut -f1`
for i in $partitions; do for i in $partitions; do
if [ `mount | grep -c /dev/mapper/$i` -lt 1 ]; then if [ `mount | grep -c "^/dev/mapper/$i$"` -lt 1 ]; then
echo -en "\t$i (mounting)" echo -en "\t$i (mounting)"
mount /dev/mapper/$i > /dev/null 2>&1 mount /dev/mapper/$i > /dev/null 2>&1
if [ $(mount | grep -c /dev/mapper/$i) -lt 1 ]; then if [ $(mount | grep -c "^/dev/mapper/$i$") -lt 1 ]; then
echo -en " (\"mount /dev/mapper/$i\" failed)" echo -en " (\"mount /dev/mapper/$i\" failed)"
fi fi
echo "" echo ""