- improve next_iface function

This commit is contained in:
Mikhail Efremov
2009-04-10 17:25:14 +04:00
parent e5206db465
commit 9dcb821af0

View File

@@ -35,8 +35,8 @@ chomp()
next_iface()
{
local name="$1";shift
local i="${1:-0}"
local path="$etcnet_iface_dir/$name"
local i=1 # not to interfere with dialup ppp0
while true; do
[ -d "$path$i" ] || { echo "$name$i" && break; }
i=$(($i + 1))
@@ -167,7 +167,8 @@ write_ppp_option1()
next_ppp()
{
next_iface ppp
# not to interfere with dialup ppp0
next_iface ppp 1
}
### list various interface types