mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-09-21 05:31:25 +02:00
New APK for WAS EFS Utils, latest tagged 'release' 1.31.3 Upstream PR to hopefully make the patch here moot: https://github.com/aws/efs-utils/pull/98
58 lines
1.8 KiB
Diff
58 lines
1.8 KiB
Diff
--- a/src/mount_efs/__init__.py
|
|
+++ b/src/mount_efs/__init__.py
|
|
@@ -265,7 +265,8 @@
|
|
OPEN_SUSE_LEAP_RELEASE_NAME = "openSUSE Leap"
|
|
SUSE_RELEASE_NAME = "SUSE Linux Enterprise Server"
|
|
MACOS_BIG_SUR_RELEASE = "macOS-11"
|
|
-
|
|
+ALPINE_RELEASE_NAME = "Alpine Linux"
|
|
+
|
|
SKIP_NO_LIBWRAP_RELEASES = [
|
|
RHEL8_RELEASE_NAME,
|
|
CENTOS8_RELEASE_NAME,
|
|
@@ -274,6 +275,7 @@
|
|
SUSE_RELEASE_NAME,
|
|
MACOS_BIG_SUR_RELEASE,
|
|
ORACLE_RELEASE_NAME,
|
|
+ ALPINE_RELEASE_NAME,
|
|
]
|
|
|
|
# Multiplier for max read ahead buffer size
|
|
@@ -1304,6 +1306,11 @@
|
|
init_system = f.read().strip()
|
|
except IOError:
|
|
logging.warning("Unable to read %s", comm_file)
|
|
+
|
|
+ # OpenRC init system manages services a little differently
|
|
+ if init_system == "init" and os.path.isfile("/sbin/openrc"):
|
|
+ init_system = "openrc-init"
|
|
+ logging.debug("Detected OpenRC init system")
|
|
else:
|
|
init_system = "launchd"
|
|
|
|
@@ -1361,6 +1368,24 @@
|
|
close_fds=True,
|
|
)
|
|
elif "start" in str(status):
|
|
+ logging.debug("%s is already running", WATCHDOG_SERVICE)
|
|
+
|
|
+ elif init_system == "openrc-init":
|
|
+ proc = subprocess.Popen(
|
|
+ ["/sbin/service", WATCHDOG_SERVICE, "status"],
|
|
+ stdout=subprocess.PIPE,
|
|
+ stderr=subprocess.PIPE,
|
|
+ close_fds=True,
|
|
+ )
|
|
+ status, _ = proc.communicate()
|
|
+ if "stopped" in str(status):
|
|
+ subprocess.Popen(
|
|
+ ["/sbin/service", WATCHDOG_SERVICE, "start"],
|
|
+ stdout=subprocess.DEVNULL,
|
|
+ stderr=subprocess.DEVNULL,
|
|
+ close_fds=True,
|
|
+ )
|
|
+ elif "started" in str(status):
|
|
logging.debug("%s is already running", WATCHDOG_SERVICE)
|
|
|
|
elif init_system == "systemd":
|