]> git.pld-linux.org Git - packages/systemd.git/commitdiff
- if there are no submounts, try get over with it without tmpdir auto/th/udev-182-3 auto/th/udev-182-4 auto/th/udev-182-5 auto/ti/udev-182-5
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 30 Mar 2012 06:10:44 +0000 (06:10 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    start_udev -> 1.51

start_udev

index b93ff085f334568bbf676667e858bdb07c8ccb26..a2d20c0e1c89c0513472a1825f415d5e676063fc 100644 (file)
@@ -84,18 +84,29 @@ busy
 
 # mount the devtmpfs on $udev_root, if not already done
 awk "\$2 == \"$udev_root\" && \$3 == \"devtmpfs\" { exit 1 }" /proc/mounts && {
-       # mount to temporary location to be able to move submounts, if any
-       devdir=$(mktemp -d ${TMPDIR:-/tmp}/tmpXXXXXX)
+       submounts=$(get_dev_mounts)
+
+       if [ "$submounts" ]; then
+               # mount to temporary location to be able to move submounts
+               # this needs writable TMPDIR:-/tmp, so it won't work in early boot
+               # but fix is simple: use initramfs instead of romfs
+               devdir=$(mktemp -d ${TMPDIR:-/tmp}/tmpXXXXXX)
+       else
+               devdir=$udev_root
+       fi
        mount -n -o mode=0755 -t devtmpfs devtmpfs "$devdir"
        ret=$(( $ret + $? ))
 
        # relocate submounts
-       for dir in $(get_dev_mounts); do
+       for dir in $submounts; do
                mount -n --move $udev_root/$dir $devdir/$dir
                ret=$(( $ret + $? ))
        done
 
-       mount -n --move $devdir $udev_root
+       if [ "$submounts" ]; then
+               mount -n --move $devdir $udev_root
+               rmdir $devdir
+       fi
 }
 
 kill_udevd > "$udev_root/null" 2>&1
This page took 0.309373 seconds and 4 git commands to generate.