Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177549264
D60699.1794687540.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D60699.1794687540.diff
View Options
diff --git a/sysutils/podman/Makefile b/sysutils/podman/Makefile
--- a/sysutils/podman/Makefile
+++ b/sysutils/podman/Makefile
@@ -1,7 +1,7 @@
PORTNAME= podman
DISTVERSIONPREFIX= v
DISTVERSION= 5.8.9
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= sysutils
MAINTAINER= dfr@FreeBSD.org
diff --git a/sysutils/podman/files/podman.in b/sysutils/podman/files/podman.in
--- a/sysutils/podman/files/podman.in
+++ b/sysutils/podman/files/podman.in
@@ -1,6 +1,7 @@
#!/bin/sh
-# Podman startup script - start all containers with restart policy set to always.
+# Podman startup script - start all containers that should start on boot
+# (restart policy "always", or "unless-stopped" and not stopped by the user).
# PROVIDE: podman
# REQUIRE: LOGIN
@@ -28,7 +29,7 @@
# Turn newlines into spaces to avoid line breaks in log messages
container_list=$(
- ${podman} container ls --all --filter restart-policy=always -q \
+ ${podman} container ls --all --filter should-start-on-boot=true -q \
| tr '\n' ' ')
podman_start()
@@ -41,9 +42,15 @@
podman_stop()
{
- if [ -n "${container_list}" ]; then
- echo "Stopping podman containers: ${container_list}"
- ${podman} ${podman_flags} stop ${container_list}
+ local running
+
+ # Stop every running container, as podman-restart.service does on
+ # Linux. --service keeps StoppedByUser clear so unless-stopped
+ # containers come back on the next boot.
+ running=$(${podman} container ls -q | tr '\n' ' ')
+ if [ -n "${running}" ]; then
+ echo "Stopping podman containers: ${running}"
+ ${podman} ${podman_flags} stop --service ${running}
fi
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 14, 8:19 PM (11 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41730390
Default Alt Text
D60699.1794687540.diff (1 KB)
Attached To
Mode
D60699: sysutils/podman: Start unless-stopped containers on boot
Attached
Detach File
Event Timeline