OSDN Git Service

boot-66serv/files/switch-initutils-66: improve init detection.
authormobinmob <mobinmob@disroot.org>
Tue, 27 Sep 2022 16:26:09 +0000 (19:26 +0300)
committermobinmob <mobinmob@disroot.org>
Wed, 5 Oct 2022 17:56:42 +0000 (20:56 +0300)
Also:
- increment the frontend file version for the change.

srcpkgs/boot-66serv/files/switch-initutils-66
srcpkgs/boot-66serv/template

index 42aa4ed..f622a73 100644 (file)
@@ -20,7 +20,7 @@
 
 poweroff_util=$(readlink -f /usr/bin/poweroff)
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
+if grep -q "s6-svscan" /proc/1/cmdline && [ $(pgrep -u root 66-shutdownd) ]; then
         if [ "$poweroff_util" != /usr/bin/poweroff ]; then
                for i in reboot poweroff halt shutdown; do
             mv /usr/bin/${i} /usr/bin/${i}.runit
index 53f553d..b34a794 100755 (executable)
@@ -44,7 +44,7 @@ post_install() {
        vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
        vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
        vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
-       vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+       vsed -i "s/@VERSION@/0.0.3/" "${DESTDIR}/usr/share/66/service/switch-initutils"
        vinstall "${FILESDIR}"/runit-wrapsv@ 644 usr/share/66/service/
        vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit-wrapsv@"