Prior commit to only mount devtmpfs and devpts if they were not already mounted made assumptions about the device names they were mounted as. Check the filesystem column of /proc/mounts instead.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
cleanup-cruft
Robin H. Johnson 13 years ago
parent 1883585cd9
commit c924bde4b7

@ -5,6 +5,11 @@
# Distributed under the GPL v2 # Distributed under the GPL v2
# $Id$ # $Id$
24 Jul 2012; Robin H. Johnson <robbat2@gentoo.org> defaults/initrd.scripts:
Prior commit to only mount devtmpfs and devpts if they were not already
mounted made assumptions about the device names they were mounted as. Check
the filesystem column of /proc/mounts instead.
21 Jul 2012; Sebastian Pipping <sping@gentoo.org> genkernel: 21 Jul 2012; Sebastian Pipping <sping@gentoo.org> genkernel:
Bump version to 3.4.39 Bump version to 3.4.39

@ -307,13 +307,13 @@ mount_devfs () {
fi fi
# Options copied from /etc/init.d/udev-mount, should probably be kept in sync # Options copied from /etc/init.d/udev-mount, should probably be kept in sync
if grep -qs '^devtmpfs' /proc/mounts; then if awk 'BEGIN{m=1;} /devtmpfs/{if($3 == "devtmpfs") {m=0;} } END { exit m;}' /proc/mounts; then
mount -t $devfs -o "exec,nosuid,mode=0755,size=10M" udev /dev \ mount -t $devfs -o "exec,nosuid,mode=0755,size=10M" udev /dev \
|| bad_msg "Failed to mount /dev as ${devfs}" || bad_msg "Failed to mount /dev as ${devfs}"
fi fi
# http://git.busybox.net/busybox/plain/docs/mdev.txt # http://git.busybox.net/busybox/plain/docs/mdev.txt
if grep -qs '^devpts' /proc/mounts; then if awk 'BEGIN{m=1;} /devtmpfs/{if($3 == "devpts") {m=0;} } END { exit m;}' /proc/mounts; then
mkdir -m 0755 /dev/pts mkdir -m 0755 /dev/pts
mount -t devpts -o gid=5,mode=0620 devpts /dev/pts || bad_msg "Failed to mount /dev/pts" mount -t devpts -o gid=5,mode=0620 devpts /dev/pts || bad_msg "Failed to mount /dev/pts"
fi fi

Loading…
Cancel
Save