aboutsummaryrefslogtreecommitdiffstats
path: root/make_slackware_live.sh
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2016-04-17 02:25:08 +0200
committer Eric Hameleers <alien@slackware.com>2016-04-17 02:25:08 +0200
commit1adfa329bd1a10ba89267ed3e5ed4b47b34a6f30 (patch)
treee11b352bc782ff3d06c391b55b8a2d3123a678b4 /make_slackware_live.sh
parent367bbd16d5cabb7da52f863ae78cf66c4d45e046 (diff)
downloadliveslak-1adfa329bd1a10ba89267ed3e5ed4b47b34a6f30.tar.gz
liveslak-1adfa329bd1a10ba89267ed3e5ed4b47b34a6f30.tar.xz
Add a post-install customization hook to 'setup2hd'.
A new file 'setup2hd.local' has been added to the liveslak sources. If you do not touch that one, it will be copied to: /usr/share/${LIVEMAIN}/setup2hd.$DISTRO.sample and serve as just that, a sample script. If on the other hand you rename the file to 'setup2hd.$DISTRO' before generating your ISO image ($DISTRO being the name of your own distro, like 'CINELIVE'), then this file will be installed in the ISO as /usr/share/${LIVEMAIN}/setup2hd.$DISTRO and this will be sourced by 'setup2hd' providing you a custom post-install customization hook for your own Live distro. Usage instructions are inside 'setup2hd.local'.
Diffstat (limited to 'make_slackware_live.sh')
-rwxr-xr-xmake_slackware_live.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/make_slackware_live.sh b/make_slackware_live.sh
index 7734675..b92465c 100755
--- a/make_slackware_live.sh
+++ b/make_slackware_live.sh
@@ -1138,6 +1138,29 @@ if [ -f ${LIVE_ROOTDIR}/boot/vmlinuz-huge-* ]; then
-e "s/@VERSION@/$VERSION/g" \
> ${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
+ # The '.local' suffix means: install it as a sample file only:
+ HOOK_SRC="${LIVE_TOOLDIR}/setup2hd.local"
+ 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".
+ HOOK_SRC="${LIVE_TOOLDIR}/setup2hd.$DISTRO"
+ HOOK_DST="${LIVE_ROOTDIR}/usr/share/${LIVEMAIN}/setup2hd.$DISTRO"
+ fi
+ cat ${HOOK_SRC} | 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" \
+ > ${HOOK_DST}
+ chmod 644 ${HOOK_DST}
fi
# Add the documentation: