diff options
Diffstat (limited to 'configs/profile/root-image')
3 files changed, 25 insertions, 15 deletions
diff --git a/configs/profile/root-image/etc/skel/.bash_profile b/configs/profile/root-image/etc/skel/.bash_profile index 5a4b1b2..3698904 100644 --- a/configs/profile/root-image/etc/skel/.bash_profile +++ b/configs/profile/root-image/etc/skel/.bash_profile @@ -9,6 +9,7 @@ export EDITOR=nano export DE='_DESKTOP_SESSION_' # gnome, kde, xfce, lxde, mate export DESKTOP_SESSION='_DESKTOP_SESSION_' # lxde +ENABLE_TTS_BRLTTY='_ENABLE_TTS_BRLTTY_' # speech and braille # set custom environment @@ -18,7 +19,7 @@ export $(cat /etc/locale.conf) # launch accessibility features -[ -d /usr/bin/talk-to-me ] && flock -n /run/talk-to-me.lck /usr/bin/talk-to-me +[[ "$ENABLE_TTS_BRLTTY" == 'true' ]] && flock -n /run/talk-to-me.lck /usr/bin/talk-to-me # launch X 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 171c23e..b833333 100644 --- a/configs/profile/root-image/root/customize_root_image-constants.inc +++ b/configs/profile/root-image/root/customize_root_image-constants.inc @@ -3,6 +3,7 @@ # ISO_INIT # ISO_GUI # ENABLE_OFFLINE_INSTALL +# HAS_BRLTTY_TTS readonly LOCALES="en_US\.UTF-8 \ @@ -25,11 +26,12 @@ readonly OPENRC_DELETE_FILES="/etc/hostname /etc/systemd/system/getty@tty1.service.d/autologin.conf \ /etc/systemd/system/pacman-init.service " -readonly SYSTEMD_SERVICES_ALL="brltty.service \ - choose-mirror.service \ - livecd-alsa-unmuter.service \ - multi-user.target \ - pacman-init.service " +readonly SYSTEMD_SERVICES_ALL="choose-mirror.service \ + multi-user.target \ + pacman-init.service " +readonly SYSTEMD_SERVICES_ACC="bluetooth.service \ + brltty.service \ + livecd-alsa-unmuter.service " readonly SYSTEMD_SERVICES_GUI="NetworkManager.service" readonly OPENRC_SERVICES_ALL="dbus \ haveged \ @@ -39,8 +41,9 @@ readonly OPENRC_SERVICES_GUI="alsasound \ elogind " readonly SYSTEMD_SERVICES="${SYSTEMD_SERVICES_ALL}" readonly OPENRC_SERVICES="${OPENRC_SERVICES_ALL}" -[[ "${ISO_GUI}" != 'cli' ]] && readonly SYSTEMD_SERVICES+=" ${SYSTEMD_SERVICES_GUI}" -[[ "${ISO_GUI}" != 'cli' ]] && readonly OPENRC_SERVICES+=" ${OPENRC_SERVICES_GUI}" +[[ "${ENABLE_TTS_BRLTTY}" == 'yes' ]] && readonly SYSTEMD_SERVICES+=" ${SYSTEMD_SERVICES_ACC}" +[[ "${ISO_GUI}" != 'cli' ]] && readonly SYSTEMD_SERVICES+=" ${SYSTEMD_SERVICES_GUI}" +[[ "${ISO_GUI}" != 'cli' ]] && readonly OPENRC_SERVICES+=" ${OPENRC_SERVICES_GUI}" readonly DEFAULT_SHELL=/bin/bash @@ -70,3 +73,6 @@ 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} + + +LOG_CONFIG() { printf "\033[01;34mconfiguring: %s\033[00m\n" "$(echo -e $*)" ; } diff --git a/configs/profile/root-image/root/customize_root_image.sh b/configs/profile/root-image/root/customize_root_image.sh index 681822b..ff5a2f3 100755 --- a/configs/profile/root-image/root/customize_root_image.sh +++ b/configs/profile/root-image/root/customize_root_image.sh @@ -6,20 +6,20 @@ set -e -u source /root/customize_root_image-constants.inc -# configure timezone and locales # +LOG_CONFIG "timezone and locales" ln -sf /usr/share/zoneinfo/UTC /etc/localtime for locale in ${LOCALES} ; do sed -i "s/#${locale}/${locale}/" /etc/locale.gen ; done ; locale-gen -# configure sudo # +LOG_CONFIG "sudo" chmod 750 /etc/sudoers.d chmod 440 /etc/sudoers.d/g_wheel -# configure pacman # +LOG_CONFIG "pacman" sed -i "s|#Server|Server|" /etc/pacman.d/mirrorlist # FIXME: BEGIN issue #1838 @@ -28,7 +28,8 @@ echo -e "[pcr-testing]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman-onlin [ "${INSTALL_TYPE}" == 'Complete' ] && cp /etc/pacman-offline.conf /etc/pacman.conf || \ cp /etc/pacman-online.conf /etc/pacman.conf -# configure services # + +LOG_CONFIG "services" if [[ "${ISO_INIT}" == 'systemd' ]] then # delete files that are specific to other init systems @@ -53,7 +54,7 @@ else echo "invalid \$ISO_INIT for services '${ISO_INIT}'" fi -# configure root user, system defaults, and login session # +LOG_CONFIG "system defaults and root user" usermod -s ${DEFAULT_SHELL} root 2> /dev/null sed -i "s|_EDITION_TITLE_|${ISO_TITLE}|" /etc/motd @@ -65,14 +66,16 @@ echo "VARIANT=\"${OS_VARIANT}\"" >> /usr/lib/os-release echo "VARIANT_ID=\"${OS_VARIANT_ID}\"" >> /usr/lib/os-release -# configure login session # +LOG_CONFIG "login session and live user" + +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 and live user +else # configure GUI login session # FIXME: BEGIN issue #1838 groupadd -g 92 audio ; groupadd -g 6 disk ; groupadd -g 93 optical ; groupadd -g 95 storage ; # FIXME: END issue #1838 |