From 5c91b0ebf7b7c1169ce507a9eb0097ebf3acc1b6 Mon Sep 17 00:00:00 2001 From: Giovanni Bechis Date: Sat, 4 Jun 2016 22:51:42 +0200 Subject: [PATCH 1/6] Change maximum to 40, useful in some hotels --- wiconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiconfig b/wiconfig index 3bc2fcb..b9dacbe 100644 --- a/wiconfig +++ b/wiconfig @@ -76,7 +76,7 @@ oIFS=$IFS myname=$0 -max=20 +max=40 # Number of seconds to wait before checking interface status seconds=3 wiconfigdb="/etc/wiconfig.db" From 50a19cb04263d5391069915290574592766ddb39 Mon Sep 17 00:00:00 2001 From: Giovanni Bechis Date: Sat, 4 Jun 2016 22:57:02 +0200 Subject: [PATCH 2/6] Add a [-n] optional parameter, dhcp will not be invoked, to be used with trunk(4) --- wiconfig | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/wiconfig b/wiconfig index b9dacbe..8b4e8a6 100644 --- a/wiconfig +++ b/wiconfig @@ -23,7 +23,7 @@ # wiconfig - simplifies the configuration of wireless interfaces # # SYNOPSIS -# wiconfig [-dqs] interface +# wiconfig [-dnqs] interface # # EXAMPLE # Manually configure a wireless interface @@ -82,7 +82,7 @@ seconds=3 wiconfigdb="/etc/wiconfig.db" function usage { - echo "usage: $myname [-dqs] interface" + echo "usage: $myname [-dnqs] interface" exit 1 } @@ -357,7 +357,9 @@ function configure { # Apparently we need to use eval and single quotes to handle nwids with # spaces eval ifconfig $if nwid \'$1\' $2 up > /dev/null 2>&1 - dhclient $if + if [ ! $nodhcp ]; then + dhclient $if + fi } function reconnect { @@ -441,7 +443,9 @@ function determine { exit 1 fi fi - dhclient $if + if [ ! $nodhcp ]; then + dhclient $if + fi } # Update existing db record, if it exists, or create a new one @@ -528,9 +532,10 @@ if [ "X$(whoami)" != Xroot ]; then exit 1 fi -while getopts dqs opt; do +while getopts dnqs opt; do case $opt in d) debug=true;; + n) nodhcp=true;; q) quiet=true;; s) status=true;; ?) usage;; From 969b97afe4bf828443a00a896b8f4cc16b963fd8 Mon Sep 17 00:00:00 2001 From: Giovanni Bechis Date: Thu, 30 Jun 2016 19:34:03 +0200 Subject: [PATCH 3/6] Add a [-n] optional parameter, dhcp will not be invoked, to be used with trunk(4) (#9) Add a [-n] optional parameter, dhcp will not be invoked, to be used with trunk(4) --- wiconfig | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/wiconfig b/wiconfig index 3bc2fcb..ce2e2b9 100644 --- a/wiconfig +++ b/wiconfig @@ -23,7 +23,7 @@ # wiconfig - simplifies the configuration of wireless interfaces # # SYNOPSIS -# wiconfig [-dqs] interface +# wiconfig [-dnqs] interface # # EXAMPLE # Manually configure a wireless interface @@ -82,7 +82,7 @@ seconds=3 wiconfigdb="/etc/wiconfig.db" function usage { - echo "usage: $myname [-dqs] interface" + echo "usage: $myname [-dnqs] interface" exit 1 } @@ -357,7 +357,9 @@ function configure { # Apparently we need to use eval and single quotes to handle nwids with # spaces eval ifconfig $if nwid \'$1\' $2 up > /dev/null 2>&1 - dhclient $if + if [ ! $nodhcp ]; then + dhclient $if + fi } function reconnect { @@ -441,7 +443,9 @@ function determine { exit 1 fi fi - dhclient $if + if [ ! $nodhcp ]; then + dhclient $if + fi } # Update existing db record, if it exists, or create a new one @@ -528,9 +532,10 @@ if [ "X$(whoami)" != Xroot ]; then exit 1 fi -while getopts dqs opt; do +while getopts dnqs opt; do case $opt in d) debug=true;; + n) nodhcp=true;; q) quiet=true;; s) status=true;; ?) usage;; From 6ab2790c37ac6026f24f38ba2e25e40adbf12846 Mon Sep 17 00:00:00 2001 From: Giovanni Bechis Date: Sat, 4 Jun 2016 22:51:42 +0200 Subject: [PATCH 4/6] Change maximum to 40, useful in some hotels --- wiconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiconfig b/wiconfig index ce2e2b9..8b4e8a6 100644 --- a/wiconfig +++ b/wiconfig @@ -76,7 +76,7 @@ oIFS=$IFS myname=$0 -max=20 +max=40 # Number of seconds to wait before checking interface status seconds=3 wiconfigdb="/etc/wiconfig.db" From 305885743fed0aeb0e27a0d41c351b421fbdfc38 Mon Sep 17 00:00:00 2001 From: Giovanni Bechis Date: Sat, 4 Jun 2016 22:51:42 +0200 Subject: [PATCH 5/6] Change maximum to 40, useful in some hotels --- wiconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiconfig b/wiconfig index ce2e2b9..8b4e8a6 100644 --- a/wiconfig +++ b/wiconfig @@ -76,7 +76,7 @@ oIFS=$IFS myname=$0 -max=20 +max=40 # Number of seconds to wait before checking interface status seconds=3 wiconfigdb="/etc/wiconfig.db" From c603b41674a4c2d68ab9cf6d72aa4d9721868798 Mon Sep 17 00:00:00 2001 From: Giovanni Bechis Date: Sat, 4 Jun 2016 22:51:42 +0200 Subject: [PATCH 6/6] Change maximum to 40, useful in some hotels --- wiconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiconfig b/wiconfig index ce2e2b9..8b4e8a6 100644 --- a/wiconfig +++ b/wiconfig @@ -76,7 +76,7 @@ oIFS=$IFS myname=$0 -max=20 +max=40 # Number of seconds to wait before checking interface status seconds=3 wiconfigdb="/etc/wiconfig.db"