mirror of
https://github.com/samba-team/samba.git
synced 2025-03-26 18:50:30 +03:00
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 <rusty@rustcorp.com.au> (This used to be ctdb commit e665cfde03fc9ec2264e99512ed5470872a2fd04)
This commit is contained in:
parent
34ce8a4f02
commit
3b9eeb1049
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user