aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2014-04-13 17:47:38 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2014-04-13 17:47:38 -0700
commitcf40f8d5d5bc9bf46e2b87e9545e3e24523f4ead (patch)
treedc37297399b6affef30fe469611e33e98a628376
parentMore device nodes. (diff)
downloadgenkernel-debug-build.tar.gz
genkernel-debug-build.tar.bz2
genkernel-debug-build.zip
Detect mknod failure.debug-build
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-xgen_initramfs.sh13
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