Watch
0
0
Fork
You've already forked hyperhive
0

pull swarm closures through the nix daemon: substituters in the fragment, merged root-only netrc

This commit is contained in:
atlas 2026-11-08 10:29:46 +01:00 • committed by mara
commit ef68baa00f

View file

@ -26,13 +26,17 @@ cat >"$dir/bin/systemctl" <<STUB
args=" \$* "
case "\$args" in
*" show "*) printf '%s\n' "\$STARTED" ;;
*" is-active "*) [ "\$ACTIVE" = 1 ] ;;
*" is-active "*)
case "\$args" in
*" container@"*) [ "\$ACTIVE" = 1 ] ;;
*) [ "\$UNIT_ACTIVE" = 1 ] ;;
esac ;;
*" is-failed "*) [ "\$FAILED" = 1 ] ;;
*) printf '%s\n' "\$*" >>"$calls" ;;
esac
STUB
chmod +x "$dir/bin/systemctl"
export PATH="$dir/bin:$PATH" ACTIVE=1 FAILED=0 STARTED=
export PATH="$dir/bin:$PATH" ACTIVE=1 UNIT_ACTIVE=1 FAILED=0 STARTED=
export LC_ALL=de_DE.UTF-8
@ -106,10 +110,21 @@ check "a failed unit is reset and started" \
refresh_unit gitea-runner-swarm.service "$path"
FAILED=0
STARTED=$(systemd_ts 1791232888.193158)
got=$(refresh_unit gitea-runner-swarm.service "$path" 2>&1)
case="control: a running unit is said to be restarted"
count=$((count + 1))
if [ "$got" != "$path changed after gitea-runner-swarm.service last started — restarting it" ]; then fail "logged: $got"; fi
STARTED=
check "a unit never active is restarted" \
"try-restart --no-block gitea-runner-swarm.service" "" \
UNIT_ACTIVE=0
check "a unit never active is not asked to restart" "" "" \
refresh_unit gitea-runner-swarm.service "$path"
got=$(refresh_unit gitea-runner-swarm.service "$path" 2>&1)
case="a unit never active is not said to be restarted"
count=$((count + 1))
if [ -n "$got" ]; then fail "logged: $got"; fi
UNIT_ACTIVE=1
ACTIVE=0
check "nothing while the container is down" "" "" \