File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 23
23
# wiconfig - simplifies the configuration of wireless interfaces
24
24
#
25
25
# SYNOPSIS
26
- # wiconfig [-dqs ] interface
26
+ # wiconfig [-dnqs ] interface
27
27
#
28
28
# EXAMPLE
29
29
# Manually configure a wireless interface
@@ -82,7 +82,7 @@ seconds=3
82
82
wiconfigdb=" /etc/wiconfig.db"
83
83
84
84
function usage {
85
- echo " usage: $myname [-dqs ] interface"
85
+ echo " usage: $myname [-dnqs ] interface"
86
86
exit 1
87
87
}
88
88
@@ -357,7 +357,9 @@ function configure {
357
357
# Apparently we need to use eval and single quotes to handle nwids with
358
358
# spaces
359
359
eval ifconfig $if nwid \' $1 \' $2 up > /dev/null 2>&1
360
- dhclient $if
360
+ if [ ! $nodhcp ]; then
361
+ dhclient $if
362
+ fi
361
363
}
362
364
363
365
function reconnect {
@@ -441,7 +443,9 @@ function determine {
441
443
exit 1
442
444
fi
443
445
fi
444
- dhclient $if
446
+ if [ ! $nodhcp ]; then
447
+ dhclient $if
448
+ fi
445
449
}
446
450
447
451
# Update existing db record, if it exists, or create a new one
@@ -528,9 +532,10 @@ if [ "X$(whoami)" != Xroot ]; then
528
532
exit 1
529
533
fi
530
534
531
- while getopts dqs opt; do
535
+ while getopts dnqs opt; do
532
536
case $opt in
533
537
d) debug=true;;
538
+ n) nodhcp=true;;
534
539
q) quiet=true;;
535
540
s) status=true;;
536
541
? ) usage;;
You can’t perform that action at this time.
0 commit comments