From df580011835bff76fc0d4473f52344898abd9ef5 Mon Sep 17 00:00:00 2001 From: Érico Rolim Date: Mon, 13 Jul 2020 17:05:36 -0300 Subject: 1: only create /run/runit directory. The 100 permission in /run/runit/stopit made it so that signaling runit with SIGCONT would shut the system down. To achieve the correct behavior, we should create the stopit and reboot files with 000 perms, and allow their permissions to be set correctly by calls to `init 0` or `init 6` or by /etc/runit/ctrlaltdel. 1 --- 1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/1 b/1 index 6938bc8..0bdba54 100755 --- a/1 +++ b/1 @@ -12,7 +12,7 @@ msg "Welcome to Void!" # Start core services: one-time system tasks. detect_virt for f in /etc/runit/core-services/*.sh; do - [ -r $f ] && . $f + [ -r $f ] && . $f done dmesg >/var/log/dmesg.log @@ -22,7 +22,9 @@ else chmod 0644 /var/log/dmesg.log fi +# create files for controlling runit mkdir -p /run/runit -install -m100 /dev/null /run/runit/stopit +install -m000 /dev/null /run/runit/stopit +install -m000 /dev/null /run/runit/reboot msg "Initialization complete, running stage 2..." -- cgit 1.4.1