From 70b689e6bf00338f55ae2daf1c2d0c2d972e00e8 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Mon, 5 Oct 2020 15:34:46 +0200 Subject: setup2hd: add option to install regular Slackware via network mirror The setup2hd script is a modified Slackware installer. For liveslak I had originally removed all the usual SOURCE selections and only allowed for the installation of the Live OS to harddisk. However, requests were sent to also support a regular installation of Slackware using the Live ISO. That is why I have now re-added all the Slackware network install choices (via NFS, HTTP, FTP or Samba mirror). I still left out the Slackware installation using local media; the Live ISO does not contain regular Slackware packages so that would not make sense. --- make_slackware_live.sh | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'make_slackware_live.sh') diff --git a/make_slackware_live.sh b/make_slackware_live.sh index a829d7b..fca54ef 100755 --- a/make_slackware_live.sh +++ b/make_slackware_live.sh @@ -1660,14 +1660,15 @@ cat ${LIVE_TOOLDIR}/pxeserver.tpl | sed \ > ${LIVE_ROOTDIR}/usr/local/sbin/pxeserver chmod 755 ${LIVE_ROOTDIR}/usr/local/sbin/pxeserver -# Only when we find a huge kernel, we will add a harddisk installer -# to the ISO. The huge kernel does not require an initrd and installation -# to the hard drive will not be complicated. -if ls ${LIVE_ROOTDIR}/boot/vmlinuz-huge-* 1>/dev/null 2>/dev/null; then - if [ -f ${DEF_SL_PKGROOT}/../isolinux/initrd.img ]; then +# Add a harddisk installer to the ISO. +# The huge kernel does not require an initrd and installation to the +# hard drive will not be complicated, so a liveslak install is recommended +# for newbies only if the ISO contains huge kernel... +if [ -f ${DEF_SL_PKGROOT}/../isolinux/initrd.img ]; then + echo "-- Adding 'setup2hd' hard disk installer to /usr/share/${LIVEMAIN}/." # Extract the 'setup' files we need from the Slackware installer # and move them to a single directory in the ISO: - mkdir -p ${LIVE_ROOTDIR}/usr/share/${LIVEMAIN} + mkdir -p ${LIVE_ROOTDIR}/usr/share/${LIVEMAIN} cd ${LIVE_ROOTDIR}/usr/share/${LIVEMAIN} uncompressfs ${DEF_SL_PKGROOT}/../isolinux/initrd.img | cpio -i -d -m -H newc usr/lib/setup/* sbin/probe sbin/fixdate mv -i usr/lib/setup/* sbin/probe sbin/fixdate . @@ -1721,13 +1722,18 @@ if ls ${LIVE_ROOTDIR}/boot/vmlinuz-huge-* 1>/dev/null 2>/dev/null; then # 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 scripts: - for USCRIPT in SeTuacct SeTudiskpart SeTupass ; do - cat ${LIVE_TOOLDIR}/${USCRIPT}.tpl | sed \ + for USCRIPT in SeTuacct SeTudiskpart SeTumedia SeTupass setup.liveslak setup.slackware ; do + cat ${LIVE_TOOLDIR}/setup2hd/${USCRIPT}.tpl | sed \ + -e "s/@DIRSUFFIX@/$DIRSUFFIX/g" \ -e "s/@DISTRO@/$DISTRO/g" \ -e "s/@CDISTRO@/${DISTRO^}/g" \ -e "s/@UDISTRO@/${DISTRO^^}/g" \ + -e "s/@KVER@/$KVER/g" \ -e "s/@LIVEDE@/$LIVEDE/g" \ + -e "s/@LIVEMAIN@/$LIVEMAIN/g" \ + -e "s/@MARKER@/$MARKER/g" \ -e "s/@SL_VERSION@/$SL_VERSION/g" \ + -e "s/@VERSION@/$VERSION/g" \ > ${LIVE_ROOTDIR}/usr/share/${LIVEMAIN}/${USCRIPT} chmod 755 ${LIVE_ROOTDIR}/usr/share/${LIVEMAIN}/${USCRIPT} done @@ -1746,9 +1752,9 @@ if ls ${LIVE_ROOTDIR}/boot/vmlinuz-huge-* 1>/dev/null 2>/dev/null; then > ${LIVE_ROOTDIR}/usr/local/sbin/setup2hd chmod 755 ${LIVE_ROOTDIR}/usr/local/sbin/setup2hd # Slackware Live HD post-install customization hook: - if [ -f ${LIVE_TOOLDIR}/setup2hd.local ]; then + if [ -f ${LIVE_TOOLDIR}/setup2hd.local.tpl ]; then # The '.local' suffix means: install it as a sample file only: - HOOK_SRC="${LIVE_TOOLDIR}/setup2hd.local" + HOOK_SRC="${LIVE_TOOLDIR}/setup2hd.local.tpl" HOOK_DST="${LIVE_ROOTDIR}/usr/share/${LIVEMAIN}/setup2hd.$DISTRO.sample" elif [ -f ${LIVE_TOOLDIR}/setup2hd.$DISTRO ]; then # Install the hook; the file will be sourced by "setup2hd". @@ -1770,7 +1776,6 @@ if ls ${LIVE_ROOTDIR}/boot/vmlinuz-huge-* 1>/dev/null 2>/dev/null; then chmod 644 ${HOOK_DST} else echo "-- Could not find ${DEF_SL_PKGROOT}/../isolinux/initrd.img - not adding 'setup2hd'!" - fi fi # Add the documentation: -- cgit v1.2.3