diff options
author | 2025-02-09 12:04:19 +0800 | |
---|---|---|
committer | 2025-02-09 09:55:10 -0800 | |
commit | 32737b5387c1c33f9a4c38f08995ebed85472393 (patch) | |
tree | 08346a6e40bbb67c09330baeb515ead74b7f008c /app-containers | |
parent | app-misc/dateutils: make PATCHES a bash array (diff) | |
download | gentoo-32737b5387c1c33f9a4c38f08995ebed85472393.tar.gz gentoo-32737b5387c1c33f9a4c38f08995ebed85472393.tar.bz2 gentoo-32737b5387c1c33f9a4c38f08995ebed85472393.zip |
app-containers/podman: fix restart behavior of unless-stopped
Signed-off-by: NN708 <nn708@outlook.com>
Closes: https://github.com/gentoo/gentoo/pull/40494
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'app-containers')
-rw-r--r-- | app-containers/podman/files/podman-restart-5.0.0_rc4.initd | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app-containers/podman/files/podman-restart-5.0.0_rc4.initd b/app-containers/podman/files/podman-restart-5.0.0_rc4.initd index d02bd64c6279..62bea5bc12de 100644 --- a/app-containers/podman/files/podman-restart-5.0.0_rc4.initd +++ b/app-containers/podman/files/podman-restart-5.0.0_rc4.initd @@ -2,21 +2,21 @@ # Copyright 2015-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -description="Start all containers with restart-policy set to always" +description="Start all containers with restart-policy set to always or unless-stopped" command_user="${RUN_AS_USER:=root:root}" command="/usr/bin/podman" -command_args="--log-level ${LOG_LEVEL:=info} start --all --filter restart-policy=always" +command_args="--log-level ${LOG_LEVEL:=info} start --all --filter restart-policy=always --filter restart-policy=unless-stopped" depend() { after net } stop() { - ebegin "Stopping all containers with restart-policy set to always" + ebegin "Stopping all containers with restart-policy set to always or unless-stopped" ${command} \ --log-level ${LOG_LEVEL} \ stop \ - $(${command} container ls --filter restart-policy=always -q) - eend $? "Failed to stop containers with restart-policy set to always" + $(${command} container ls --filter restart-policy=always --filter restart-policy=unless-stopped -q) + eend $? "Failed to stop containers with restart-policy set to always or unless-stopped" } |