Commit 953b2b7b authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

slaprunner: Skip if slappart0 wasn't configured

This means the user don't have any instance at this point.

See merge request !717
parents d5509a03 6833a47e
Pipeline #8544 canceled with stage
...@@ -22,7 +22,7 @@ md5sum = dc3a7734b08977f438b35d441a12f628 ...@@ -22,7 +22,7 @@ md5sum = dc3a7734b08977f438b35d441a12f628
[template-runner-import-script] [template-runner-import-script]
filename = template/runner-import.sh.jinja2 filename = template/runner-import.sh.jinja2
md5sum = fc22e2d2f03ce58631f157a5b4943e15 md5sum = 2852689640b632fc713d7a603ce66207
[instance-runner-import] [instance-runner-import]
filename = instance-runner-import.cfg.in filename = instance-runner-import.cfg.in
......
...@@ -161,6 +161,12 @@ DB_SOFTWARE_TABLE=$(db_query ".table software__") ...@@ -161,6 +161,12 @@ DB_SOFTWARE_TABLE=$(db_query ".table software__")
# XXX hardcoded # XXX hardcoded
PARTITION=$(basename $HOME) PARTITION=$(basename $HOME)
OLD_SOFTWARE_RELEASE=$(db_query "select software_release from $DB_PARTITION_TABLE where reference='slappart0';") OLD_SOFTWARE_RELEASE=$(db_query "select software_release from $DB_PARTITION_TABLE where reference='slappart0';")
if [ "$OLD_SOFTWARE_RELEASE" == "" ];
then
echo "No instance configured"
echo 0 > $RESTORE_EXIT_CODE_FILE
exit 0
fi
SOFTWARE_RELEASE=$({{ sys.executable }} - $OLD_SOFTWARE_RELEASE $PARTITION <<EOF SOFTWARE_RELEASE=$({{ sys.executable }} - $OLD_SOFTWARE_RELEASE $PARTITION <<EOF
if 1: if 1:
import os, re, sys import os, re, sys
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment