diff options
author | Ludovic Pouzenc <ludovic.pouzenc@mines-albi.fr> | 2017-11-03 17:41:26 +0100 |
---|---|---|
committer | Ludovic Pouzenc <ludovic.pouzenc@mines-albi.fr> | 2017-11-03 17:41:26 +0100 |
commit | 86863ee1f083dbdadcb896734b319aa59a2707c4 (patch) | |
tree | 94a5a47502621c0583ba79c2f0cc6a88c4ed806c /nfs/scripts/image_deploy.sh | |
parent | fe5aa2731c35f3f73c968536ed43b0f390be36cf (diff) | |
download | eficast-86863ee1f083dbdadcb896734b319aa59a2707c4.tar.gz eficast-86863ee1f083dbdadcb896734b319aa59a2707c4.tar.bz2 eficast-86863ee1f083dbdadcb896734b319aa59a2707c4.zip |
Some more deploy scripting and hard-coded tests
Diffstat (limited to 'nfs/scripts/image_deploy.sh')
-rw-r--r-- | nfs/scripts/image_deploy.sh | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/nfs/scripts/image_deploy.sh b/nfs/scripts/image_deploy.sh index e23fd70..69c5cf6 100644 --- a/nfs/scripts/image_deploy.sh +++ b/nfs/scripts/image_deploy.sh @@ -8,11 +8,14 @@ monthday=$(date +%m-%d) # define what master image should be used for the current client machine #TODO : have a better place for that (CMDB...) case "$hostname" in - I5480) mastername=pctp-master ;; - *) mastername=I4920 ;; -# *) echo_color white red ">>> " "No master for $hostname (see image_deploy.sh)" ; exit 1 ;; + I5480) mastername=I5456 ;; + I5454) mastername=I5456 ;; + *) echo_color white red ">>> " "No master for $hostname (see image_deploy.sh)" ; exit 1 ;; esac +# Check and print if the deploy script is defined for the current master machine +scriptavailability_test image_deploy_${mastername}.sh || exit $? + # Determine which image take #TODO : have a better place for that (CMDB...) ls -ld "$imagedir/$year/$mastername/" @@ -21,8 +24,7 @@ indir=$(find "$imagedir/$year/$mastername/" -maxdepth 1 -type d -regex '.*/\d\d- # Put a bad value to help the user to see where the image should be available indir=${indir:-$imagedir/$year/$mastername/XX-XX} -# Check and print if the deploy script is defined for the current master machine -scriptavailability_test image_deploy_${mastername}.sh || exit $? +# Check and print if the select image is available diravailability_test $indir || exit $? # Print all variables and start the deploy using the customized script (image_deploy_<hostname>.sh) @@ -30,6 +32,7 @@ setterm -bold on env setterm -bold off echo_color green black "$scriptdir/image_deploy_${mastername}.sh script will run on tty1 now" +pause10s source $scriptdir/image_deploy_${mastername}.sh |