From ed775158f37a8803682b9d060263e6fb8a5a2e0c Mon Sep 17 00:00:00 2001 From: Rene Rebe Date: Mon, 1 Dec 2003 18:56:21 +0000 Subject: [PATCH] a new SCRIPT tag support - adds the possibility of ISO post-processing like needed for the rs6k boot ISO stuff ... git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1889 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- scripts/Create-ISO | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/scripts/Create-ISO b/scripts/Create-ISO index 2034ca219..d68353080 100755 --- a/scripts/Create-ISO +++ b/scripts/Create-ISO @@ -13,6 +13,11 @@ # If you want to add multiple 'BOOT' lines, use the tag-name 'BOOTx' for # the 2nd and all further lines. # +# SCRIPT script-name Run given script on each image +# +# Intended for image post-processing - like needed for IBM RS/6k boot +# blessing. The first argument is the CD number - the second the image file. +# if [ $# -eq 0 ] ; then echo @@ -88,6 +93,7 @@ add() { } bootoptions="" +scripts="" while read tag data ; do if [ $tag = BOOT ] ; then if [ "$bootoptions" ] ; then @@ -96,6 +102,8 @@ while read tag data ; do else bootoptions="$data" fi + elif [ $tag = SCRIPT ] ; then + scritps="$scripts '$data'" fi done < $dat while read tag data ; do @@ -204,7 +212,14 @@ for x in $disks ; do -P 'The ROCK Linux Project - http://www.rocklinux.org' \ $bootoptions -graft-points disk$x.txt=$dat $disk_0_data ${!dd} bootoptions="" - + + if [ "$scripts" ] ; then + echo "Running post-processing scripts on image ..." + for script in $scripts ; do + sh $script $x ${isoprefix}_cd$x.iso + done + fi + if [ "$mkdebug" = 1 ] ; then cat > ${isoprefix}_loop$x.sh << EOT #!/bin/sh