X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=fuel%2Fprototypes%2Flibvirt%2Fdeploy%2Ffunctions%2Fpatch-iso.sh;fp=fuel%2Fprototypes%2Flibvirt%2Fdeploy%2Ffunctions%2Fpatch-iso.sh;h=0000000000000000000000000000000000000000;hb=0bf60004aea7359f10efc6d0133c88e5c4f40dda;hp=782737e0d94e3f10ad2789a0b5e7b700b480ba03;hpb=e2b2d46756213fde3bca42a49b04e6a1e8792498;p=genesis.git diff --git a/fuel/prototypes/libvirt/deploy/functions/patch-iso.sh b/fuel/prototypes/libvirt/deploy/functions/patch-iso.sh deleted file mode 100755 index 782737e..0000000 --- a/fuel/prototypes/libvirt/deploy/functions/patch-iso.sh +++ /dev/null @@ -1,69 +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 -############################################################################## - -# This is a temporary script - this should be rolled into a separate -# build target "make ci-iso" instead! - -exit_handler() { - rm -Rf $tmpnewdir - fusermount -u $tmporigdir 2>/dev/null - test -d $tmporigdir && mdir $tmporigdir -} - -trap exit_handler exit - -error_exit() { - echo "$@" - exit 1 -} - - -top=$(cd `dirname $0`; pwd) -origiso=$(cd `dirname $1`; echo `pwd`/`basename $1`) -newiso=$(cd `dirname $2`; echo `pwd`/`basename $2`) -tmpdir=$3 -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 $tmporigdir $tmpnewdir -mkdir -p $tmporigdir $tmpnewdir -fuseiso $origiso $tmporigdir || error_exit "Failed fuseiso" -cd $tmporigdir -find . | cpio -pd $tmpnewdir -cd $tmpnewdir -fusermount -u $tmporigdir -rmdir $tmporigdir -chmod -R 755 $tmpnewdir - -echo "Patching..." -cd $tmpnewdir -# Patch ISO to make it suitable for automatic deployment -cat $top/ks.cfg.patch | patch -p0 || error_exit "Failed patch 1" -cat $top/isolinux.cfg.patch | patch -p0 || error_exit "Failed patch 2" -rm -rf .rr_moved - -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" -