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 | 93 |
1 files changed, 47 insertions, 46 deletions
diff --git a/configs/profile/root-image/root/customize_root_image.sh b/configs/profile/root-image/root/customize_root_image.sh index f82fe5f..92e4617 100755 --- a/configs/profile/root-image/root/customize_root_image.sh +++ b/configs/profile/root-image/root/customize_root_image.sh @@ -24,10 +24,6 @@ LOG_CONFIG "pacman" [[ "${ISO_INIT}" == 'openrc' ]] && sed -i "$NONSYSTEMD_REGEX" /etc/pacman-online.conf [[ "${INSTALL_TYPE}" == 'Complete' ]] && cp /etc/pacman-offline.conf /etc/pacman.conf || \ cp /etc/pacman-online.conf /etc/pacman.conf -# FIXME: https://labs.parabola.nu/issues/2576 -# this LOC can be removed eventually after the new 'base' meta-package is stabilized -pacman -R $(pacman -Qq | grep ^systemd-) - LOG_CONFIG "services" @@ -70,45 +66,50 @@ sed -i "s|_EDITION_TITLE_|${ISO_TITLE}|" /etc/motd sed -i "s|_NETWORK_MOTD_MSG_|${NETWORK_MOTD_MSG}|" /etc/motd sed -i "s|_ENABLE_TTS_BRLTTY_|${ENABLE_TTS_BRLTTY}|" /etc/skel/.bash_profile -if [[ "${ISO_GUI}" == 'cli' ]] -then # configure CLI login session - cp ${ROOT_SKEL_FILES} /root/ - sed -i "s|_DESKTOP_SESSION_||" /root/.bash_profile - -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 "${LIVE_USER_GROUPS}" -s ${DEFAULT_SHELL} ${LIVE_USER} - - # configure auto-login - if [[ "${ISO_INIT}" == 'openrc' ]] - then sed -i "s|--autologin root|--autologin ${LIVE_USER}|" /etc/conf.d/agetty.tty1 - - elif [[ "${ISO_INIT}" == 'systemd' ]] - then sed -i "s|--autologin root|--autologin ${LIVE_USER}|" /etc/systemd/system/getty@tty1.service.d/autologin.conf - fi - - # configure welcome news alert - sed -i "s|_EDITION_TITLE_|${OS_PRETTY_NAME}| ; \ - s|,Don't show this again:0|| ; \ - s|620x460|620x520| " /usr/bin/autostart.sh - - # configure desktop environment - sed -i "s|/issue-tracker/|/isos/|" /home/${LIVE_USER}/Desktop/bug-tracker.desktop - if [[ "${ISO_GUI}" == 'lxde' ]] - then rm -f /etc/xdg/autostart/octopi-notifier.desktop 2> /dev/null # FIXME: issue #1850 - for desktop_file in parabola-installer.desktop parabola-irc.desktop bug-tracker.desktop - do sleep 2 ; touch /home/${LIVE_USER}/Desktop/${desktop_file} ; # sort - done - sed -i "s|_DESKTOP_SESSION_|LXDE|" /home/${LIVE_USER}/.bash_profile - sed -i "s|_DESKTOP_SESSION_|LXDE|" /home/${LIVE_USER}/.dmrc - - elif [[ "${ISO_GUI}" == 'mate' ]] - then sed -i "s|_DESKTOP_SESSION_|mate|" /home/${LIVE_USER}/.bash_profile - sed -i "s|_DESKTOP_SESSION_|mate|" /home/${LIVE_USER}/.dmrc - - else echo "invalid \$ISO_GUI for _DESKTOP_SESSION_ '${ISO_GUI}'" - exit 1 - fi -fi +case "${ISO_WMDE}" in +'cli' ) # configure CLI login session + cp ${ROOT_SKEL_FILES} /root/ + sed -i "s|_DESKTOP_SESSION_||" /root/.bash_profile + ;; + +* ) # 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 "${LIVE_USER_GROUPS}" -s ${DEFAULT_SHELL} ${LIVE_USER} + + # configure auto-login + case "${ISO_INIT}" in + 'openrc' ) sed -i "s|--autologin root|--autologin ${LIVE_USER}|" /etc/conf.d/agetty.tty1 ;; + 'systemd' ) sed -i "s|--autologin root|--autologin ${LIVE_USER}|" /etc/systemd/system/getty@tty1.service.d/autologin.conf ;; + esac + + # configure desktop environment + sed -i "s|/issue-tracker/|/isos/|" /home/${LIVE_USER}/Desktop/bug-tracker.desktop + case "${ISO_WMDE}" in + 'lxde' ) + rm -f /etc/xdg/autostart/octopi-notifier.desktop 2> /dev/null # FIXME: issue #1850 + for desktop_file in parabola-installer.desktop parabola-irc.desktop bug-tracker.desktop + do sleep 2 ; touch /home/${LIVE_USER}/Desktop/${desktop_file} ; # sort + done + sed -i "s|_DESKTOP_SESSION_|LXDE|" /home/${LIVE_USER}/.bash_profile + sed -i "s|_DESKTOP_SESSION_|LXDE|" /home/${LIVE_USER}/.dmrc + ;; + + 'mate' ) + sed -i "s|_DESKTOP_SESSION_|mate|" /home/${LIVE_USER}/.bash_profile + sed -i "s|_DESKTOP_SESSION_|mate|" /home/${LIVE_USER}/.dmrc + ;; + + * ) + echo "invalid \$ISO_WMDE for _DESKTOP_SESSION_ '${ISO_WMDE}'" + exit 1 + ;; + esac + + # configure welcome news alert + sed -i "s|_EDITION_TITLE_|${OS_PRETTY_NAME}| ; \ + s|,Don't show this again:0|| ; \ + s|620x460|620x520| " /usr/bin/autostart.sh + ;; +esac |