summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2018-07-01 04:42:20 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2018-07-02 11:00:59 -0400
commitdcc19a73bf4a015ce9eed075cd51fea3f1e970a3 (patch)
treecc70d58268de472ff7f68aed02e37306a80540b6 /configs
parenta7bd37a2a66864326b43285922812e0059a19867 (diff)
squashme - braille
Diffstat (limited to 'configs')
-rwxr-xr-xconfigs/profile/build.sh7
-rwxr-xr-xconfigs/profile/rebuild.sh4
-rw-r--r--configs/profile/root-image/etc/skel/.bash_profile3
-rw-r--r--configs/profile/root-image/root/customize_root_image-constants.inc20
-rwxr-xr-xconfigs/profile/root-image/root/customize_root_image.sh17
5 files changed, 34 insertions, 17 deletions
diff --git a/configs/profile/build.sh b/configs/profile/build.sh
index 20deb91..a20824e 100755
--- a/configs/profile/build.sh
+++ b/configs/profile/build.sh
@@ -17,6 +17,7 @@ iso_version=$(date +%Y.%m.%d)
iso_label="PARA_$(date +%Y%m)"
iso_dirname='parabola'
enable_offline_install='false'
+enable_tts_brltty='false'
offline_switch=''
work_dir=./work
out_dir=./out/$(echo "${iso_edition}-${iso_version}" | tr '[:upper:]/' '[:lower:]-')
@@ -50,6 +51,8 @@ _usage ()
echo " Default: ${iso_dirname}"
echo " -O Enable offline install."
echo " Default: '${enable_offline_install}'"
+ echo " -S Enable speech and braille."
+ echo " Default: '${enable_tts_brltty}'"
echo " -C Specify the pacman.conf file used for chroot install."
echo " Default: '${pacman_conf}'"
echo " -w <work_dir> Set the working directory"
@@ -205,6 +208,7 @@ make_customize_root_image() {
ISO_INIT="${iso_init}" \
ISO_GUI="${iso_gui}" \
ENABLE_OFFLINE_INSTALL="${enable_offline_install}" \
+ ENABLE_TTS_BRLTTY="${enable_tts_brltty}" \
setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} \
-C ${pacman_conf} \
-D ${iso_dirname} \
@@ -359,7 +363,7 @@ make_iso() {
## prepare state ##
# set CLI options
-while getopts 'E:T:V:L:D:OC:w:o:vh' arg; do
+while getopts 'E:T:V:L:D:OSC:w:o:vh' arg; do
case "${arg}" in
E) iso_edition="${OPTARG}" ;;
T) target="${OPTARG}" ;;
@@ -367,6 +371,7 @@ while getopts 'E:T:V:L:D:OC:w:o:vh' arg; do
L) iso_label="${OPTARG}" ;;
D) iso_dirname="${OPTARG}" ;;
O) enable_offline_install='true' offline_switch='-O' ;;
+ S) enable_tts_brltty='true' ;;
C) pacman_conf="${OPTARG}" ;;
w) work_dir="${OPTARG}" ;;
o) out_dir="${OPTARG}" ;;
diff --git a/configs/profile/rebuild.sh b/configs/profile/rebuild.sh
index 87c8143..416b947 100755
--- a/configs/profile/rebuild.sh
+++ b/configs/profile/rebuild.sh
@@ -11,6 +11,8 @@ readonly TARGET='dual' # dual-arch (default)
# readonly EDITION='OpenRC/LXDE' # OpenRC/LXDE init/WM-DE pair
readonly EDITION='SystemD/CLI' # SystemD/CLI init/WM-DE pair (default)
# readonly EDITION='SystemD/LXDE' # SystemD/LXDE init/WM-DE pair
+readonly TALKING='' # speech and braille disabled (default)
+# readonly TALKING='-S' # speech and braille enabled
readonly CACHE='' # net-install (default)
# readonly CACHE='-O' # offline install
readonly VERSION="`date +%Y.%m.%d`" # for ISO filename (default)
@@ -67,7 +69,7 @@ then rm work/build.make_customize_root_image_$TARGET \
fi
-CMD="./build.sh -v -E $EDITION -T $TARGET $CACHE -V $VERSION $*"
+CMD="./build.sh -v -E $EDITION -T $TARGET $TALKING $CACHE -V $VERSION $*"
if ${CMD}
then echo "success" ; rm ./continue.sh 2> /dev/null
else echo -e "failure executing:\n\t${CMD}\ncontinue with:\n\t./continue.sh [args-to-build.sh]"
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