commit cf87115cd4875ae0ab9bf86d48d737f886f03921
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Thu Nov 19 18:28:15 2020 +0100
Sync base role
roles/base/files/common-scripts/lock-wrapper | 5 ++++-
roles/base/templates/ifcfg.j2 | 4 ++++
2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/roles/base/files/common-scripts/lock-wrapper
b/roles/base/files/common-scripts/lock-wrapper
index abec9f3..33950ac 100755
--- a/roles/base/files/common-scripts/lock-wrapper
+++ b/roles/base/files/common-scripts/lock-wrapper
@@ -11,8 +11,11 @@ SCRIPT=$2
SILENT="no"
if [ $# -ge 3 -a "$3" == "--silent" ]; then
SILENT="yes"
+ shift
fi
+shift 2
+
LOCKDIR="/var/tmp/$NAME"
PIDFILE="$LOCKDIR/pid"
@@ -44,5 +47,5 @@ trap cleanup EXIT SIGQUIT SIGHUP SIGTERM
echo $$ > "$PIDFILE"
$RESTORE_UMASK
-eval "$SCRIPT"
+eval "$SCRIPT $*"
diff --git a/roles/base/templates/ifcfg.j2 b/roles/base/templates/ifcfg.j2
index d04dc31..ccf2103 100644
--- a/roles/base/templates/ifcfg.j2
+++ b/roles/base/templates/ifcfg.j2
@@ -10,8 +10,12 @@ ONBOOT="no"
{% else %}
IPADDR="{{ hostvars[inventory_hostname][item + '_ip'] }}"
NETMASK="{{ hostvars[inventory_hostname][item + '_nm'] }}"
+{% if hostvars[inventory_hostname][item +'_off'] is defined %}
+ONBOOT="no"
+{% else %}
ONBOOT="yes"
{% endif %}
+{% endif %}
TYPE="Ethernet"
DEVICE="{{item}}"
{% for line in if_uuid.stdout_lines %}
Show replies by date