summaryrefslogtreecommitdiff
path: root/configs/profile
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2019-12-29 04:27:51 -0500
committerbill-auger <mr.j.spam.me@gmail.com>2020-03-27 19:32:36 -0400
commit43e1c150f1a61d7d48ad22c1cf34018f42c7d19b (patch)
treedda4b488b373555d7e044379a13e1ec068f0e7b9 /configs/profile
parent0eddd34890ed4a88ecf65ee9f039540bcf363b9f (diff)
housekeeping
Diffstat (limited to 'configs/profile')
-rwxr-xr-xconfigs/profile/build.sh30
-rw-r--r--configs/profile/root-image/root/customize_root_image-constants.inc2
-rwxr-xr-xconfigs/profile/root-image/root/customize_root_image.sh4
3 files changed, 17 insertions, 19 deletions
diff --git a/configs/profile/build.sh b/configs/profile/build.sh
index ede1748..3ae1a61 100755
--- a/configs/profile/build.sh
+++ b/configs/profile/build.sh
@@ -28,7 +28,6 @@ iso_version=$(date +%Y.%m.%d)
iso_label="PARA_$(date +%Y%m)"
iso_dirname='parabola'
enable_offline_install='false'
-offline_switch=''
enable_tts_brltty='false'
pacman_conf_in=${releng_dir}/pacman.conf
work_dir=./work
@@ -60,7 +59,7 @@ _usage ()
echo " -D <iso_dirname> Set the name of the directory inside the ISO"
echo " Default: ${iso_dirname}"
echo " -O Enable offline install."
- echo " Default: '${enable_offline_install}'"
+ echo " Default: '' (net-install only)"
echo " -S Enable speech and braille."
echo " Default: '${enable_tts_brltty}'"
echo " -C Specify the pacman.conf file used for chroot install."
@@ -185,8 +184,8 @@ make_packages() {
if [[ "$enable_offline_install" == 'true' ]]; then
if [[ -n "${_cache_packages}" ]]; then
# download any cache packages and prune obsolete packages
- echo 'downloading "cach-only" packages'
- setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} -C ${pacman_conf} -D ${iso_dirname} -p "${_cache_packages}" ${offline_switch} cache
+ echo 'downloading "cache-only" packages'
+ setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} -C ${pacman_conf} -D ${iso_dirname} -p "${_cache_packages}" cache
fi
# create 'isorepo' for offline install
@@ -223,16 +222,15 @@ make_customize_root_image() {
cp -af ${releng_dir}/root-image ${work_dir}/${arch}
echo "Customizing root image"
- ISO_TITLE="${iso_title}" \
- 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} \
- ${offline_switch} \
- -r /root/customize_root_image.sh \
+ ISO_TITLE="${iso_title}" \
+ 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} \
+ -r /root/customize_root_image.sh \
run
rm ${work_dir}/${arch}/root-image/root/customize_root_image*
}
@@ -365,7 +363,7 @@ make_aitab() {
make_prepare() {
cp -a -l -f ${work_dir}/${arch}/root-image ${work_dir}/
setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/ -D ${iso_dirname} -C ${pacman_conf} pkglist
- setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/ -D ${iso_dirname} -C ${pacman_conf} ${offline_switch} prepare
+ setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/ -D ${iso_dirname} -C ${pacman_conf} prepare
rm -rf ${work_dir}/root-image
# rm -rf ${work_dir}/${arch}/root-image (if low space, this helps)
@@ -388,7 +386,7 @@ while getopts 'E:T:V:L:D:OSC:w:o:vh' arg; do
V) iso_version="${OPTARG}" ;;
L) iso_label="${OPTARG}" ;;
D) iso_dirname="${OPTARG}" ;;
- O) enable_offline_install='true' offline_switch='-O' ;;
+ O) enable_offline_install='true' ;;
S) enable_tts_brltty='true' ;;
C) pacman_conf_in="${OPTARG}" ;;
w) work_dir="${OPTARG}" ;;
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 9831e0f..a3c992e 100644
--- a/configs/profile/root-image/root/customize_root_image-constants.inc
+++ b/configs/profile/root-image/root/customize_root_image-constants.inc
@@ -81,7 +81,7 @@ 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 TITLE_REGEX="^(.+) - (.+) (.+)"
+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]}"
diff --git a/configs/profile/root-image/root/customize_root_image.sh b/configs/profile/root-image/root/customize_root_image.sh
index 32bca8b..8c2c066 100755
--- a/configs/profile/root-image/root/customize_root_image.sh
+++ b/configs/profile/root-image/root/customize_root_image.sh
@@ -39,8 +39,8 @@ then # delete files that are specific to other init systems
for service in ${OPENRC_SERVICES} ; do rc-update add ${service} default ; done ;
# create the 'dbus' group and user if they do not exist
- if ! grep 'dbus' /etc/group > /dev/null ; then groupadd -g 81 dbus ; fi ;
- if ! grep 'dbus' /etc/passwd > /dev/null ; then useradd -r -s /sbin/nologin -u 81 -g 81 dbus ; fi ;
+ if ! grep -q 'dbus' /etc/group ; then groupadd -g 81 dbus ; fi ;
+ if ! grep -q 'dbus' /etc/passwd ; then useradd -r -s /sbin/nologin -u 81 -g 81 dbus ; fi ;
elif [[ "${ISO_INIT}" == 'systemd' ]]
then # delete files that are specific to other init systems