diff options
author | Eric Hameleers <alien@slackware.com> | 2017-01-23 00:08:44 +0100 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2017-01-23 00:08:44 +0100 |
commit | 7943f1023432077865e2d1fee0300e9743253346 (patch) | |
tree | 4e5b822519ea4fe6595d8b571701be8b89cfb9c4 | |
parent | 713a6fc0454e470c1bea9df56625b382a30a6f28 (diff) | |
download | liveslak-7943f1023432077865e2d1fee0300e9743253346.tar.gz liveslak-7943f1023432077865e2d1fee0300e9743253346.tar.xz |
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'.
Diffstat (limited to '')
-rwxr-xr-x | make_slackware_live.sh | 18 |
1 files changed, 16 insertions, 2 deletions
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 |