summaryrefslogtreecommitdiffstats
path: root/main/mkinitfs/fix-dev-null.patch
blob: 8b1161cee92b6d18cece89ced2868898813f07dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -235,6 +235,9 @@
 RC=$?
 [ -d /dev/pts ] || mkdir -m 755 /dev/pts
 [ -c /dev/ptmx ] || mknod -m 666 /dev/ptmx c 5 2
+# make sure /dev/null is setup correctly
+[ -f /dev/null ] && rm -f /dev/null
+[ -c /dev/null ] || mknod -m 666 /dev/null c 1 3
 mount -t devpts -o gid=5,mode=0620,noexec,nosuid devpts /dev/pts
 [ -d /dev/shm ] || mkdir /dev/shm
 mount -t tmpfs -o nodev,nosuid,noexec shm /dev/shm