summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-support/deploychef/files/run-postinsts
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openstack/recipes-support/deploychef/files/run-postinsts')
-rw-r--r--meta-openstack/recipes-support/deploychef/files/run-postinsts38
1 files changed, 4 insertions, 34 deletions
diff --git a/meta-openstack/recipes-support/deploychef/files/run-postinsts b/meta-openstack/recipes-support/deploychef/files/run-postinsts
index 35d46f0..737012d 100644
--- a/meta-openstack/recipes-support/deploychef/files/run-postinsts
+++ b/meta-openstack/recipes-support/deploychef/files/run-postinsts
@@ -25,40 +25,10 @@
25# to run the posinstall script and start the services 25# to run the posinstall script and start the services
26# 26#
27# 27#
28RPM_POSTINSTS_DIR=$1 28source /opt/deploychef/deploychef-inc
29LOG_DIR='/var/log/%PACKAGE_NAME%/' 29#Run postinsts scripts
30mkdir -p $LOG_DIR 30execute_all_postinsts
31if [ ! -d $RPM_POSTINSTS_DIR ]; then
32 echo "Post Install script dir not set"
33 exit 1
34fi
35cd / #work-around for cinder-volume config file location
36echo "x$RPM_POSTINSTS_DIR" > "$LOD_DIR"log.run-postinsts
37for i in `ls $RPM_POSTINSTS_DIR 2> /dev/null`; do
38 i=$RPM_POSTINSTS_DIR$i
39 echo "Running postinst $i..."
40 if [ -f $i ] && $i; then
41 rm $i
42 else
43 echo "ERROR: postinst $i failed. $? " >> "$LOG_DIR"log.run-postinsts
44 fi
45done
46
47
48#Start all the modules specified in startup-list 31#Start all the modules specified in startup-list
49INITD_DIR=/etc/init.d/ 32start_stop_services 'startup-list'
50services=$(cat %DEPLOYCHEF_ROOT_DIR%/startup-list)
51for service in $services; do
52 service=$(echo $service | awk -F'S..' '{print $2}')
53 if [ -e $INITD_DIR$service ]; then
54 if [ $service = 'cinder-volume' ]; then
55 $INITD_DIR$service reload
56 else
57 $INITD_DIR$service start
58 fi
59 sleep 1
60 fi
61done
62
63#Restart cloud service cloud-init 33#Restart cloud service cloud-init
64/etc/init.d/cloud-init start 34/etc/init.d/cloud-init start