diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2014-04-13 17:47:38 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2014-04-13 17:59:31 -0700 |
commit | c93c617ee0f4ed3b7559208339eecfac4a49c8ec (patch) | |
tree | 2f2773b8866208a100029d97ad80c4236a502848 | |
parent | More device nodes. (diff) | |
download | genkernel-c93c617ee0f4ed3b7559208339eecfac4a49c8ec.tar.gz genkernel-c93c617ee0f4ed3b7559208339eecfac4a49c8ec.tar.bz2 genkernel-c93c617ee0f4ed3b7559208339eecfac4a49c8ec.zip |
Detect mknod failure.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-x | gen_initramfs.sh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 070dffc8..d5ee5f6a 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -89,12 +89,13 @@ append_base_layout() { echo "proc /proc proc defaults 0 0" >> ${TEMP}/initramfs-base-temp/etc/fstab cd ${TEMP}/initramfs-base-temp/dev - mknod -m 660 console c 5 1 - mknod -m 660 null c 1 3 - mknod -m 660 zero c 1 5 - mknod -m 600 tty0 c 4 0 - mknod -m 600 tty1 c 4 1 - mknod -m 600 ttyS0 c 4 64 + # TODO: this will fail as non-root + mknod -m 660 console c 5 1 || gen_die "failed to mknod" + mknod -m 660 null c 1 3 || gen_die "failed to mknod" + mknod -m 660 zero c 1 5 || gen_die "failed to mknod" + mknod -m 600 tty0 c 4 0 || gen_die "failed to mknod" + mknod -m 600 tty1 c 4 1 || gen_die "failed to mknod" + mknod -m 600 ttyS0 c 4 64 || gen_die "failed to mknod" date -u '+%Y%m%d-%H%M%S' > ${TEMP}/initramfs-base-temp/etc/build_date echo "Genkernel $GK_V" > ${TEMP}/initramfs-base-temp/etc/build_id |