seperated conf generation and image generation
authorPravin Shinde <pravin@black-perl.(none)>
Mon, 27 Jul 2009 17:25:06 +0000 (19:25 +0200)
committerPravin Shinde <pravin@black-perl.(none)>
Mon, 27 Jul 2009 17:25:06 +0000 (19:25 +0200)
configure_BKO.sh [new file with mode: 0755]
deploy.sh
deploy_BKO.sh

diff --git a/configure_BKO.sh b/configure_BKO.sh
new file mode 100755 (executable)
index 0000000..5662c9b
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/bash
+set -e
+
+source ./configure
+
+remove_temp () {
+    rm -f list_bko_tmpl_files list_conf_files tempcopy
+}
+
+replace_placeholder_with_data ()
+{
+    regular_expression=`echo "s/$2/$3/g"`
+    echo "Substituting $2 URL by [$regular_expression]..."
+    for line in `cat $1` 
+    do
+#       echo "Processing file $line"
+        perl -p -i -e "$regular_expression" $line
+    done
+}
+
+remove_temp
+echo "Finding files to process"
+find ./ -name "*.bko.tmpl" 2> /dev/null 1> ./list_bko_tmpl_files || :
+cp list_bko_tmpl_files list_conf_files
+echo "processing files"
+perl -p -i -e 's/.bko.tmpl/.conf/g' list_conf_files
+paste list_bko_tmpl_files list_conf_files -d'|' > tempcopy
+
+echo "copying files..."
+for line in `cat ./tempcopy` 
+do
+#    echo "line is [$line]"
+    cp -f `echo $line | cut -d'|' -f1` `echo $line | cut -d'|' -f2`
+done
+
+replace_placeholder_with_data ./list_conf_files "P_ISO_LOCATION_LOCAL" $ISO_LOCATION_LOCAL 
+replace_placeholder_with_data ./list_conf_files "P_ISO_LOCATION_US" $ISO_LOCATION_US
+replace_placeholder_with_data ./list_conf_files "P_ISO_LOCATION_EU" $ISO_LOCATION_EU
+replace_placeholder_with_data ./list_conf_files "P_ISCSI_LOCATION_LOCAL" $ISCSI_LOCATION_LOCAL
+
+remove_temp
+
+echo "Done with configuration of BKO"
index 7bb558f..101634b 100755 (executable)
--- a/deploy.sh
+++ b/deploy.sh
@@ -1,5 +1,6 @@
 #!/bin/bash
 set -e
 ./deploy_gpxe.sh
+./configure_BKO.sh
 ./deploy_BKO.sh
 
index 04b012b..32da6dd 100755 (executable)
@@ -1,45 +1,6 @@
 #!/bin/bash
 set -e
 
-source ./configure
-
-remove_temp () {
-    rm -f list_bko_tmpl_files list_conf_files tempcopy
-}
-
-replace_placeholder_with_data ()
-{
-    regular_expression=`echo "s/$2/$3/g"`
-    echo "Substituting $2 URL by [$regular_expression]..."
-    for line in `cat $1` 
-    do
-#       echo "Processing file $line"
-        perl -p -i -e "$regular_expression" $line
-    done
-}
-
-remove_temp
-echo "Finding files to process"
-find ./ -name "*.bko.tmpl" 2> /dev/null 1> ./list_bko_tmpl_files || :
-cp list_bko_tmpl_files list_conf_files
-echo "processing files"
-perl -p -i -e 's/.bko.tmpl/.conf/g' list_conf_files
-paste list_bko_tmpl_files list_conf_files -d'|' > tempcopy
-
-echo "copying files..."
-for line in `cat ./tempcopy` 
-do
-#    echo "line is [$line]"
-    cp -f `echo $line | cut -d'|' -f1` `echo $line | cut -d'|' -f2`
-done
-
-replace_placeholder_with_data ./list_conf_files "P_ISO_LOCATION_LOCAL" $ISO_LOCATION_LOCAL 
-replace_placeholder_with_data ./list_conf_files "P_ISO_LOCATION_US" $ISO_LOCATION_US
-replace_placeholder_with_data ./list_conf_files "P_ISO_LOCATION_EU" $ISO_LOCATION_EU
-replace_placeholder_with_data ./list_conf_files "P_ISCSI_LOCATION_LOCAL" $ISCSI_LOCATION_LOCAL
-
-remove_temp
-
 cd pxeknife
 echo "Creating customized initrd image for DSL .."
 cd dsl/