Skip to content

Commit

Permalink
1, core-services: migrate towards core-services
Browse files Browse the repository at this point in the history
Based 100% on the work by @sbromberger

I didn't want the work to die.

After this change, folks using lxd or incus containers will be
able to create their own lower-priority core service to modify the
permissions on the files to enable proper shutdown/reboot of the
containers. These core services will survive upgrades to void-runit,
unlike the current approach in the container script.
  • Loading branch information
Vaelatern committed Sep 6, 2024
1 parent 2c71a88 commit 52dc8ed
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
12 changes: 0 additions & 12 deletions 1
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,4 @@ for f in /etc/runit/core-services/*.sh; do
[ -r $f ] && . $f
done

dmesg >/var/log/dmesg.log
if [ $(sysctl -n kernel.dmesg_restrict 2>/dev/null) -eq 1 ]; then
chmod 0600 /var/log/dmesg.log
else
chmod 0644 /var/log/dmesg.log
fi

# create files for controlling runit
mkdir -p /run/runit
install -m000 /dev/null /run/runit/stopit
install -m000 /dev/null /run/runit/reboot

msg "Initialization complete, running stage 2..."
6 changes: 6 additions & 0 deletions core-services/10-runit-control.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# vim: set ts=4 sw=4 et:

# create files for controlling runit
mkdir -p /run/runit
install -m000 /dev/null /run/runit/stopit
install -m000 /dev/null /run/runit/reboot
8 changes: 8 additions & 0 deletions core-services/97-dmesg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# vim: set ts=4 sw=4 et:

dmesg >/var/log/dmesg.log
if [ $(sysctl -n kernel.dmesg_restrict 2>/dev/null) -eq 1 ]; then
chmod 0600 /var/log/dmesg.log
else
chmod 0644 /var/log/dmesg.log
fi

0 comments on commit 52dc8ed

Please sign in to comment.