fix: replace broken services-artix/postcfg modules with shellprocess
services-artix and postcfg Calamares modules don't exist in upstream Calamares (they're Garuda/Artix fork patches). Our custom Calamares builds from pure upstream, so these steps get silently skipped during installation, leaving NO services enabled in the installed system. Replace them with shellprocess@enable-services, which uses the built-in shellprocess module to run a post-install script that: - Detects the init system (dinit/openrc/runit/s6) - Enables all system services via boot.d symlinks or equivalent - Sets up user services (pipewire, wireplumber) for the created user Affects both online and offline installer settings.
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
dontChroot: true
|
||||||
|
timeout: 60
|
||||||
|
script:
|
||||||
|
- "-/usr/local/bin/enable-services.sh ${USER} ${ROOT}"
|
||||||
@@ -26,14 +26,18 @@ sequence:
|
|||||||
- displaymanager
|
- displaymanager
|
||||||
- networkcfg
|
- networkcfg
|
||||||
- hwclock
|
- hwclock
|
||||||
- services-artix
|
- shellprocess@enable-services
|
||||||
- grubcfg
|
- grubcfg
|
||||||
- bootloader
|
- bootloader
|
||||||
- postcfg
|
|
||||||
- umount
|
- umount
|
||||||
- show:
|
- show:
|
||||||
- finished
|
- finished
|
||||||
|
|
||||||
|
instances:
|
||||||
|
- id: enable-services
|
||||||
|
module: shellprocess
|
||||||
|
config: enable-services.conf
|
||||||
|
|
||||||
branding: antergos-next
|
branding: antergos-next
|
||||||
|
|
||||||
prompt-install: false
|
prompt-install: false
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
dontChroot: true
|
||||||
|
timeout: 60
|
||||||
|
script:
|
||||||
|
- "-/usr/local/bin/enable-services.sh ${USER} ${ROOT}"
|
||||||
@@ -30,10 +30,9 @@ sequence:
|
|||||||
- displaymanager
|
- displaymanager
|
||||||
- networkcfg
|
- networkcfg
|
||||||
- hwclock
|
- hwclock
|
||||||
- services-artix
|
- shellprocess@enable-services
|
||||||
- grubcfg
|
- grubcfg
|
||||||
- bootloader
|
- bootloader
|
||||||
- postcfg
|
|
||||||
- umount
|
- umount
|
||||||
- show:
|
- show:
|
||||||
- finished
|
- finished
|
||||||
@@ -42,6 +41,9 @@ instances:
|
|||||||
- id: dm
|
- id: dm
|
||||||
module: packagechooser
|
module: packagechooser
|
||||||
config: packagechooser_dm.conf
|
config: packagechooser_dm.conf
|
||||||
|
- id: enable-services
|
||||||
|
module: shellprocess
|
||||||
|
config: enable-services.conf
|
||||||
|
|
||||||
branding: antergos-next
|
branding: antergos-next
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
dontChroot: true
|
||||||
|
timeout: 60
|
||||||
|
script:
|
||||||
|
- "-/usr/local/bin/enable-services.sh ${USER} ${ROOT}"
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
USERNAME="${1:-}"
|
||||||
|
ROOT="${2:-}"
|
||||||
|
|
||||||
|
if [[ -z "$ROOT" ]]; then
|
||||||
|
ROOT="/"
|
||||||
|
fi
|
||||||
|
|
||||||
|
chroot_run() {
|
||||||
|
chroot "$ROOT" "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
svc_enable_dinit() {
|
||||||
|
for svc in NetworkManager acpid bluetoothd cronie cupsd dbus dhcpcd power-profiles-daemon sddm syslog-ng; do
|
||||||
|
if [[ -f "$ROOT/etc/dinit.d/$svc" ]]; then
|
||||||
|
chroot_run ln -sf /etc/dinit.d/"$svc" /etc/dinit.d/boot.d/"$svc"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
chroot_run ln -sf /usr/lib/dinit.d/dinit-user-spawn /etc/dinit.d/boot.d/
|
||||||
|
}
|
||||||
|
|
||||||
|
usr_svc_enable_dinit() {
|
||||||
|
local user="$1"
|
||||||
|
if [[ -z "$user" ]] || [[ ! -d "$ROOT/home/$user" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
for svc in pipewire wireplumber; do
|
||||||
|
if [[ -f "$ROOT/etc/dinit.d/user/$svc" ]]; then
|
||||||
|
chroot_run mkdir -p "/home/$user/.config/dinit.d/boot.d"
|
||||||
|
chroot_run ln -sf "/etc/dinit.d/user/$svc" "/home/$user/.config/dinit.d/boot.d/$svc"
|
||||||
|
chroot_run chown -R "$user:$user" "/home/$user/.config/dinit.d"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
svc_enable_openrc() {
|
||||||
|
for svc in NetworkManager acpid bluetoothd cronie cupsd dbus dhcpcd power-profiles-daemon sddm syslog-ng; do
|
||||||
|
if [[ -f "$ROOT/etc/init.d/$svc" ]]; then
|
||||||
|
chroot_run rc-update add "$svc" default
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
usr_svc_enable_openrc() {
|
||||||
|
local user="$1"
|
||||||
|
if [[ -z "$user" ]] || [[ ! -d "$ROOT/home/$user" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
for svc in pipewire pipewire-pulse wireplumber; do
|
||||||
|
if [[ -f "$ROOT/etc/user/init.d/$svc" ]]; then
|
||||||
|
chroot_run mkdir -p "/home/$user/.config/rc/runlevels/default"
|
||||||
|
chroot_run ln -sf "/etc/user/init.d/$svc" "/home/$user/.config/rc/runlevels/default/$svc"
|
||||||
|
chroot_run chown -R "$user:$user" "/home/$user/.config/rc"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
svc_enable_runit() {
|
||||||
|
for svc in NetworkManager acpid bluetoothd cronie cupsd dbus dhcpcd power-profiles-daemon sddm syslog-ng; do
|
||||||
|
if [[ -d "$ROOT/etc/runit/sv/$svc" ]]; then
|
||||||
|
chroot_run ln -sf /etc/runit/sv/"$svc" /etc/runit/runsvdir/default/"$svc"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
svc_enable_s6() {
|
||||||
|
for svc in NetworkManager acpid bluetoothd cronie cupsd dbus dhcpcd power-profiles-daemon sddm syslog-ng; do
|
||||||
|
if [[ -d "$ROOT/etc/s6/sv/$svc" ]] || [[ -d "$ROOT/etc/s6/sv/${svc}-srv" ]]; then
|
||||||
|
chroot_run s6-service add default "$svc"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
chroot_run s6-db-reload -r
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ -f "$ROOT/usr/bin/dinitctl" ]]; then
|
||||||
|
svc_enable_dinit
|
||||||
|
usr_svc_enable_dinit "$USERNAME"
|
||||||
|
elif [[ -f "$ROOT/usr/bin/rc-update" ]]; then
|
||||||
|
svc_enable_openrc
|
||||||
|
usr_svc_enable_openrc "$USERNAME"
|
||||||
|
elif [[ -f "$ROOT/usr/bin/runsvdir" ]]; then
|
||||||
|
svc_enable_runit
|
||||||
|
elif [[ -f "$ROOT/usr/bin/s6-service" ]]; then
|
||||||
|
svc_enable_s6
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user