summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2019-04-14 22:13:08 +0200
committer Eric Hameleers <alien@slackware.com>2019-04-14 22:13:08 +0200
commit1e4f3f38fb15dc789c13468683a87c3d7a8c41e4 (patch)
treee7cce0334bac94bf7fa59c8a9dfa2bcd37483af4
parentfd87a9d5bc3fe165d366059a648eadfbe30baf49 (diff)
downloadliveslak-1e4f3f38fb15dc789c13468683a87c3d7a8c41e4.tar.gz
liveslak-1e4f3f38fb15dc789c13468683a87c3d7a8c41e4.tar.xz
Add missing template vars to upslak.sh
Several template vars were added to liveinit.tpl but I had forgotten to also incorporate those in the upslak.sh script.
-rwxr-xr-xmake_slackware_live.sh3
-rw-r--r--upslak.sh12
2 files changed, 12 insertions, 3 deletions
diff --git a/make_slackware_live.sh b/make_slackware_live.sh
index a7d931b..f8cd8b7 100755
--- a/make_slackware_live.sh
+++ b/make_slackware_live.sh
@@ -2335,7 +2335,8 @@ fi
# Create an initrd for the generic kernel, using a modified init script:
echo "-- Creating initrd for kernel-generic $KVER ..."
chroot ${LIVE_ROOTDIR} /sbin/mkinitrd -c -w ${WAIT} -l us -o /boot/initrd_${KVER}.img -k ${KVER} -m ${KMODS} -L -C dummy 1>${DBGOUT} 2>${DBGOUT}
-# Modify the initrd content for the Live OS:
+# Modify the initrd content for the Live OS.
+# Note: 'upslak.sh' needs to be updated when this 'cat' command changes:
cat $LIVE_TOOLDIR/liveinit.tpl | sed \
-e "s/@LIVEMAIN@/$LIVEMAIN/g" \
-e "s/@MARKER@/$MARKER/g" \
diff --git a/upslak.sh b/upslak.sh
index f3ddb73..1af67fb 100644
--- a/upslak.sh
+++ b/upslak.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright 2017 Eric Hameleers, Eindhoven, NL
+# Copyright 2017, 2019 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -71,6 +71,9 @@ WAIT=-1
SUPPORTED=1
# Values obtained from the init script on the USB:
+DEF_KBD=""
+DEF_LOCALE=""
+DEF_TZ=""
DISTRO=""
LIVE_HOSTNAME=""
LIVEMAIN=""
@@ -78,6 +81,7 @@ LIVEUID=""
MARKER=""
MEDIALABEL=""
PERSISTENCE=""
+SQ_EXT_AVAIL=""
VERSION=""
# By default we make a backup of your old kernel/modules when adding new ones:
@@ -365,7 +369,7 @@ read_initrd() {
OLDWAIT=$(cat ./wait-for-root)
# Read the values of liveslak template variables in the init script:
- for TEMPLATEVAR in DISTRO LIVE_HOSTNAME LIVEMAIN LIVEUID MARKER MEDIALABEL PERSISTENCE VERSION ; do
+ for TEMPLATEVAR in DEF_KBD DEF_LOCALE DEF_TZ DISTRO LIVE_HOSTNAME LIVEMAIN LIVEUID MARKER MEDIALABEL PERSISTENCE SQ_EXT_AVAIL VERSION ; do
eval $(grep "^ *${TEMPLATEVAR}=" ./init |head -1)
done
@@ -542,6 +546,10 @@ parse_template() {
-e "s/@CDISTRO@/${DISTRO^}/g" \
-e "s/@UDISTRO@/${DISTRO^^}/g" \
-e "s/@VERSION@/${VERSION}/g" \
+ -e "s/@SQ_EXT_AVAIL@/${SQ_EXT_AVAIL}/g" \
+ -e "s,@DEF_KBD@,${DEF_KBD},g" \
+ -e "s,@DEF_LOCALE@,${DEF_LOCALE},g" \
+ -e "s,@DEF_TZ@,${DEF_TZ},g" \
> ${OUTFILE}
} # End of parse_template()