From 7943f1023432077865e2d1fee0300e9743253346 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Mon, 23 Jan 2017 00:08:44 +0100 Subject: setup2hd: more polishing of the Slackware installer scripts. Hard-coded '/mnt' in the Slackware installer scripts is an ongoing annoyance. With the modifications in this commit I was able to successfully install Slackware Live to a UEFI computer using 'setup2hd'. --- make_slackware_live.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'make_slackware_live.sh') diff --git a/make_slackware_live.sh b/make_slackware_live.sh index b90c8b7..90c55f3 100755 --- a/make_slackware_live.sh +++ b/make_slackware_live.sh @@ -1345,16 +1345,30 @@ if ls ${LIVE_ROOTDIR}/boot/vmlinuz-huge-* 1>/dev/null 2>/dev/null; then uncompressfs ${DEF_SL_PKGROOT}/../isolinux/initrd.img | cpio -i -d -H newc --no-absolute-filenames usr/lib/setup/* sbin/probe sbin/fixdate mv -i usr/lib/setup/* sbin/probe sbin/fixdate . rm -r usr sbin + rm -f setup cd - 1>/dev/null # Fix some occurrences of '/mnt' that should not be used in the Live ISO: - sed -i -e 's, /mnt, ${T_PX},g' -e 's,=/mnt/,=${T_PX}/,g' -e 's,T_PX=/mnt,T_PX=/setup2hd,g' ${LIVE_ROOTDIR}/usr/share/${LIVEMAIN}/* + sed -i -e 's, /mnt, ${T_PX},g' -e 's,=/mnt$,=${T_PX},g' -e 's,=/mnt/,=${T_PX}/,g' -e 's,T_PX=/mnt,T_PX="`cat $TMP/SeTT_PX`",g' ${LIVE_ROOTDIR}/usr/share/${LIVEMAIN}/* + # If T_PX is used in a script, it should be defined first: + for FILE in ${LIVE_ROOTDIR}/usr/share/${LIVEMAIN}/* ; do + if grep -q T_PX $FILE ; then + if ! grep -q "^T_PX=" $FILE ; then + if ! grep -q "^TMP=" $FILE ; then + sed -e '/#!/a T_PX="`cat $TMP/SeTT_PX`"' -i $FILE + sed -e '/#!/a TMP=/var/log/setup/tmp' -i $FILE + else + sed -e '/^TMP=/a T_PX="`cat $TMP/SeTT_PX`"' -i $FILE + fi + fi + fi + done if [ -f ${LIVE_ROOTDIR}/sbin/liloconfig ]; then patch ${LIVE_ROOTDIR}/sbin/liloconfig ${LIVE_TOOLDIR}/patches/liloconfig.patch fi if [ -f ${LIVE_ROOTDIR}/usr/sbin/eliloconfig ]; then patch ${LIVE_ROOTDIR}/usr/sbin/eliloconfig ${LIVE_TOOLDIR}/patches/eliloconfig.patch fi - # Fix some occurrences of '/usr/lib/setup/' are covered by $PATH: + # Fix some occurrences of '/usr/lib/setup/' that are covered by $PATH: sed -i -e 's,/usr/lib/setup/,,g' -e 's,:/usr/lib/setup,:/usr/share/${LIVEMAIN},g' ${LIVE_ROOTDIR}/usr/share/${LIVEMAIN}/* # Add the Slackware Live HD installer: mkdir -p ${LIVE_ROOTDIR}/usr/local/sbin -- cgit v1.2.3