From e665cfde03fc9ec2264e99512ed5470872a2fd04 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 12 Jul 2010 14:05:51 +0200 Subject: [PATCH] config/interface_modify.sh: before calling a script check if it exists and is executable For non bash shells $_s_script might end with '/*'. We do the workarround this way, because it makes sense to check that a script is executable, before trying to execute it. metze [ This actually applies to any shell -- Rusty Russell ] Signed-off-by: Rusty Russell --- config/interface_modify.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/interface_modify.sh b/config/interface_modify.sh index 738530b4..69601dde 100755 --- a/config/interface_modify.sh +++ b/config/interface_modify.sh @@ -68,6 +68,9 @@ delete_ip_from_iface() local _s_script="" for _s_script in $_s_script_dir/*; do + test -x "$_s_script" || { + continue + } $_s_script "$_iface" "$_s_ip" "$_s_maskbits" || { ret=$? echo "$_s_script '$_iface' '$_s_ip' '$_s_maskbits' - failed - $ret" -- 2.34.1