diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2019-02-27 17:59:08 -0500 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2019-10-19 14:18:55 -0400 |
commit | 75b2777aa99f88674452a689839249faac53efc5 (patch) | |
tree | 9b659b55375823b6dce0da44c676f29a07c13f85 /configs/profile/airootfs/root | |
parent | 39908d6dc5dcf010b0e8a8d84f358eb59f000c53 (diff) |
sq - housekeeping
Diffstat (limited to 'configs/profile/airootfs/root')
-rwxr-xr-x | configs/profile/airootfs/root/customize_airootfs.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/configs/profile/airootfs/root/customize_airootfs.sh b/configs/profile/airootfs/root/customize_airootfs.sh index f7f3877..6bbc48e 100755 --- a/configs/profile/airootfs/root/customize_airootfs.sh +++ b/configs/profile/airootfs/root/customize_airootfs.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 sed -i 's/#\(PermitRootLogin \).\+/\1yes/' /etc/ssh/sshd_config @@ -86,7 +86,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' ]] |