]> git.pld-linux.org Git - packages/VirtualBox.git/commitdiff
- handle mount -n
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 28 Mar 2008 19:40:01 +0000 (19:40 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mount.vdi -> 1.2

mount.vdi

index 5aafb7f817cd764a2a9ba5a55af9177f0dae3fd4..992004882c3d95fc7cfa4aafa4f895fe5b54d8df 100644 (file)
--- a/mount.vdi
+++ b/mount.vdi
@@ -29,6 +29,7 @@ LOSETUP=/sbin/losetup
 MOUNT=/bin/mount
 
 PROGRAM=${0##*/}
+MOUNTARGS=
 OPTIONS=
 FSTYPE=
 
@@ -55,9 +56,12 @@ while :; do
        -h | "-?" )
                echo >&2 "Usage: $PROGRAM $USAGE"
                exit 0 ;;
-       -o )
+       -o)
                OPTIONS="$2";
                shift ;;
+       -n)
+               MOUNTARGS="$MOUNTARGS $1"
+               ;;
        -?* )
                echo >&2 "$PROGRAM: unrecognized option: $1"
                exit 1 ;;
@@ -167,7 +171,7 @@ else
 fi
 
 # $MOUNTPOINT might not exist as mount can try to read it from /etc/fstab
-"$MOUNT" ${FSTYPE:+-t "$FSTYPE"} ${MOUNTOPTIONS:+-o "$MOUNTOPTIONS"} "$DEVICE" "$MOUNTPOINT"
+"$MOUNT" $MOUNTARGS ${FSTYPE:+-t "$FSTYPE"} ${MOUNTOPTIONS:+-o "$MOUNTOPTIONS"} "$DEVICE" "$MOUNTPOINT"
 if [ $? -ne 0 ]; then
     echo >&2 "$PROGRAM: error mounting $DEVICE"
 fi
This page took 0.03442 seconds and 4 git commands to generate.