aboutsummaryrefslogtreecommitdiffstats
path: root/main/debootstrap/makedev.sh
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2015-08-18 20:46:25 +0200
committerFrancesco Colista <fcolista@alpinelinux.org>2015-08-20 14:27:33 +0000
commitd4fd8bfbf0256fcb70d1a62e8be2c37aa320f71d (patch)
tree7a0b4d8b4fa6b93e863b401080043df830cec945 /main/debootstrap/makedev.sh
parent917d264454c72c77990ecb980961f47daa7f77e1 (diff)
downloadaports-d4fd8bfbf0256fcb70d1a62e8be2c37aa320f71d.tar.bz2
aports-d4fd8bfbf0256fcb70d1a62e8be2c37aa320f71d.tar.xz
main/debootstrap: cleanup by providing custom makedev script
Instead of replicating the Makefile devices.tar.gz rule in the package() APKBUILD function.
Diffstat (limited to 'main/debootstrap/makedev.sh')
-rwxr-xr-xmain/debootstrap/makedev.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/main/debootstrap/makedev.sh b/main/debootstrap/makedev.sh
new file mode 100755
index 0000000000..bee4ff8fe7
--- /dev/null
+++ b/main/debootstrap/makedev.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+# Use this instead of packaging makedev.
+
+# Exit on failure.
+set -e
+
+# Create devices in $PWD.
+ln -s /proc/self/fd fd
+ln -s fd/0 stdin
+ln -s fd/1 stdout
+ln -s fd/2 stderr
+mknod full c 1 7
+mknod null c 1 3
+mknod ptmx c 5 2
+mkdir pts shm
+mknod random c 1 8
+mknod tty c 5 0
+mknod urandom c 1 9
+mknod zero c 1 5