On October 28, 2017 11:22:49 AM GMT+03:00, Rick Moen <[email protected]> wrote: >(But sure, fixing the runit-init package >would be a nice-to-have.) I have a proposal for this. Basically, have an install script which does something like this (I'm not familiar with the Debian packaging scripts so assume it's sh):
# if upgrading, this doesn't run
if [ "$(pgrep runit -o)" != "1" ]; then
mv -f /sbin/shutdown{,.old}
mv -f /sbin/reboot{,.old}
fi
And then /sbin/reboot and /sbin/shutdown should point to a shell script like
this:
if [ "$(pgrep runit -o)" != "1" ]; then
exec "$0.old" $*
else
if [ -e "$0.old" ]; then
rm "$0.old"
fi; fi
# ...do shutdown/reboot the runit way...
I don't think it's the best way of doing this, but I guess it'd work.
--- :^) --- :^) --- :^) --- :^) --- :^) --- :^) --- :^) --- :^) ---
https://nextchan.org - https://gitgud.io/m712/blazechan
I am awake between 7AM-12AM UTC, hit me up if something's wrong
signature.asc
Description: PGP signature
_______________________________________________ Dng mailing list [email protected] https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
