[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] [libvirt-test-API] fix indent issue in ksiso.sh.



we use 4 spaces for the indention in Shell codes.
fix the uncompliance in ksiso.sh.

Signed-off-by: Qing Lin<qinglbj linux vnet ibm com>
---
 utils/ksiso.sh |   51 +++++++++++++++++++++++++++------------------------
 1 files changed, 27 insertions(+), 24 deletions(-)

diff --git a/utils/ksiso.sh b/utils/ksiso.sh
index a431658..111be6b 100755
--- a/utils/ksiso.sh
+++ b/utils/ksiso.sh
@@ -26,37 +26,40 @@ umount $boot_iso_dir
 vlmid=`isoinfo -d -i $boot_iso |grep 'Volume id:'`
 vlmid=${vlmid#"Volume id: "}
 if [ -n "`echo $vlmid|grep ppc`" ];then
-       echo "- edit yaboot.conf and add kickstart entry"
-       WORKING_ISO="${custom_iso_dir}/etc/yaboot.conf"
-       # change timeout and  add kickstart entry
-       TIMEOUT_LINE=`cat $WORKING_ISO | grep timeout | head -1`
-       APPEND_LINE=`cat $WORKING_ISO | grep append | head -1`
-       cat $WORKING_ISO | sed "s#${TIMEOUT_LINE}#timeout=5#" | sed "s#${APPEND_LINE}#append= \"root=live:CDLABEL=$vlmid ks=cdrom:/$kscfg \"#">  isocfgtmp
-       mv -f isocfgtmp $WORKING_ISO
-       cd $custom_iso_dir
-       mkisofs -R -V "$vlmid" -sysid PPC -chrp-boot -U -prep-boot ppc/chrp/yaboot -hfs-bless ppc/mac -no-desktop -allow-multidot -volset 4 -volset-size 1 -volset-seqno 1 -hfs-volid 4 -o $cwd/$custom_iso .
+    echo "- copy kickstart to custom work directory"
+    cp $kscfg $custom_iso_dir
+
+    echo "- edit yaboot.conf and add kickstart entry"
+    WORKING_ISO="${custom_iso_dir}/etc/yaboot.conf"
+    # change timeout and  add kickstart entry
+    TIMEOUT_LINE=`cat $WORKING_ISO | grep timeout | head -1`
+    APPEND_LINE=`cat $WORKING_ISO | grep append | head -1`
+    cat $WORKING_ISO | sed "s#${TIMEOUT_LINE}#timeout=5#" | sed "s#${APPEND_LINE}#append= \"root=live:CDLABEL=$vlmid ks=cdrom:/$kscfg \"#">  isocfgtmp
+    mv -f isocfgtmp $WORKING_ISO
+    cd $custom_iso_dir
+    mkisofs -R -V "$vlmid" -sysid PPC -chrp-boot -U -prep-boot ppc/chrp/yaboot -hfs-bless ppc/mac -no-desktop -allow-multidot -volset 4 -volset-size 1 -volset-seqno 1 -hfs-volid 4 -o $cwd/$custom_iso .
 else
-       echo "- copy kickstart to custom work directory"
-       cp $kscfg $custom_iso_dir
+    echo "- copy kickstart to custom work directory"
+    cp $kscfg $custom_iso_dir
 
-       echo "- edit isolinux.cfg and add kickstart entry"
-       WORKING_ISO="${custom_iso_dir}/isolinux/isolinux.cfg"
+    echo "- edit isolinux.cfg and add kickstart entry"
+    WORKING_ISO="${custom_iso_dir}/isolinux/isolinux.cfg"
 
-       echo "label custom_ks
-         kernel vmlinuz $kernel_args
-         append initrd=initrd.img ks=cdrom:/$kscfg ramdisk_size=20000">>  $WORKING_ISO
+    echo "label custom_ks
+      kernel vmlinuz $kernel_args
+      append initrd=initrd.img ks=cdrom:/$kscfg ramdisk_size=20000">>  $WORKING_ISO
 
-       # change default boot target and timeout
-       DEFAULT_LINE=`cat $WORKING_ISO | grep default | head -1`
-       TIMEOUT_LINE=`cat $WORKING_ISO | grep timeout | head -1`
+    # change default boot target and timeout
+    DEFAULT_LINE=`cat $WORKING_ISO | grep default | head -1`
+    TIMEOUT_LINE=`cat $WORKING_ISO | grep timeout | head -1`
 
-       cat $WORKING_ISO | sed "s/${DEFAULT_LINE}/default custom_ks/" | sed "s/${TIMEOUT_LINE}/timeout 5/">  isocfgtmp
+    cat $WORKING_ISO | sed "s/${DEFAULT_LINE}/default custom_ks/" | sed "s/${TIMEOUT_LINE}/timeout 5/">  isocfgtmp
 
-       mv -f isocfgtmp $WORKING_ISO
+    mv -f isocfgtmp $WORKING_ISO
 
-       # cd to custom_iso_dir, otherwise mkisofs seems to bomb...
-       cd $custom_iso_dir
-       mkisofs -R -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -o $cwd/$custom_iso .
+    # cd to custom_iso_dir, otherwise mkisofs seems to bomb...
+    cd $custom_iso_dir
+    mkisofs -R -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -o $cwd/$custom_iso .
 fi
 EXITVAL=$?
 if [ $EXITVAL -ne '0' ] ; then
-- 
1.7.4.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]