#!/bin/bash # Parabola Install Wizard - in-chroot config # # this script is called by install.sh # it is expected to run in-chroot during the install process; # and should not be run explicitly # # # Copyright (C) 2015 Jorge Lopez # Copyright (C) 2015-2016 André Fabian Silva Delgado # Copyright (C) 2020,2022 bill-auger # # SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Parabola Install Wizard. # # Parabola Install Wizard - in-chroot config is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Parabola Install Wizard - in-chroot config is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Parabola Install Wizard. If not, see . source /root/session-common.sh.inc readonly INIT=$(GetStateVar 'INIT') readonly 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' ]] then # Enable services with 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 exit