read_iface_option(): work with unexistent iface dirs

This commit is contained in:
Vladislav Zavjalov 2008-10-01 15:26:40 +04:00
parent cab6c726a5
commit 9b4e19deb2

View File

@ -18,10 +18,10 @@ read_iface_option()
local ret=$(shell_config_get "$1/options" "$2")
if [ "$ret" == "" ]; then
local type=$(shell_config_get "$1/options" "TYPE")
ret=$(shell_config_get "$1/../default/options-$type" "$2")
ret=$(shell_config_get "/etc/net/ifaces/default/options-$type" "$2")
fi
if [ "$ret" == "" ]; then
ret=$(shell_config_get "$1/../default/options" "$2")
ret=$(shell_config_get "/etc/net/ifaces/default/options" "$2")
fi
echo "$ret"
}