linux-qubasis
linux oasis port as a qubes template
git clone https://9o.is/git/linux-qubasis.git
commit 13ee5c97933113dcf8786f695b562d23a798a4de parent bad3076c9728064cbb939047c8ac853002913e14 Author: Jul <jul@9o.is> Date: Wed, 26 Nov 2025 07:10:46 -0500 add sinit /bin/shutdown Diffstat:
| M | pkg/genfn.sh | | | 4 | ++-- |
| M | pkg/sinit/config.h | | | 6 | +++--- |
| M | pkg/sinit/gen.sh | | | 2 | +- |
| A | pkg/sinit/shutdown | | | 2 | ++ |
| M | qubes/example/rc.shutdown | | | 2 | +- |
5 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/pkg/genfn.sh b/pkg/genfn.sh @@ -217,10 +217,10 @@ compile() { } binfiles() { - files $* + files --prefix binfiles $* for _file in $_files; do _out=${_file#*/} - file reg 0755 '$bindir'/$_out $OUTDIR/$_out + file reg 0755 '$bindir'/${_out#binfiles/} $OUTDIR/$_out done } diff --git a/pkg/sinit/config.h b/pkg/sinit/config.h @@ -1,5 +1,5 @@ /* See LICENSE file for copyright and license details. */ -static char *const rcinitcmd[] = { PREFIX "/etc/rc.init", NULL }; -static char *const rcrebootcmd[] = { PREFIX "/etc/rc.shutdown", "reboot", NULL }; -static char *const rcpoweroffcmd[] = { PREFIX "/etc/rc.shutdown", "poweroff", NULL }; +static char *const rcinitcmd[] = { "/etc/rc.init", NULL }; +static char *const rcrebootcmd[] = { "/etc/rc.shutdown", "reboot", NULL }; +static char *const rcpoweroffcmd[] = { "/etc/rc.shutdown", "poweroff", NULL }; diff --git a/pkg/sinit/gen.sh b/pkg/sinit/gen.sh @@ -3,7 +3,6 @@ fetch git v1.1 cflags " -std=c99 -D_POSIX_C_SOURCE=200809L - -DPREFIX=\\\"/\\\" -I$dir -Wno-unused-parameter " @@ -12,3 +11,4 @@ bin sinit sinit.c libexec shutdown $dir/shutdown.c man sinit.8 sym bin/init sinit +binfiles $dir/shutdown diff --git a/pkg/sinit/shutdown b/pkg/sinit/shutdown @@ -0,0 +1,2 @@ +#!/bin/sh +exec kill -USR1 1 diff --git a/qubes/example/rc.shutdown b/qubes/example/rc.shutdown @@ -8,4 +8,4 @@ poweroff) args=-p;; reboot) args=-r;; esac -exec /bin/shutdown $args +exec /libexec/shutdown $args