Skip to content

Commit

Permalink
1: only create /run/runit directory.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ericonr authored and ahesford committed Jul 20, 2020
1 parent 6379c5f commit df58001
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions 1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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..."

0 comments on commit df58001

Please sign in to comment.