diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2014-04-13 16:52:37 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2014-04-13 17:59:31 -0700 |
commit | a8ade8646371e78b95b067af49fdf3934f0efe31 (patch) | |
tree | 766acb7aa16731456eba3f3a24821c580da2ed76 | |
parent | Force ownership of files in building initramfs. (diff) | |
download | genkernel-a8ade8646371e78b95b067af49fdf3934f0efe31.tar.gz genkernel-a8ade8646371e78b95b067af49fdf3934f0efe31.tar.bz2 genkernel-a8ade8646371e78b95b067af49fdf3934f0efe31.zip |
More device nodes.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r-- | defaults/linuxrc | 13 |
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 |