From 6d01738bd50d369ae95f71406fb8d84c06caafca Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Tue, 31 Mar 2020 13:10:21 +0200 Subject: Correctly read OS configuration from disk file if present Liveslak can optionally load a OS config file "@DISTRO@_os.cfg" from within the 'livemain' directory on the boot medium, which contains "VARIABLE=value" lines, where VARIABLE is one of the following variables: BLACKLIST, KEYMAP, LIVE_HOSTNAME, LOAD, LOCALE, LUKSVOL, NOLOAD, RUNLEVEL, TWEAKS, TZ, XKB. During boot, any variable from that file will be set in the boot environment if it has not yet been defined in the init script. You can prevent this behaviour by adding 'cfg=skip' to the boot commandline. --- liveinit.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/liveinit.tpl b/liveinit.tpl index 3ac0782..6b15131 100644 --- a/liveinit.tpl +++ b/liveinit.tpl @@ -759,8 +759,8 @@ if [ "$RESCUE" = "" ]; then BLACKLIST KEYMAP LIVE_HOSTNAME LOAD LOCALE LUKSVOL \ NOLOAD RUNLEVEL TWEAKS TZ XKB ; do - if [ -n "${LIVEPARM}" ]; then - eval $(grep -w ${LIVEPARM} /mnt/media/${LIVEMAIN}/${DISTROCFG}) + if [ -n "$(eval echo \$${LIVEPARM})" ]; then + eval $(grep -w ^${LIVEPARM} /mnt/media/${LIVEMAIN}/${DISTROCFG}) fi done fi -- cgit v1.2.3