customize_root_image-constants.inc 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. # environment vars from build.sh:
  2. # ISO_TITLE
  3. # ISO_INIT
  4. # ISO_WMDE
  5. # ISO_ARCH
  6. # ENABLE_OFFLINE_INSTALL
  7. # ENABLE_TTS_BRLTTY
  8. ## timezone and locales ##
  9. readonly LOCALES="en_US\.UTF-8 \
  10. eo \
  11. es_ES\.UTF-8 \
  12. fr_FR\.UTF-8 \
  13. gl_ES\.UTF-8 \
  14. it_IT\.UTF-8 \
  15. pt_BR\.UTF-8 \
  16. pl_PL\.UTF-8 "
  17. ## pacman ##
  18. readonly NONSYSTEMD_REGEX='N ; s|^#\[nonsystemd\].*#Include|\[nonsystemd\]\nInclude|'
  19. ## services ##
  20. readonly OPENRC_DELETE_FILES="/etc/hostname \
  21. /etc/systemd/scripts/choose-mirror \
  22. /etc/systemd/system/choose-mirror.service \
  23. /etc/systemd/system/etc-pacman.d-gnupg.mount \
  24. /etc/systemd/system/getty@tty1.service.d/autologin.conf \
  25. /etc/systemd/system/pacman-init.service "
  26. readonly SYSTEMD_DELETE_FILES="/etc/conf.d/agetty.tty1 \
  27. /etc/conf.d/hostname \
  28. /etc/init.d/pacman-init \
  29. /etc/X11/Xwrapper.config"
  30. readonly OPENRC_SERVICES_ALL="dbus \
  31. elogind \
  32. haveged \
  33. NetworkManager \
  34. pacman-init "
  35. readonly OPENRC_SERVICES_GUI="alsasound"
  36. readonly SYSTEMD_SERVICES_ALL="choose-mirror.service \
  37. haveged.service \
  38. multi-user.target \
  39. pacman-init.service "
  40. readonly SYSTEMD_SERVICES_ACC="bluetooth.service \
  41. brltty.service \
  42. livecd-alsa-unmuter.service "
  43. readonly SYSTEMD_SERVICES_CLI="dhcpcd.service \
  44. systemd-resolved.service "
  45. readonly SYSTEMD_SERVICES_GUI="NetworkManager.service"
  46. readonly OPENRC_SERVICES="${OPENRC_SERVICES_ALL} \
  47. $( [[ "${ISO_WMDE}" != 'cli' ]] && echo " ${OPENRC_SERVICES_GUI}" )"
  48. readonly SYSTEMD_SERVICES="${SYSTEMD_SERVICES_ALL} \
  49. $( [[ "${ENABLE_TTS_BRLTTY}" == 'yes' ]] && echo " ${SYSTEMD_SERVICES_ACC}" ) \
  50. $( [[ "${ISO_WMDE}" == 'cli' ]] && echo " ${SYSTEMD_SERVICES_CLI}" || \
  51. echo " ${SYSTEMD_SERVICES_GUI}" ) "
  52. ## system defaults and root user ##
  53. readonly DEFAULT_SHELL=/bin/bash
  54. readonly NETINSTALL_MSG="To install Parabola, the system must be connected to the internet."
  55. readonly COMPLETE_MSG="This ISO is capable of installing a complete Parabola system\n\
  56. without a connection to the internet.\n\
  57. To fetch packages from the internet, enter this command first:\n\
  58. # cp /etc/pacman-online.conf /etc/pacman.conf"
  59. if [[ "${ENABLE_OFFLINE_INSTALL}" == 'true' ]]
  60. then readonly INSTALL_TYPE='Complete' ; readonly NETWORK_MOTD_MSG=${COMPLETE_MSG} ;
  61. else readonly INSTALL_TYPE='NetInstall' ; readonly NETWORK_MOTD_MSG=${NETINSTALL_MSG} ;
  62. fi
  63. readonly ROOT_SKEL_FILES="/etc/skel/.bash_logout \
  64. /etc/skel/.bash_profile \
  65. /etc/skel/install.sh"
  66. readonly MINI_SKEL_FILES="/etc/skel/.xinitrc"
  67. readonly LIVE_USER=parabola
  68. readonly DEFAULT_USER_GROUPS="adm,audio,floppy,log,network,rfkill,scanner,storage,optical,power,wheel"
  69. readonly OPENRC_USER_GROUPS="disk,sys"
  70. [[ "${ISO_INIT}" == 'openrc' ]] && readonly LIVE_USER_GROUPS="${DEFAULT_USER_GROUPS},${OPENRC_USER_GROUPS}" ||
  71. readonly LIVE_USER_GROUPS="${DEFAULT_USER_GROUPS}"
  72. readonly TITLE_REGEX="^(.+) - (.+ Edition) (.+)$"
  73. readonly TITLE_ERROR_MSG="malformed ISO title:\n\t'${ISO_TITLE}'"
  74. ! [[ "${ISO_TITLE}" =~ ${TITLE_REGEX} ]] && echo -e "${TITLE_ERROR_MSG}" && exit 1
  75. readonly PRETTY_NAME="${BASH_REMATCH[ 1]}"
  76. readonly EDITION="${BASH_REMATCH[ 2]}"
  77. readonly VERSION=${BASH_REMATCH[ 3]}
  78. readonly RELEASE_ID=${ISO_ARCH}-${ISO_INIT}-${ISO_WMDE}
  79. readonly OS_PRETTY_NAME="${PRETTY_NAME}"
  80. readonly OS_VERSION=${VERSION}
  81. readonly OS_VERSION_ID="$(tr '.' '-' <<<${OS_VERSION})"
  82. readonly OS_VARIANT="${ISO_ARCH} ${EDITION} - (${INSTALL_TYPE})"
  83. readonly OS_VARIANT_ID=${RELEASE_ID}
  84. LOG_CONFIG() { printf "\033[01;34mconfiguring: %s\033[00m\n" "$(echo -e $*)" ; }