From b464c7424b20e9e03ac5046d235acb5970196382 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Tue, 15 Feb 2022 11:13:31 +0330 Subject: now make_devices complains if not run with root --- chroot/make_devices.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'chroot') 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 -- cgit v1.2.3