aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2014-04-13 16:52:37 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2014-04-13 16:52:37 -0700
commita02ef6d249ea90eeda05c8857d093a33cef8f5b8 (patch)
tree3c25b64f127e4eedc9c922888c030f84a61ec666
parentForce ownership of files in building initramfs. (diff)
downloadgenkernel-a02ef6d249ea90eeda05c8857d093a33cef8f5b8.tar.gz
genkernel-a02ef6d249ea90eeda05c8857d093a33cef8f5b8.tar.bz2
genkernel-a02ef6d249ea90eeda05c8857d093a33cef8f5b8.zip
More device nodes.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r--defaults/linuxrc13
1 files changed, 7 insertions, 6 deletions
diff --git a/defaults/linuxrc b/defaults/linuxrc
index ed808e4..6401614 100644
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -434,8 +434,10 @@ then
chmod 755 "${NEW_ROOT}/${i}"
done
[ ! -d "${CDROOT_PATH}" ] && mkdir -p "${CDROOT_PATH}"
- [ ! -e "${NEW_ROOT}/dev/null" ] && mknod "${NEW_ROOT}"/dev/null c 1 3
- [ ! -e "${NEW_ROOT}/dev/console" ] && mknod "${NEW_ROOT}"/dev/console c 5 1
+ [ ! -e "${NEW_ROOT}/dev/null" ] && mknod -m 660 "${NEW_ROOT}"/dev/null c 1 3
+ [ ! -e "${NEW_ROOT}/dev/zero" ] && mknod -m 660 "${NEW_ROOT}"/dev/zero c 1 5
+ [ ! -e "${NEW_ROOT}/dev/console" ] && mknod -m 660 "${NEW_ROOT}"/dev/console c 5 1
+ [ ! -e "${NEW_ROOT}/dev/ttyS0" ] && mknod -m 600 "${NEW_ROOT}"/dev/ttyS0 c 4 64
# For SGI LiveCDs ...
if [ "${LOOPTYPE}" = "sgimips" ]
@@ -446,10 +448,9 @@ then
# Required for splash to work. Not an issue with the initrd as this
# device isn't created there and is not needed.
- if [ -e /dev/tty1 ]
- then
- [ ! -e "${NEW_ROOT}/dev/tty1" ] && mknod "${NEW_ROOT}/dev/tty1" c 4 1
- fi
+ for minor in 0 1 ; do
+ [ ! -e "${NEW_ROOT}/dev/$minor" ] && mknod -m 600 "${NEW_ROOT}/dev/tty$minor" c 4 $minor
+ done
if [ "${REAL_ROOT}" != "/dev/nfs" ] && [ "${LOOPTYPE}" != "sgimips" ]
then