aboutsummaryrefslogtreecommitdiffstats
path: root/chroot/make_devices.sh
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2022-02-15 07:35:56 +0000
committerterminaldweller <thabogre@gmail.com>2022-02-15 07:35:56 +0000
commit7b8a4a697936a614b094a53534ebdbd2ea4b63a9 (patch)
tree957fd489a029aba968b650f8a93248aded1a2af2 /chroot/make_devices.sh
parentfix for gmail inboxes (diff)
downloadscripts-7b8a4a697936a614b094a53534ebdbd2ea4b63a9.tar.gz
scripts-7b8a4a697936a614b094a53534ebdbd2ea4b63a9.zip
adding device files manually now and working for void chroots
Diffstat (limited to '')
-rwxr-xr-xchroot/make_devices.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/chroot/make_devices.sh b/chroot/make_devices.sh
new file mode 100755
index 0000000..d333615
--- /dev/null
+++ b/chroot/make_devices.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+make_devices() {
+ env mknod -m 0666 $1/dev/tty c 5 0
+ chown root:tty $1/dev/tty
+ for i in 0 1 2 3 4 5 6 7; do
+ env mknod -m 0600 $1/dev/tty$i c 4 $i
+ chown root:tty $1/dev/tty$i
+ chmod 0620 $1/dev/tty$i
+ done
+ env mknod -m 0666 $1/dev/null c 1 3
+ env mknod -m 0666 $1/dev/random c 1 8
+ env mknod -m 0666 $1/dev/urandom c 1 9
+ env mknod -m 0666 $1/dev/ptmx c 5 2
+ chown root:tty $1/dev/ptmx
+}
+make_devices /home/devi/chroots/voidmusl
+make_devices /home/devi/chroots/voidglibc
+# debootstrap stable /home/devi/chroots/debian11 http://deb.debian.org/debian