Files
pmaports-rtwo/systemd/alpine-base/rc-update
T
Caleb Connolly c1160e2271 systemd/alpine-base: new aport (MR 5563)
alpine-base hard depends on openrc... Fork it to drop this.

We should eventually upstream this by having alpine-base depend on a
virtual pid1 or init-system subpackage which openrc and systemd can both
provide.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2025-01-10 13:02:30 +01:00

42 lines
917 B
Bash

#!/bin/sh
# Dummy to make post-install scripts work
# Will fail in chroot for sysV compat services
# FIXME: FIXME: FIXME: FIXME: FIXME:
# Get the last argument to rc-update, it's
instruction="enable"
for service; do
case "$service" in
"rc-update")
;;
"-q")
;;
"add")
instruction="enable"
;;
"del")
instruction="disable"
;;
*)
break
;;
esac
done
case "$service" in
"networkmanager")
service="NetworkManager"
;;
"modemmanager")
service="ModemManager"
;;
esac
# The service files might be missing due to how apk orders the install
# so we record them all to let systemd-services.trigger enable them
# at the end of installation
if ! systemctl $instruction $service; then
echo "$instruction $service" >> /run/rc-update.failed
fi