run: reject waiting for remain-after-exit services
Reproducer:
unit=run-wait-rae-$(date +%s)
sudo timeout 3s systemd-run --wait --remain-after-exit \
--unit="$unit" /bin/true
echo $?
systemctl is-active "$unit.service"
Before, the command timed out with exit status 124 while the service
stayed active. --wait waits for deactivation, but RemainAfterExit=yes
keeps the service active after the command exits.
Follow-up for 2a453c2ee3
This commit is contained in:
@@ -72,6 +72,8 @@ systemctl cat "$UNIT"
|
||||
grep -q "^Type=oneshot" "/run/systemd/transient/$UNIT.service"
|
||||
systemctl stop "$UNIT"
|
||||
(! systemctl cat "$UNIT")
|
||||
(! systemd-run --wait --remain-after-exit true)
|
||||
(! systemd-run --pipe --remain-after-exit true)
|
||||
|
||||
: "Transient service (user daemon)"
|
||||
systemd-run --wait --pipe --user --machine=testuser@ \
|
||||
|
||||
Reference in New Issue
Block a user