diff options
author | Daniil Baturin <daniil.baturin@vyatta.com> | 2012-02-18 04:42:52 +0700 |
---|---|---|
committer | Daniil Baturin <daniil.baturin@vyatta.com> | 2012-02-18 04:42:52 +0700 |
commit | 10444d3add2a1da6a513a8bb60ab2677bf9f2240 (patch) | |
tree | c2f3b1ef28c2a2e27c4854fdac9924dcb8cd0bbb | |
parent | 6296463806ee4c65291ac0e3bb6dec6dfd3a8281 (diff) | |
download | vyatta-cfg-quagga-10444d3add2a1da6a513a8bb60ab2677bf9f2240.tar.gz vyatta-cfg-quagga-10444d3add2a1da6a513a8bb60ab2677bf9f2240.zip |
Bug #7787: Modify VRRP templates to allow custom script arguments,
treat first word as script path and the rest as arguments.
6 files changed, 12 insertions, 12 deletions
diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/backup/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/backup/node.def index 12006ee6..cab3f340 100644 --- a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/backup/node.def +++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/backup/node.def @@ -1,5 +1,5 @@ help: Script to run on VRRP state-transition to backup type: txt -syntax:expression: exec "[ -x $VAR(@) ] || exit 1"; "Backup Script should be an existing executable" -syntax:expression: exec "/opt/vyatta/sbin/check_file_in_config_dir $VAR(@) '/config/scripts'" +syntax:expression: exec "[ -x $(echo $VAR(@) | awk -F ' ' '{ print $1 }') ] || exit 1"; "Backup Script should be an existing executable" +syntax:expression: exec "/opt/vyatta/sbin/check_file_in_config_dir $(echo $VAR(@) | awk -F ' ' '{ print $1 }') '/config/scripts'" val_help: Script in /config/scripts diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/fault/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/fault/node.def index f2065249..0a68149e 100644 --- a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/fault/node.def +++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/fault/node.def @@ -1,5 +1,5 @@ help: Script to run on VRRP state-transition to fault type: txt -syntax:expression: exec "[ -x $VAR(@) ] || exit 1"; "Fault Script should be an existing executable" -syntax:expression: exec "/opt/vyatta/sbin/check_file_in_config_dir $VAR(@) '/config/scripts'" +syntax:expression: exec "[ -x $(echo $VAR(@) | awk -F ' ' '{ print $1 }') ] || exit 1"; "Fault Script should be an existing executable" +syntax:expression: exec "/opt/vyatta/sbin/check_file_in_config_dir $(echo $VAR(@) | awk -F ' ' '{ print $1 }') '/config/scripts'" val_help: Script in /config/scripts diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/master/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/master/node.def index d87909b7..22c7227c 100644 --- a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/master/node.def +++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/master/node.def @@ -1,5 +1,5 @@ help: Script to run on VRRP state-transition to master type: txt -syntax:expression: exec "[ -x $VAR(@) ] || exit 1"; "Master Script should be an existing executable" -syntax:expression: exec "/opt/vyatta/sbin/check_file_in_config_dir $VAR(@) '/config/scripts'" +syntax:expression: exec "[ -x $(echo $VAR(@) | awk -F ' ' '{ print $1 }') ] || exit 1"; "Master Script should be an existing executable" +syntax:expression: exec "/opt/vyatta/sbin/check_file_in_config_dir $(echo $VAR(@) | awk -F ' ' '{ print $1 }') '/config/scripts'" val_help: Script in /config/scripts diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/backup/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/backup/node.def index 12006ee6..cab3f340 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/backup/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/backup/node.def @@ -1,5 +1,5 @@ help: Script to run on VRRP state-transition to backup type: txt -syntax:expression: exec "[ -x $VAR(@) ] || exit 1"; "Backup Script should be an existing executable" -syntax:expression: exec "/opt/vyatta/sbin/check_file_in_config_dir $VAR(@) '/config/scripts'" +syntax:expression: exec "[ -x $(echo $VAR(@) | awk -F ' ' '{ print $1 }') ] || exit 1"; "Backup Script should be an existing executable" +syntax:expression: exec "/opt/vyatta/sbin/check_file_in_config_dir $(echo $VAR(@) | awk -F ' ' '{ print $1 }') '/config/scripts'" val_help: Script in /config/scripts diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/fault/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/fault/node.def index f2065249..0a68149e 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/fault/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/fault/node.def @@ -1,5 +1,5 @@ help: Script to run on VRRP state-transition to fault type: txt -syntax:expression: exec "[ -x $VAR(@) ] || exit 1"; "Fault Script should be an existing executable" -syntax:expression: exec "/opt/vyatta/sbin/check_file_in_config_dir $VAR(@) '/config/scripts'" +syntax:expression: exec "[ -x $(echo $VAR(@) | awk -F ' ' '{ print $1 }') ] || exit 1"; "Fault Script should be an existing executable" +syntax:expression: exec "/opt/vyatta/sbin/check_file_in_config_dir $(echo $VAR(@) | awk -F ' ' '{ print $1 }') '/config/scripts'" val_help: Script in /config/scripts diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/master/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/master/node.def index d87909b7..22c7227c 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/master/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/master/node.def @@ -1,5 +1,5 @@ help: Script to run on VRRP state-transition to master type: txt -syntax:expression: exec "[ -x $VAR(@) ] || exit 1"; "Master Script should be an existing executable" -syntax:expression: exec "/opt/vyatta/sbin/check_file_in_config_dir $VAR(@) '/config/scripts'" +syntax:expression: exec "[ -x $(echo $VAR(@) | awk -F ' ' '{ print $1 }') ] || exit 1"; "Master Script should be an existing executable" +syntax:expression: exec "/opt/vyatta/sbin/check_file_in_config_dir $(echo $VAR(@) | awk -F ' ' '{ print $1 }') '/config/scripts'" val_help: Script in /config/scripts |