diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2019-06-25 00:02:18 -0400 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2020-03-27 19:32:36 -0400 |
commit | 02d130087921238a0edd14f070a6a874903afef9 (patch) | |
tree | cd113d6cb13fa44bdd4145683f8de5431684f613 /configs/profile/root-image/root/customize_root_image-constants.inc | |
parent | 5e9d927b61fa3674cfd874f9520077648df88d1f (diff) |
housekeeping
Diffstat (limited to 'configs/profile/root-image/root/customize_root_image-constants.inc')
-rw-r--r-- | configs/profile/root-image/root/customize_root_image-constants.inc | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/configs/profile/root-image/root/customize_root_image-constants.inc b/configs/profile/root-image/root/customize_root_image-constants.inc index 8d2902c..d24b3ed 100644 --- a/configs/profile/root-image/root/customize_root_image-constants.inc +++ b/configs/profile/root-image/root/customize_root_image-constants.inc @@ -6,7 +6,7 @@ # HAS_BRLTTY_TTS -readonly NONSYSTEMD_REGEX='N ; s|^#\[nonsystemd\].*#Include|\[nonsystemd\]\nInclude|' +/* timezone and locales */ readonly LOCALES="en_US\.UTF-8 \ eo \ @@ -17,6 +17,14 @@ readonly LOCALES="en_US\.UTF-8 \ pt_BR\.UTF-8 \ pl_PL\.UTF-8 " + +/* pacman */ + +readonly NONSYSTEMD_REGEX='N ; s|^#\[nonsystemd\].*#Include|\[nonsystemd\]\nInclude|' + + +/* services */ + readonly OPENRC_DELETE_FILES="/etc/hostname \ /etc/systemd/scripts/choose-mirror \ /etc/systemd/system/choose-mirror.service \ @@ -47,6 +55,9 @@ readonly SYSTEMD_SERVICES="${SYSTEMD_SERVICES_ALL} $([[ "${ISO_GUI}" != 'cli' ]] && echo " ${SYSTEMD_SERVICES_GUI}") \ $([[ "${ENABLE_TTS_BRLTTY}" == 'yes' ]] && echo " ${SYSTEMD_SERVICES_ACC}")" + +/* system defaults and root user */ + readonly DEFAULT_SHELL=/bin/bash readonly NETINSTALL_MSG="To install Parabola, the system must be connected to the internet." @@ -69,11 +80,15 @@ readonly DEFAULT_USER_GROUPS="adm,audio,floppy,log,network,rfkill,scanner,storag readonly OPENRC_USER_GROUPS="disk,sys" [[ "${ISO_INIT}" == 'openrc' ]] && readonly LIVE_USER_GROUPS="${DEFAULT_USER_GROUPS},${OPENRC_USER_GROUPS}" || readonly LIVE_USER_GROUPS="${DEFAULT_USER_GROUPS}" -readonly OS_PRETTY_NAME="$(echo ${ISO_TITLE} | cut -d ' ' -f -5) - (${INSTALL_TYPE})" -readonly OS_VERSION=$( echo ${ISO_TITLE} | cut -d ' ' -f 6 ) -readonly OS_VERSION_ID=$( echo ${ISO_TITLE} | cut -d ' ' -f 6 ) -readonly OS_VARIANT="$( echo ${OS_PRETTY_NAME} | cut -d ' ' -f -3 --complement )" -readonly OS_VARIANT_ID=${ISO_INIT}-${ISO_GUI} + +readonly TITLE_REGEX="^(.+) - (.+) (.+)" +readonly TITLE_ERROR_MSG="malformed ISO title:\n\t'${ISO_TITLE}'" +! [[ "${ISO_TITLE}" =~ ${TITLE_REGEX} ]] && echo -e "${TITLE_ERROR_MSG}" && exit 1 +readonly OS_PRETTY_NAME="${BASH_REMATCH[ 1]}" +readonly OS_VERSION="${BASH_REMATCH[ 3]}" +readonly OS_VERSION_ID="$(tr '.' '-' <<<${OS_VERSION})" +readonly OS_VARIANT="${BASH_REMATCH[ 2]} - (${INSTALL_TYPE})" +readonly OS_VARIANT_ID="${ISO_INIT}-${ISO_GUI}-${INSTALL_TYPE,,}" LOG_CONFIG() { printf "\033[01;34mconfiguring: %s\033[00m\n" "$(echo -e $*)" ; } |