diff options
Diffstat (limited to 'configs/profile/root-image/root/customize_root_image.sh')
-rwxr-xr-x | configs/profile/root-image/root/customize_root_image.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/configs/profile/root-image/root/customize_root_image.sh b/configs/profile/root-image/root/customize_root_image.sh index 4ce914a..eda5c64 100755 --- a/configs/profile/root-image/root/customize_root_image.sh +++ b/configs/profile/root-image/root/customize_root_image.sh @@ -1,6 +1,6 @@ #!/bin/bash -### post-install chroot customization script ### +## post-install chroot customization script ## set -e -u source /root/customize_root_image-constants.inc @@ -35,9 +35,9 @@ then # delete files that are specific to other init systems # enable services for service in ${OPENRC_SERVICES} ; do rc-update add ${service} default ; done ; - # create the dbus user and group if it does not exist - if [[ "$(grep 'dbus' /etc/group )" = "" ]] ; then groupadd -g 81 dbus ; fi ; - if [[ "$(grep 'dbus' /etc/passwd)" = "" ]] ; then useradd -r -s /sbin/nologin -g 81 -u 81 dbus ; fi ; + # create the 'dbus' group and user if they do not exist + if ! grep 'dbus' /etc/group > /dev/null ; then groupadd -g 81 dbus ; fi ; + if ! grep 'dbus' /etc/passwd > /dev/null ; then useradd -r -s /sbin/nologin -u 81 -g 81 dbus ; fi ; elif [[ "${ISO_INIT}" == 'systemd' ]] then # delete files that are specific to other init systems @@ -76,7 +76,7 @@ else # configure GUI login session # configure live user [[ -n "$(id ${LIVE_USER} 2> /dev/null)" ]] && userdel -r ${LIVE_USER} 2> /dev/null - useradd -m -p "" -g users -G "${USER_GROUPS}" -s ${DEFAULT_SHELL} ${LIVE_USER} + useradd -m -p "" -g users -G "${LIVE_USER_GROUPS}" -s ${DEFAULT_SHELL} ${LIVE_USER} # configure auto-login if [[ "${ISO_INIT}" == 'openrc' ]] |