On Mon, 21 May 2018 16:27:15 +0200 Lorenzo Puliti <lorenzo.r...@gmail.com> wrote: > Package: runit-init > Version: 2.1.2-13 > Severity: wishlist > > > > -- System Information: > Debian Release: buster/sid > APT prefers unstable > APT policy: (500, 'unstable') > Architecture: amd64 (x86_64) > > Kernel: Linux 4.15.12-van (SMP w/4 CPU cores; PREEMPT) > Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), > LANGUAGE=en_US:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash > Init: sysvinit (via /sbin/init) > > Versions of packages runit-init depends on: > ii getty-run 2.1.2-13 > ii initscripts 2.88dsf-59.10 > ii libc6 2.27-3 > ii runit 2.1.2-13 > ii runit-helper 2.7.2 > ii sysv-rc 2.88dsf-59.10 > > runit-init recommends no packages. > > runit-init suggests no packages. > > -- no debconf information > > -- debsums errors found: > debsums: changed file /sbin/shutdown (from runit-init package) > > > Hi, > I would like to share a setup that uses runit's code for > reboot/shutdown: this way shutdown/reboot's external code is used > only when switching init. Also, the /etc/init.d/rc script is no > longer used for the shutdown sequence. I'm currently using this on my > pc and i have tested the systemd-->runit-init sitch on Virtualbox and > works for me. Sharing in case you want to use it or just take some > ideas from it. > > mv /sbin/shutdown /sbin/shutdown-sysv > rm /sbin/reboot > rm /sbin/halt > > > /etc/runit/3 > -------------------------------------------------- > #!/bin/sh > exec 2>&1 > > PATH=/sbin:/usr/sbin:/bin:/usr/bin > > # LAST=0 > > # While test -x is more natural, it does not consider file with > # executable bit set on 'noexec' filesystem as executable, and /run > # often is mounted as 'noexec'. > # [ $(stat -c %a /run/runit.reboot) = 100 ] && LAST=6
[replying to myself..] Right now runit in Debian ships its own version of shutdown: the easiest thing to do seems to make reboot/halt/poweroff '-f' option a noop when runit is init, so that Stage 3 returns and runit can continue with its own internal code. hope that this doesn't break anything else