Including util-linux mount in initramfs.
authorMichal Suchanek <hramrach@gmail.com>
Fri, 5 Oct 2012 13:32:05 +0000 (15:32 +0200)
committerDaniel Baumann <daniel@debian.org>
Wed, 12 Dec 2012 15:43:54 +0000 (16:43 +0100)
backends/initramfs-tools/live.hook
scripts/boot/9990-cmdline-old
scripts/boot/9990-main.sh
scripts/boot/9990-overlay.sh

index 3860f4c..c5b81b0 100755 (executable)
@@ -143,6 +143,10 @@ then
        copy_exec /usr/bin/eject /bin
 fi
 
+# Program: mount
+# fuse does not work with klibc mount
+copy_exec /bin/mount /bin/mount.util-linux
+
 [ "${QUIET}" ] || echo -n " utils"
 
 # Feature: Verify Checksums
@@ -236,14 +240,4 @@ case "${LIVE_DNS}" in
                ;;
 esac
 
-case "${LIVE_UNIONMOUNT}" in
-       true)
-               [ "${QUIET}" ] || echo -n " unionmount"
-
-               # UnionMount
-               # only mount from patched util-linux can do this currently
-               copy_exec /bin/mount /bin/mount_full
-               ;;
-esac
-
 [ "${QUIET}" ] || echo .
index 85f1b62..94c5163 100755 (executable)
@@ -30,6 +30,11 @@ Cmdline_old ()
                                export DHCP
                                ;;
 
+                       klibc-mount=*)
+                               KLIBC_MOUNT="${_PARAMETER#klibc-mount=}"
+                               export KLIBC_MOUNT
+                               ;;
+
                        ethdevice=*)
                                DEVICE="${_PARAMETER#ethdevice=}"
                                ETHDEVICE="${DEVICE}"
index 983a1cb..0924581 100755 (executable)
@@ -32,6 +32,12 @@ Main ()
                . /conf/param.conf
        fi
 
+       if [ -x /bin/mount.util-linux ] && [ -z "${KLIBC_MOUNT}" ]
+       then
+               # fuse does not work with klibc mount
+               ln -f /bin/mount.util-linux /bin/mount
+       fi
+
        # Needed here too because some things (*cough* udev *cough*)
        # changes the timeout
 
index 80b5726..dba042b 100755 (executable)
@@ -335,7 +335,8 @@ setup_unionfs ()
                then
                        # FIXME: handle PERSISTENCE_READONLY
                        unionmountopts="-t ${cow_fstype} -o noatime,union,${cow_mountopt} ${cowdevice}"
-                       mount_full $unionmountopts "${unionmountpoint}"
+                       # unionmount only works with util-linux mount
+                       mount.util-linux $unionmountopts "${unionmountpoint}"
                else
                        cow_dir="/live/overlay${dir}"
                        rootfs_dir="${rootfs}${dir}"