Skip to content

Commit 05c6e86

Browse files
ericonrahesford
authored andcommitted
ctrlaltdel: trigger a reboot properly.
/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.
1 parent 6cdcc01 commit 05c6e86

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ctrlaltdel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
PATH=/usr/bin:/usr/sbin
44
MSG="System is going down..."
55

6+
# We check for this file after receiving a SIGCONT to move to stage3
7+
chmod 100 /run/runit/stopit
8+
69
# We check for this file in stage3 to halt or reboot
7-
touch /run/runit/reboot
10+
chmod 100 /run/runit/reboot
811

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

0 commit comments

Comments
 (0)