Commit 2862479c authored by Alain Takoudjou's avatar Alain Takoudjou

kvm: really remove update route file when allow move is desabled

parent cfb98fec
......@@ -105,7 +105,7 @@ recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
mode = 644
md5sum = bc1bf62c94a26c72a097f5fb589225f1
md5sum = 6744ae234158f878141d8328aec3568a
download-only = true
on-update = true
......
......@@ -14,6 +14,7 @@
{% set monitor = str(slapparameter_dict.get('enable-monitor', True)).lower() == 'true' -%}
{% set monitor_interface_url = slapparameter_dict.get('monitor-interface-url', 'https://monitor.app.officejs.com') -%}
{% set allow_to_move = str(slapparameter_dict.get('allow-to-move-vm', True)).lower() == 'true' -%}
{% set sync_data_dir = '${directory:srv}/sync-data' -%}
{% set bootstrap_url = '' -%}
{% set bootstrap_url_md5sum = '' -%}
......@@ -44,6 +45,7 @@ context =
section slapconnection_dict slap-connection
mode = 700
{% else -%}
{% set sync_data_dir = 'notfound' -%}
{% do part_list.append('cleanup-status-files') -%}
{% endif -%}
{% endif -%}
......@@ -420,7 +422,7 @@ route-default = ip route add {{ global_ipv4_prefix }} via ${slap-network-informa
route-default =
{% endif -%}
command =
DATA_DIR=${directory:srv}/sync-data
DATA_DIR={{ sync_data_dir }}
echo "#!/bin/sh" > ${:path}
echo "" >> ${:path}
if [ -s "$DATA_DIR/ipv4" ]; then
......@@ -476,7 +478,7 @@ netmask =
network =
{% endif -%}
command =
DATA_DIR=${directory:srv}/sync-data
DATA_DIR={{ sync_data_dir }}
BASE_DIR=${directory:public}
if [ -s "$DATA_DIR/ipv4" ]; then
IPv4=$(cat $DATA_DIR/ipv4)
......
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