about summary refs log tree commit diff
diff options
context:
space:
mode:
authorÉrico Rolim <erico.erc@gmail.com>2020-07-13 17:05:36 -0300
committerAndrew J. Hesford <48421688+ahesford@users.noreply.github.com>2020-07-20 06:50:33 -0400
commitdf580011835bff76fc0d4473f52344898abd9ef5 (patch)
tree0dfd8a5e7fd57906c86d5468fa17d47595c3d21e
parent6379c5ff47ac5b1d64b9e9b47d94931bdfdc8162 (diff)
downloadrunit-void-df580011835bff76fc0d4473f52344898abd9ef5.tar.gz
runit-void-df580011835bff76fc0d4473f52344898abd9ef5.tar.xz
runit-void-df580011835bff76fc0d4473f52344898abd9ef5.zip
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
-rwxr-xr-x16
1 files 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..."