From: Plom Heller Date: Mon, 7 Sep 2026 04:48:42 +0000 (+0200) Subject: Move TO_INSTALL into dedicated config file. X-Git-Url: https://plomlompom.com/repos/booking/test.html?a=commitdiff_plain;h=c2ac0d5cf163ab13b2137222cb081120f1f0d09f;p=confplom Move TO_INSTALL into dedicated config file. --- diff --git a/setup_scripts/packages_root.conf b/setup_scripts/packages_root.conf new file mode 100644 index 0000000..766e60b --- /dev/null +++ b/setup_scripts/packages_root.conf @@ -0,0 +1,11 @@ +# Packages installed by start_root.sh via apt-get. +# One package per line; blank lines and lines starting with "#" are ignored. +ack +man-db +ntpsec-ntpdate +sudo +sway +tlp +vim-gtk3 +wmenu +xwayland diff --git a/setup_scripts/start_root.sh b/setup_scripts/start_root.sh index 94e9ca3..4bed8db 100755 --- a/setup_scripts/start_root.sh +++ b/setup_scripts/start_root.sh @@ -8,9 +8,9 @@ PATH_TLP_THRESH_CONF=/etc/tlp.conf.d/60-thresholds.conf PATH_UDEV_RULES=/etc/udev/rules.d # constants we might want to change at some point +FNAME_PACKAGES=packages_root.conf FNAME_UDEV_RULES_BACKLIGHT=90-backlight.rules LOCALE=C.UTF-8 -TO_INSTALL="ack man-db ntpsec-ntpdate sudo sway tlp vim-gtk3 wmenu xwayland" USERNAME=plom PRINTK_LEVELS="4 4 1 7" TLP_THRESH_START=40 @@ -19,6 +19,16 @@ TLP_THRESH_STOP=80 # constants derived from changeables PATH_TO_COPY="${PATH_REPO}/to_copy" +# Assumes FNAME_PACKAGES ends with a newline, has no blank lines, and its +# package-name lines contain no whitespace besides that newline. +TO_INSTALL= +while read -r LINE; do + case "${LINE}" in + '#'*) continue ;; + esac + TO_INSTALL="${TO_INSTALL} ${LINE}" +done < "${FNAME_PACKAGES}" + msg 'Ensuring packages: %s' "${TO_INSTALL}" apt-get -y update apt-get -y install ${TO_INSTALL}