[boot-script] add hack to be sure no salt-call is running.
This is an ugly workaround. But until something better is found, this is necessary to make sure the program runs at boot in automatic mode
(closes #149110)
--- a/others/rc.local Thu Jun 27 15:44:51 2013 +0200
+++ b/others/rc.local Tue Nov 26 13:58:51 2013 +0100
@@ -18,9 +18,19 @@
## get updated code if necessary
for i in `seq 3`
do
+ while [ `pgrep -c salt-call` -ne 0 ]
+ do
+ sleep 1
+ done
+ ## wait until salt-call is not running any longer
salt-call --no-color state.highstate | tee -a /var/log/ami-creator.log > /dev/console 2>&1
done
+while [ `pgrep -c salt-call` -ne 0 ]
+do
+ sleep 1
+done
+## wait until salt-call is not running any longer
## download, untar, resize and mount
## update modify image depending on variation.sls file
salt-call --no-color state.sls ami_creator | tee -a /var/log/ami-creator.log > /dev/console 2>&1