packages: udev/start_udev - if there are no submounts, try get over with it...
glen
glen at pld-linux.org
Fri Mar 30 08:10:50 CEST 2012
Author: glen Date: Fri Mar 30 06:10:50 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- if there are no submounts, try get over with it without tmpdir
---- Files affected:
packages/udev:
start_udev (1.50 -> 1.51)
---- Diffs:
================================================================
Index: packages/udev/start_udev
diff -u packages/udev/start_udev:1.50 packages/udev/start_udev:1.51
--- packages/udev/start_udev:1.50 Fri Mar 30 00:38:51 2012
+++ packages/udev/start_udev Fri Mar 30 08:10:44 2012
@@ -84,18 +84,29 @@
# 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
================================================================
---- CVS-web:
http://cvs.pld-linux.org/packages/udev/start_udev?r1=1.50&r2=1.51
More information about the pld-cvs-commit
mailing list