echo "Using snippet $authkeys_snippet"
$SNIPPET($authkeys_snippet)
+#set $tweak_systemd_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.060.tweak_systemd.sh"
+echo
+echo "Using snippet $tweak_systemd_snippet"
+$SNIPPET($tweak_systemd_snippet)
+
+#set $tweak_grub_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.070.tweak_grub.sh"
+echo
+echo "Using snippet $tweak_grub_snippet"
+$SNIPPET($tweak_grub_snippet)
+
%end
--- /dev/null
+## !/bin/bash
+#raw
+
+#-----------------------------------------------------------
+tweak_systemd() {
+
+ echo
+ echo "${HASH_LINE}"
+ echo
+ log "Tweaking systemd ..."
+
+ local sdir="/etc/systemd/system"
+ local getty_dir_tgt="${sdir}/getty.target.wants"
+ local getty_dir_at="${sdir}/getty@.service.d"
+ local getty_svc="/usr/lib/systemd/system/getty@.service"
+ local i=
+ local glink=
+
+ mkdir -pv "${getty_dir_at}"
+ echo "Generating ${getty_dir_at}/noclear.conf ..."
+ cat <<-EOF >"${getty_dir_at}/noclear.conf"
+ [Service]
+ TTYVTDisallocate=no
+ EOF
+
+ for i in 2 3 4 ; do
+ glink="${getty_dir_tgt}/gett@tty${i}.service"
+ ln -sv "${getty_svc}" "${glink}"
+ done
+
+}
+
+
+#end raw
+## vim: ts=4 et list
--- /dev/null
+## !/bin/bash
+#raw
+
+#-----------------------------------------------------------
+tweak_grub() {
+
+ local grub_cfg="/etc/default/grub"
+ if [[ -f "${grub_cfg}" ]] ; then
+
+ echo
+ echo "${HASH_LINE}"
+ echo
+ log "Tweaking '${grub_cfg}' ..."
+
+ echo "Selecting entry in /etc/grub2.cfg ..."
+ awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
+ grub2-set-default 0
+ grub2-editenv list
+
+ echo "Removing quiet from '${grub_cfg}' ..."
+ sed --in-place -e 's/^\(GRUB_CMDLINE_LINUX=.*\)[ ]quiet\(.*\)/\1\2/' "${grub_cfg}"
+
+ echo "Removing rhgb (RedHat Graphical Boot) from '${grub_cfg}' ..."
+ sed --in-place -e 's/^\(GRUB_CMDLINE_LINUX=.*\)[ ]rhgb\(.*\)/\1\2/' "${grub_cfg}"
+
+ echo "Recreating /boot/grub2/grub.cfg ..."
+ grub2-mkconfig -o /boot/grub2/grub.cfg
+
+ fi
+
+}
+tweak_grub
+
+#end raw
+## vim: ts=4 et list