autoinst

scripts to make installation of custom debian easier and more automated
git clone git://deadbeef.fr/autoinst.git
Log | Files | Refs | README | LICENSE

commit 2be4f2cd65bcaaf16fa2857827010fc3f775001b
parent abbb9e2a76abb60122f77c2e2c6f596f86848033
Author: Morel BĂ©renger <berenger.morel@neutralite.org>
Date:   Thu, 14 Nov 2019 17:19:42 +0100

set RUNSVDIR inside etc/runit/3 so that services can be stopped properly

Diffstat:
Aetc/runit/3 | 19+++++++++++++++++++
1 file changed, 19 insertions(+), 0 deletions(-)

diff --git a/etc/runit/3 b/etc/runit/3 @@ -0,0 +1,19 @@ +#!/bin/sh +exec 2>&1 + +PATH=/sbin:/usr/sbin:/bin:/usr/bin +SVDIR=/var/lib/runit/service + +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 + +echo 'Waiting for services to stop...' +sv force-stop $SVDIR/* +sv exit $SVDIR/* + +echo 'Shutdown...' +/etc/init.d/rc $LAST