diff options
author | terminaldweller <thabogre@gmail.com> | 2022-02-15 07:43:31 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2022-02-15 07:43:31 +0000 |
commit | b464c7424b20e9e03ac5046d235acb5970196382 (patch) | |
tree | 75c6f65385ba53851e1401f83e50781ba9cbb9d7 /chroot | |
parent | adding device files manually now and working for void chroots (diff) | |
download | scripts-b464c7424b20e9e03ac5046d235acb5970196382.tar.gz scripts-b464c7424b20e9e03ac5046d235acb5970196382.zip |
now make_devices complains if not run with root
Diffstat (limited to '')
-rwxr-xr-x | chroot/make_devices.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chroot/make_devices.sh b/chroot/make_devices.sh index d333615..f4191bd 100755 --- a/chroot/make_devices.sh +++ b/chroot/make_devices.sh @@ -1,5 +1,10 @@ #!/bin/sh +if [ ! "$EUID" = 0 ];then + echo "this scripts must be run as root" + exit 1; +fi + make_devices() { env mknod -m 0666 $1/dev/tty c 5 0 chown root:tty $1/dev/tty |