Code Sample |
#/dev/hda1 /some/mountpoint ... /dev/hda1 /some/other/mountpoint ... |
Code Sample |
--- ../original/dsl-1.5/source/etc/init.d/dsl-functions 2005-07-15 21:25:48.000000000 +0100 +++ source/etc/init.d/dsl-functions 2005-10-04 18:26:56.000000000 +0100 @@ -82,13 +82,13 @@ MOUNTED="no" DEVICE="$1" D2="/dev/$DEVICE\>" - MOUNTPOINT="$(grep -i $D2 /etc/mtab|awk '{print $2}')" + MOUNTPOINT="$(grep -i ^$D2 /etc/mtab|awk '{print $2}')" if [ -n "$MOUNTPOINT" ]; then MOUNTED="yes" return fi - MOUNTPOINT="$(grep -i $D2 /etc/fstab|awk '{print $2}')" + MOUNTPOINT="$(grep -i ^$D2 /etc/fstab|awk '{print $2}')" } get_mountpoint() { @@ -109,13 +109,13 @@ get_mountpoint $DEVICE if [ -n "$MOUNTPOINT" ]; then if [ "$MOUNTED" == "no" ]; then - mount "$MOUNTPOINT" + mount "$MOUNTPOINT">/dev/null 2>&1 fi if [ -f "$MOUNTPOINT"/$1 ]; then FOUND="yes" fi if [ "$MOUNTED" == "no" ]; then - umount "$MOUNTPOINT" + umount "$MOUNTPOINT">/dev/null 2>&1 fi if [ -n "$FOUND" ]; then echo "$DEVICE" |