From 095442c4bdf437531eae2aecd364e74d756757fd Mon Sep 17 00:00:00 2001 From: "Stefan K. Berg" Date: Thu, 19 Nov 2015 13:39:59 +0100 Subject: Cleaning up the experimental branch Should not be used any more! Change-Id: I38fd1ea34aaa12c5d7d060bca47d1866bc97d185 Signed-off-by: Stefan K. Berg --- .../auto-deploy/deploy/functions/patch-iso.sh | 85 ---------------------- 1 file changed, 85 deletions(-) delete mode 100755 fuel/prototypes/auto-deploy/deploy/functions/patch-iso.sh (limited to 'fuel/prototypes/auto-deploy/deploy/functions/patch-iso.sh') diff --git a/fuel/prototypes/auto-deploy/deploy/functions/patch-iso.sh b/fuel/prototypes/auto-deploy/deploy/functions/patch-iso.sh deleted file mode 100755 index d27dcdf2d..000000000 --- a/fuel/prototypes/auto-deploy/deploy/functions/patch-iso.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/bash -############################################################################## -# Copyright (c) 2015 Ericsson AB and others. -# stefan.k.berg@ericsson.com -# jonas.bjurel@ericsson.com -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -exit_handler() { - rm -Rf $tmpnewdir - fusermount -u $tmporigdir 2>/dev/null - test -d $tmporigdir && rmdir $tmporigdir -} - -trap exit_handler exit - -error_exit() { - echo "$@" - exit 1 -} - -if [ $# -ne 8 ]; then - error_exit "Input argument error" -fi - -top=$(cd `dirname $0`; pwd) -origiso=$(cd `dirname $1`; echo `pwd`/`basename $1`) -newiso=$(cd `dirname $2`; echo `pwd`/`basename $2`) -tmpdir=$3 -fuelIp=$4 -fuelNetmask=$5 -fuelGateway=$6 -fuelHostname=$7 -fuelDns=$8 - -tmporigdir=${tmpdir}/origiso -tmpnewdir=${tmpdir}/newiso - -test -f $origiso || error_exit "Could not find origiso $origiso" -test -d $tmpdir || error_exit "Could not find tmpdir $tmpdir" - - -if [ "`whoami`" != "root" ]; then - error_exit "You need be root to run this script" -fi - -echo "Copying..." -rm -Rf $tmpnewdir || error_exit "Failed deleting old ISO copy dir" -mkdir -p $tmporigdir $tmpnewdir -fuseiso $origiso $tmporigdir || error_exit "Failed to FUSE mount ISO" -cd $tmporigdir -find . | cpio -pd $tmpnewdir || error_exit "Failed to copy FUSE ISO with cpio" -cd $tmpnewdir -fusermount -u $tmporigdir || error_exit "Failed to FUSE unmount ISO" -rmdir $tmporigdir || error_exit "Failed to delete original FUSE ISO directory" -chmod -R 755 $tmpnewdir || error_exit "Failed to set protection on new ISO dir" - -echo "Patching..." -cd $tmpnewdir -# Patch ISO to make it suitable for automatic deployment -cat $top/ks.cfg.patch | patch -p0 || error_exit "Failed patching ks.cfg" -rm -rf .rr_moved - -# Add dynamic Fuel content -echo "isolinux.cfg before: `grep netmask isolinux/isolinux.cfg`" -sed -i "s/ ip=[^ ]*/ ip=$fuelIp/" isolinux/isolinux.cfg -sed -i "s/ gw=[^ ]*/ gw=$fuelGateway/" isolinux/isolinux.cfg -sed -i "s/ dns1=[^ ]*/ dns1=$fuelDns/" isolinux/isolinux.cfg -sed -i "s/ netmask=[^ ]*/ netmask=$fuelNetmask/" isolinux/isolinux.cfg -sed -i "s/ hostname=[^ ]*/ hostname=$fuelHostname/" isolinux/isolinux.cfg -sed -i "s/ showmenu=[^ ]*/ showmenu=yes/" isolinux/isolinux.cfg -echo "isolinux.cfg after: `grep netmask isolinux/isolinux.cfg`" - -rm -vf $newiso -echo "Creating iso $newiso" -mkisofs -quiet -r \ - -J -R -b isolinux/isolinux.bin \ - -no-emul-boot \ - -boot-load-size 4 -boot-info-table \ - --hide-rr-moved \ - -x "lost+found" -o $newiso . || error_exit "Failed making iso" - -- cgit 1.2.3-korg