summaryrefslogtreecommitdiff
path: root/configs/profile/root-image/root/.session/install/chroot-services.sh
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2020-03-27 20:53:45 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2022-05-01 23:58:14 -0400
commit5faac3e6a166a12a3a0cbb50be21a73632725651 (patch)
treef3118df3aecf2dc9f9f6013102f1c1d664599f53 /configs/profile/root-image/root/.session/install/chroot-services.sh
parent640513f18fec15f24fedf43eb8e86dfae6530637 (diff)
consolidate install wizards into unified implementation
this is admitedly a huge change, nearly a total re-write the original scripts were very brittle and redundant even without functional changes, a DRY refactoring would have been nearly as massive the functional changes for rubustness, were also quite significant it would not have been feasibe to break them down * consolidated all per-init and per-language scripts sets into one * extracted translatable strings into separate file * remvoed confusing main menu, in favor of sequential prompts * better error handling and logging * added cfdisk support for CLI ISOs (GUI ISO still launches gparted) * ensure that all target partitions are formatted
Diffstat (limited to 'configs/profile/root-image/root/.session/install/chroot-services.sh')
-rwxr-xr-xconfigs/profile/root-image/root/.session/install/chroot-services.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/configs/profile/root-image/root/.session/install/chroot-services.sh b/configs/profile/root-image/root/.session/install/chroot-services.sh
new file mode 100755
index 0000000..a63963e
--- /dev/null
+++ b/configs/profile/root-image/root/.session/install/chroot-services.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+source /root/session-common.sh.inc
+
+
+Init=$(GetStateVar 'INIT')
+Wmde=$(GetStateVar 'WMDE')
+if [[ "${Init}" == 'openrc' ]]
+then # Create the dbus user if it doesn't exist
+ grep dbus /etc/group > /dev/null || groupadd -g 81 dbus
+ grep dbus /etc/passwd > /dev/null || useradd -g 81 -u 81 dbus -r -s /sbin/nologin
+
+ # Enable services with OpenRC
+ rc-update add alsasound default
+ rc-update add dbus default
+ rc-update add NetworkManager default
+elif [[ "${Init}" == 'systemd' ]]
+ case "${Wmde}" in
+ 'lxde') systemctl enable 'NetworkManager.service' 'lxdm.service' ;;
+ 'mate') systemctl enable 'NetworkManager.service' 'lightdm.service' ;;
+ * ) systemctl enable 'dhcpcd.service' 'systemd-resolved.service' ;;
+ esac
+fi