Skip to content

Commit

Permalink
ctrlaltdel: trigger a reboot properly.
Browse files Browse the repository at this point in the history
/run/runit/{stopit,reboot} should have their perms set to 100 by
ctrlaltdel, before runit signals itself with SIGCONT, in order to
trigger a reboot. This script can be changed by a user to perform
different actions. The comments in it explain what each file is for.

c
  • Loading branch information
ericonr committed Jul 20, 2020
1 parent 369df48 commit 8c7ef95
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ctrlaltdel
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
PATH=/usr/bin:/usr/sbin
MSG="System is going down..."

# We check for this file after receiving a SIGCONT to move to stage3
chmod 100 /run/runit/stopit

# We check for this file in stage3 to halt or reboot
touch /run/runit/reboot
chmod 100 /run/runit/reboot

# Proceed with shutdown process
echo "$MSG" | wall

0 comments on commit 8c7ef95

Please sign in to comment.