From 3fbc818ccab52c91b9311a6cefcf2a7c0e683638 Mon Sep 17 00:00:00 2001
From: KatolaZ <katolaz@freaknet.org>
Date: Sat, 7 Jan 2017 23:18:56 +0000
Subject: [PATCH] Several fixes. Added manpage.

---
 setnet.8    | 232 ++++++++++++++++++++++++++++++++++++++++++++
 setnet.8.gz | Bin 0 -> 2835 bytes
 setnet.sh   | 274 ++++++++++++++++++++++++++++------------------------
 3 files changed, 380 insertions(+), 126 deletions(-)
 create mode 100644 setnet.8
 create mode 100644 setnet.8.gz

diff --git a/setnet.8 b/setnet.8
new file mode 100644
index 0000000..a312b88
--- /dev/null
+++ b/setnet.8
@@ -0,0 +1,232 @@
+.\" The following requests are required for all man pages.
+.Dd January 06, 2017
+.Dt SETNET 8 SMM
+.Os Linux
+.Sh NAME
+.Nm setnet.sh
+.Nd minimalist shell script for network configuration with dialog interface
+.Sh SYNOPSIS
+.Nm setnet.sh
+.Op Fl c Ar config_file
+.Op Fl h
+.Op Fl v
+.Sh DESCRIPTION
+.Pp
+setnet.sh is a shell script for network management, with a terminal
+user interface based on dialog(1). It works as a wrapper around the
+basic tools for the configuration of Ethernet and Wi-Fi interfaces,
+including ip(8), dhclient(8), and wpa_cli(8).
+
+.Pp
+setnet.sh allows to configure static and/or DHCP-based connections to
+a LAN/WLAN, and to manage the authentication to a Wi-Fi network. At
+present, only open authentication (no key) and WPA-Personal
+authentication (WPA-PSK/WPA2-PSK) are supported. The support for basic
+WPA-Enterprise authentication (WPA-EAP-PEAP and WPA-EAP-TLS) is under
+development.
+
+.Pp
+setnet.sh can be also used as a minimal interface to basic network
+diagnostics tools, including ping(8), host(1), traceroute(1), and
+netstat(8). It allows to show some information about network status,
+including the routing table, content of resolv.conf and nsswitch.conf,
+active TCP/IP connections, running daemons, etc., and to dump those
+information to a file. Support for posting a dump of network status to
+websites like pastebin.com is under development.
+
+.Pp
+setnet.sh recognises the following options:
+
+.Bl -tag -width Ds
+.It Fl c Ar config_file
+specify a configuration file
+.It Fl h
+print a minimal help and exit
+.It Fl v
+show version and exit
+.El
+
+.Pp
+The main setnet.sh menu allows to choose from five sections, as
+described below:
+
+.Bl -tag -width Ds
+.It Ic Setup
+This section allows to configure a network interface, selected from
+the list of available network devices (as returned by "ip -o
+link"). Once a device has been selected, it is possible to choose on
+of the following functions
+.Bl -tag -width 
+.It Ic View
+View current device configuration, i.e., MAC address, link status, IP
+address, etc.
+.It Ic WiFi
+(available only for wi-fi devices) Manage the association to a Wi-Fi
+network. This allows to restart wpa_supplicant, to manage the
+currently configured networks, to add a new network, and to show (and
+modify) the configuration file used by wpa_supplicant.
+.It Ic Conf 
+Configure the IP address of the device. It is possible to choose
+between
+.Em DHCP-based
+and
+.Em Static
+IP configuration.
+.It Ic Start
+Bring the interface up (using "ip link set <DEVNAME> up").
+.It Ic Stop
+Bring the interface down (using "ip link set <DEVNAME> down").
+.It Ic Restart
+Restart the interface by putting it first down and then up again.
+.El
+.It Ic Info
+This section provides information about the current network status and
+allows to perform basic diagnostic tasks. The following functions are
+available:
+.Bl -tag -width 
+.It Ic ARP
+Show the current ARP table
+.It Ic Connections
+List active network connections by running "netstat -tnp"
+.It Ic DNS
+List the configured DNS, by showing the "nameserver" entries in
+.Pa /etc/resolv.conf.
+.It Ic Lookup
+Perform a DNS lookup through "host <HOST>". If <HOST> is a FQDN, the
+result will be the IP address(es) associated to that domain name. If
+<HOST> is an IP address, the result is the list of FQDNs associated to
+that address.
+.It Ic Ping
+Ping a host, using its IP of FQDN (Fully-Qualified Domain Name) by
+running "ping -c 5 <HOST>".
+.It Ic Resolver
+Show the system resolver configuration, i.e. the content of the file
+.Pa /etc/nsswitch.conf
+.It Ic Routes
+Show the current routing table
+.It Ic Services
+Show a list of processes (daemons) listening on TCP ports, by running
+"netstat -ltnp".
+.It Ic Traceroute
+Show the route to a given host, as obtained by running the command
+"traceroute <HOST>".
+.El
+.It Ic Dump
+Dump information about current network status to a file. The user can
+choose which information to include from a checklist. The support for
+dumping network information to web applications like
+.Em pastebin
+is currently under development.
+.It Ic Log
+Show the logfile written by setnet.sh
+.It Ic About
+Provide information about copyright, contributors, and license.
+.El
+
+
+
+.\" This next request is for sections 1, 6, 7 & 8 only
+.Sh ENVIRONMENT
+.Pp
+setnet.sh uses the following environment variables:
+.Bl -tag -width Ds
+.It Ev WPA_FILE
+The configuration file for wpa_supplicant(1) (default to
+.Pa /etc/wpa_supplicant/wpa_setnet.conf
+.Li ).
+.It Ev LOGFILE
+The file used by setnet.sh for logging  (default to
+.Pa /var/log/setnet.log
+.Li ). 
+.It Ev TRUNCATE_LOG
+If it is set to "yes" or "YES", the log file is truncated when
+setnet.sh starts.
+.It Ev WIFI_DEVICES
+List of wifi devices. This list is used only when automatic detection
+of wifi devices fails.
+.El
+
+These variables are normally set in the setnetrc configuration file
+(see
+.Sy FILES
+below). setnet.sh will exit if either
+.Ev WPA_FILE
+or
+.Ev LOGFILE
+are undefined.
+
+.Sh FILES
+setnet.sh uses a configuration file which defines the environment
+variables described in
+.Sy ENVIRONMENT
+above. setnet.sh looks for the following files:
+
+.Bl -bullet -offset indent
+.It
+the
+.Em config_file
+provided through the option
+.Sy -c
+(if any).
+.It
+the file
+.Em /etc/setnetrc
+(if it exists)
+.It
+the file
+.Em ~/.setnetrc
+(if it exists)
+.El
+
+in that order. If a
+.Em config_file
+is provided, the other files are ignored. Otherwise, if 
+.Em ~/.setnetrc
+exists, it takes precedence over
+.Em /etc/setnetrc.
+
+
+.\" .Sh EXAMPLES
+.\" This next request is for sections 1, 6, 7 & 8 only
+.\"     (command return values (to shell) and
+.\"       fprintf/stderr type diagnostics)
+.\" .Sh DIAGNOSTICS
+.Sh SEE ALSO
+ip(8), dhclient(8), wpa_supplicant(8), wpa_cli(8), netstat(8).
+.\" .Sh CONFORMING TO
+.\" .Sh HISTORY
+.Sh AUTHORS
+setnet.sh is Free Software, distributed under the terms of the GNU
+General Public License (GPL), version 3 of the License.
+.Pp
+setnet.sh is copyleft (c) by
+.An Vincenzo (KatolaZ) Nicosia <katolaz@freaknet.org>
+
+.Sh BUGS
+At present, setnet.sh can reliably manage no more than one Wi-Fi
+device at a time. This is due to the fact that the configuration file
+for wpa_supplicant is defined in the environment variable
+.Ev WPA_FILE.
+There is no limitation on the number of Ethernet devices that
+setnet.sh can manage, but you should be careful with having more than
+one 
+.Sy dhclient
+processes running, since each of them will try to add a default
+gateway to the kernel routing table. 
+
+
+.Sh SECURITY CONSIDERATIONS
+Configuring networking is an administration task, and setnet.sh
+requires root privileges to work properly. It is possible to allow a
+regular user to run setnet.sh, e.g. by using sudo(8) or sup(1) (see
+https://sup.dyne.org/ for more information about sup).
+
+.Pp
+setnet.sh can recognise if it is running under sudo(8) or sup(1), by
+looking at the content of the environment variables SUDO_UID/SUP_UID,
+SUDO_GID/SUP_GID, and SUDO_USER/SUP_USER. When setnet.sh is run under
+sudo(8) or sup(1), some functionalities are disabled. In particular,
+loading and editing an alternate wpa_supplicant configuration file is
+forbidden (and for obvious reasons, since this would in principle
+allow the sudoer to edit *any* file in your system).
+
diff --git a/setnet.8.gz b/setnet.8.gz
new file mode 100644
index 0000000000000000000000000000000000000000..7f8eb077229435bbae01334e7a69d6ac17c2bc1c
GIT binary patch
literal 2835
zcmV+u3+(hCiwFpnWpP*l19N3`Ze?^XH~^hlZEqvD5&q6!G0=xX4&+smqDc@Of-1J`
zQ)5etSH9~N1rF4Tk_fMsTXI)A<wJjapCR{6FV_OS54J^-GsBr@o|)lA|LoCXt7vV~
z)EsoSA*=pXDpxp?R{0OwsujMsB-503GNW8>l#4`kzoNg%td#ah-~KS5@4x--M=TZ;
zj~CPNf_|d-`B_9WM^8E{zlbQ_(scAZ7SVJ^P8FFdBDck-743AUcQVzkAh%Ue;}Wa$
z!fVC0gRyUvm~5>#rIm#?869-7rInVc*^tf(W!ExMUPb(AI-AFn_*~5_r-zgh8re$J
z=e15%z20otdm;DZ`0iygUrc6G5zTYa$RQ2KeBDU62hQ24tQZ6nCBZgaPo|=D%C@%B
zQabn*R|&W1e|Hnnq#zap6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x0K@<MZ5sSp+U<_~}>0d$ptJ+G3S4Mu*
z0^l>0<+D7zR#&tWaQjlPKve$S!w1AH_u7>FcqN^GXmgBdxCwVSm@?(+!cfW*or6OI
lN_<7dwE{xe9{L6}|4pSRqoXNpHMekF{{sZN?#vq+001mnqx%2=

literal 0
HcmV?d00001

diff --git a/setnet.sh b/setnet.sh
index d63f5c4..1400319 100755
--- a/setnet.sh
+++ b/setnet.sh
@@ -29,7 +29,7 @@
 ## Initialisation
 ## 
 
-VERSION=0.2
+VERSION=0.2.1
 
 
 TOPSTR="setnet-${VERSION} [user: $(id -run)]"
@@ -121,7 +121,7 @@ load_setnetrc(){
 
 	WPA_FILE=""
 	LOGFILE=""
-	## If we were given a parameter, is the rc file to load...
+	## If we were given a parameter, that is the rc file to load...
 	##	
 	if [ $# -ge 1 ]; then
 		  . "$1"
@@ -148,8 +148,11 @@ load_setnetrc(){
      SETNETRC=~/.setnetrc
 	fi
 
-  . ${SETNETRC}
-
+	if [ -n "${SETNETRC}" ] &&
+	   [ -f "${SETNETRC}" ]; then 
+		. ${SETNETRC}
+	fi
+	
 	if [ -z ${WPA_FILE} ]; then
 		echo "Could not find WPA_FILE defined anywhere. Exiting"
 		exit 1
@@ -325,15 +328,15 @@ edit_file(){
 		    log "edit_file" "Copying ${TMPFILE} into ${FILEIN}"
 		    if cp "${TMPFILE}" "${FILEIN}"
 		    then
-			      eval "${DIALOG}   --clear --msgbox 'File ${FILEIN} saved successfully' \
+			      eval "${DIALOG}    --msgbox 'File ${FILEIN} saved successfully' \
 				   ${INFO_HEIGHT} ${INFO_WIDTH}"
 		    else
-			      eval "${DIALOG}   --clear --msgbox 'Error saving file ${FILEIN}' \
+			      eval "${DIALOG}    --msgbox 'Error saving file ${FILEIN}' \
 				   ${INFO_HEIGHT} ${INFO_WIDTH}"
 		    fi
 	  else
 		    log "edit_file" "Editing of ${FILEIN} aborted..."
-		    eval "${DIALOG}   --clear --msgbox 'File ${FILEIN} not saved' \
+		    eval "${DIALOG}    --msgbox 'File ${FILEIN} not saved' \
 			   ${INFO_HEIGHT} ${INFO_WIDTH}"
 	  fi
 }
@@ -396,7 +399,7 @@ DEVNAME=$1
 
 	DEVCONF="${DEVCONF}\n== name servers ==\n$(grep '^nameserver' /etc/resolv.conf)"
 	
-	eval "${DIALOG}   --clear --title 'Current configuration of device: ${DEVNAME}' \
+	eval "${DIALOG}    --title 'Current configuration of device: ${DEVNAME}' \
 		--msgbox '\n\n${DEVCONF}' ${WINDOW_HEIGHT} ${WINDOW_WIDTH} "
 	return 0
 
@@ -405,26 +408,26 @@ DEVNAME=$1
 
 
 ##function 
-config_ethernet_static(){
-
-##local 
-DEV_IP="192.168.1.2"
-##local 
-DEV_NET="192.168.1.0"
-##local 
-DEV_NETMASK="255.255.255.0"
-##local 
-DEV_GW="192.168.1.1"
-##local 
-DEV_DNS1="208.67.222.222"
-##local 
-DEV_DNS2="208.67.220.220"
-
-##local 
-DEVNAME=$1
-
+config_ip_static(){
+
+	##local 
+	DEV_IP="192.168.1.2"
+	##local 
+	DEV_NET="192.168.1.0"
+	##local 
+	DEV_NETMASK="255.255.255.0"
+	##local 
+	DEV_GW="192.168.1.1"
+	##local 
+	DEV_DNS1="208.67.222.222"
+	##local 
+	DEV_DNS2="208.67.220.220"
+	
+	##local 
+	DEVNAME=$1
+	
 	exec 3>&1	
-	eval "${DIALOG}  --clear --form 'Set network for device: ${DEVNAME}' \
+	eval "${DIALOG}   --form 'Set network for device: ${DEVNAME}' \
 	${FORM_HEIGHT} ${FORM_WIDTH} 0 \
 	'IP'            1 1 '${DEV_IP}'    1 16 16 16 \
 	'Network'       2 1 '${DEV_NET}'    2 16 16 16 \
@@ -440,9 +443,10 @@ DEVNAME=$1
 		return
 	fi
 
-	read -d "*" DEV_IP DEV_NET DEV_NETMASK DEV_GW DEV_DNS1  DEV_DNS2 < ${TMPFILE}
+	read -d "*" DEV_IP DEV_NET DEV_NETMASK DEV_GW DEV_DNS1 DEV_DNS2 < ${TMPFILE}
 	eval "${DIALOG}  --msgbox 'Proposed configuration of ${DEVNAME}:\n \
-${DEV_IP}\n${DEV_NET}\n${DEV_NETMASK}\n${DEV_GW}\n${DEV_DNS1}\n${DEV_DNS2}'\
+IP: ${DEV_IP}\nNetwork: ${DEV_NET}\nNetmask: ${DEV_NETMASK}\nGateway: \
+${DEV_GW}\nDNS1: ${DEV_DNS1}\nDNS2: ${DEV_DNS2}'\
 		${WINDOW_HEIGHT} ${WINDOW_WIDTH}"
 	
 	## Configure IP
@@ -453,23 +457,27 @@ ${DEV_IP}\n${DEV_NET}\n${DEV_NETMASK}\n${DEV_GW}\n${DEV_DNS1}\n${DEV_DNS2}'\
 	ip address add "${DEV_IP}/${DEV_NETMASK}" dev "${DEVNAME}"
 	
 	## Configure GW
-	ip route flush dev "${DEVNAME}"
-	ip route add "${DEV_NET}/${DEV_NETMASK}" dev "${DEVNAME}"
-	ip route add default via "${DEV_GW}"
-	
+	#if [ -n "${DEV_GW}" ]; then 
+		ip route flush dev "${DEVNAME}"
+		ip route add "${DEV_NET}/${DEV_NETMASK}" dev "${DEVNAME}"
+		ip route add default via "${DEV_GW}"
+	#fi
 	## Configure DNS
-	mv /etc/resolv.conf /etc/resolv.conf.bak
-	if [ -n "${DEV_DNS1}" ]; then
-		echo "nameserver ${DEV_DNS1}" >> /etc/resolv.conf
-	fi
-	if [ -n "${DEV_DNS2}" ]; then
-		echo "nameserver ${DEV_DNS2}" >> /etc/resolv.conf
-	fi
-	show_device_conf "${DEVNAME}"
+	#if [ -n "${DEV_DNS1}" ] ||
+	#	   [ -n "${DEV_DNS1}" ]; then
+		mv /etc/resolv.conf /etc/resolv.conf.bak
+		if [ -n "${DEV_DNS1}" ]; then
+			echo "nameserver ${DEV_DNS1}" >> /etc/resolv.conf
+		fi
+		if [ -n "${DEV_DNS2}" ]; then
+			echo "nameserver ${DEV_DNS2}" >> /etc/resolv.conf
+		fi
+		show_device_conf "${DEVNAME}"
+	#fi
 }
 
 ##function 
-config_ethernet_dhcp(){
+config_ip_dhcp(){
 
 ##local 
 	DEVNAME=$1
@@ -477,40 +485,37 @@ config_ethernet_dhcp(){
 	##eval "${DIALOG}  --msgbox 'Running \"dhclient ${DEVNAME}\"' ${INFO_HEIGHT} ${INFO_WIDTH}"
 	dhclient -r ${DEVNAME}  2>/dev/null
 	dhclient -v ${DEVNAME} 2>&1 |
-		eval "${DIALOG} --clear --title 'Running dhclient...' \
+		eval "${DIALOG}  --title 'Running dhclient ${DEVNAME}' \
                  --programbox  ${WINDOW_HEIGHT} ${WINDOW_WIDTH}" 2>${TMPFILE}
     if [ $! -ne 0 ];then
-		log "config_ethernet_dhcp" "dhclient aborted"
+		log "config_ip_dhcp" "dhclient aborted"
 	fi
 	show_device_conf ${DEVNAME}
 }
 
 
 ##function 
-config_ethernet(){
+configure_ip_address(){
 
 ##local 
     DEVNAME=$1
 	  
-    while true; do
-		    eval "${DIALOG}  --clear --cancel-label 'Up' \
+	eval "${DIALOG}   --cancel-label 'Up' \
 		--menu 'Configuring ${DEVNAME}' ${INFO_HEIGHT} ${INFO_WIDTH} 4 \
 		'DHCP' ''\
 		'Static' ''" 2>${TMPFILE}
-		    if [ $? -eq 1 ]; then
-			      return
-		    fi
-		    ACTION=$(cat ${TMPFILE})
-		    case ${ACTION} in
-			      "Static")
-				        config_ethernet_static ${DEVNAME}
-				        ;;
-			      "DHCP")
-				        config_ethernet_dhcp ${DEVNAME}
-				        ;;
-		    esac
-	  done
-    
+	if [ $? -eq 1 ]; then
+		return
+	fi
+	ACTION=$(cat ${TMPFILE})
+	case ${ACTION} in
+		"Static")
+			config_ip_static ${DEVNAME}
+			;;
+		"DHCP")
+			config_ip_dhcp ${DEVNAME}
+			;;
+	esac
 }
 
 ##function 
@@ -623,7 +628,7 @@ wifi_authenticate(){
 			      eval "${DIALOG}  --insecure --inputbox 'Please insert WPA PSK\n(8 characters)' \
 				   ${INFO_HEIGHT} ${INFO_WIDTH}"  2> ${TMPFILE}
 			      if [ $? -eq 1 ]; then
-				        eval "${DIALOG}  --clear --msgbox 'Network configuration aborted!!!' \
+				        eval "${DIALOG}   --msgbox 'Network configuration aborted!!!' \
 					   ${INFO_HEIGHT} ${INFO_WIDTH}"
 				        return 1
 			      fi
@@ -638,7 +643,7 @@ wifi_authenticate(){
 		    wpa_cli -i ${DEVNAME} set_network ${NET_NUM} psk \"${PSK}\"
 		    ## remove the password from tmpfile
 		    echo "" > ${TMPFILE}
-		    eval "${DIALOG}  --clear --defaultno --yesno \
+		    eval "${DIALOG}   --defaultno --yesno \
 			   'Network \"${W_ESSID}\" added\nSave configuration file?' \
 			   ${INFO_HEIGHT} ${INFO_WIDTH} " 2> ${TMPFILE}
 		    if [ $? -eq 0 ]; then
@@ -660,7 +665,7 @@ wifi_authenticate(){
 		    log "wifi_authenticate" "NET_NUM: ${NET_NUM}"
 		    wpa_cli -i ${DEVNAME} set_network ${NET_NUM} ssid "\"${W_ESSID}\""
 		    wpa_cli -i ${DEVNAME} set_network ${NET_NUM} key_mgmt NONE
-		    eval "${DIALOG}  --clear --defaultno --yesno \
+		    eval "${DIALOG}   --defaultno --yesno \
 			   'Network \"${W_ESSID}\" added\nSave configuration file?' \
 			   ${INFO_HEIGHT} ${INFO_WIDTH} " 2> ${TMPFILE}
 		    if [ $? -eq 0 ]; then
@@ -763,7 +768,7 @@ wifi_remove(){
 		    NETNUM=$(cat ${TMPFILE})
 		    WPA_STATUS=$(wpa_cli -i ${DEVNAME} remove_network ${NETNUM} | tail -1 )
 		    if [ "${WPA_STATUS}" = "OK" ]; then
-			      eval "${DIALOG}  --clear --defaultno --yesno \
+			      eval "${DIALOG}   --defaultno --yesno \
 				   'Network ${NETNUM} removed\nSave configuration file?' \
 				   ${INFO_HEIGHT} ${INFO_WIDTH}" 2> ${TMPFILE}
 			      if [ $? -eq 0 ]; then
@@ -773,12 +778,12 @@ wifi_remove(){
 			      
 			      return
 		    else
-			      eval "${DIALOG}  --clear --msgbox 'Network ${NETNUM} NOT removed' \
+			      eval "${DIALOG}   --msgbox 'Network ${NETNUM} NOT removed' \
 				   ${INFO_HEIGHT} ${INFO_WIDTH}"
 			      return
 		    fi
 	  else
-		    eval "${DIALOG}  --clear --msgbox 'No network removed!!!' \
+		    eval "${DIALOG}   --msgbox 'No network removed!!!' \
 			   ${INFO_HEIGHT} ${INFO_WIDTH}"
 		    return
 	  fi
@@ -800,16 +805,16 @@ sed -r -e 's/^\ +//g' | cut -d " " -f 1)
 	  log "wifi_restart_wpa" "WPA_PID: ${WPA_PID}"
 	  kill -9 ${WPA_PID}
     
-	  wpa_supplicant -B -i ${DEVNAME} -c ${WPA_FILE} -P${WPA_PIDFILE} 2>/dev/null
+	  wpa_supplicant -B -i ${DEVNAME} -c ${WPA_FILE} -P${WPA_PIDFILE} 2>&1 >/dev/null
 	  WPA_PID=$(ps ax | grep wpa_supplicant | grep " -i ${DEVNAME}" | \
                      sed -r -e 's/^\ +//g' | cut -d " " -f 1 )
 	  WPA_PID_SAVED=$(cat ${WPA_PIDFILE})
     log "wifi_restart_wpa" "WPA_PID: ${WPA_PID} WPA_PID_SAVED: ${WPA_PID_SAVED}"
 	  if [ -n "${WPA_PID}" ] &&  [ "${WPA_PID}" != "${WPA_PID_SAVED}" ]; then
-		    eval "${DIALOG}  --clear --msgbox 'Error restarting wpa_supplicant' \
+		    eval "${DIALOG}   --msgbox 'Error restarting wpa_supplicant' \
 			   ${INFO_HEIGHT} ${INFO_WIDTH}"
 	  else
-		    eval "${DIALOG}  --clear --msgbox 'wpa_supplicant restarted successfully' \
+		    eval "${DIALOG}   --msgbox 'wpa_supplicant restarted successfully' \
 			   ${INFO_HEIGHT} ${INFO_WIDTH}"
 	  fi
     
@@ -839,17 +844,17 @@ wifi_enable(){
 		    NETNUM=$(cat ${TMPFILE})
 		    WPA_STATUS=$(wpa_cli -i ${DEVNAME} enable ${NETNUM} | tail -1 )
 		    if [ "${WPA_STATUS}" = "OK" ]; then
-			      eval "${DIALOG}  --clear --msgbox 'Network ${NETNUM} enabled' \
+			      eval "${DIALOG}   --msgbox 'Network ${NETNUM} enabled' \
 				   ${INFO_HEIGHT} ${INFO_WIDTH}"
-			      config_ethernet ${DEVNAME}
+			      #config_ethernet ${DEVNAME}
 			      return
 		    else
-			      eval "${DIALOG}  --clear --msgbox 'Network ${NETNUM} NOT enabled' \
+			      eval "${DIALOG}   --msgbox 'Network ${NETNUM} NOT enabled' \
 				   ${INFO_HEIGHT} ${INFO_WIDTH}"
 			      return
 		    fi
 	  else
-		    eval "${DIALOG}  --clear --msgbox 'No network enabled!!!' \
+		    eval "${DIALOG}   --msgbox 'No network enabled!!!' \
 			   ${INFO_HEIGHT} ${INFO_WIDTH}"
 		    return
 	  fi
@@ -871,16 +876,16 @@ wifi_disable(){
 		    NETNUM=$(cat ${TMPFILE})
 		    WPA_STATUS=$(wpa_cli -i ${DEVNAME} disable ${NETNUM} | tail -1 )
 		    if [ "${WPA_STATUS}" = "OK" ]; then
-			      eval "${DIALOG}  --clear --msgbox 'Network ${NETNUM} disabled' \
+			      eval "${DIALOG}   --msgbox 'Network ${NETNUM} disabled' \
 				   ${INFO_HEIGHT} ${INFO_WIDTH}"
 			      return
 		    else
-			      eval "${DIALOG}  --clear --msgbox 'Network ${NETNUM} NOT disabled' \
+			      eval "${DIALOG}   --msgbox 'Network ${NETNUM} NOT disabled' \
 				   ${INFO_HEIGHT} ${INFO_WIDTH}"
 			      return
 		    fi
 	  else
-		    eval "${DIALOG}  --clear --msgbox 'No network disabled!!!' \
+		    eval "${DIALOG}   --msgbox 'No network disabled!!!' \
 			   ${INFO_HEIGHT} ${INFO_WIDTH}"
 		    return
 	  fi
@@ -915,7 +920,7 @@ wifi_load_file(){
 			if [ $? -eq 0 ]; then
 				SEL_FILE=$(cat ${TMPFILE})
 			else
-				eval "${DIALOG}  --clear --msgbox 'WPA_FILE was not modified' \
+				eval "${DIALOG}   --msgbox 'WPA_FILE was not modified' \
 						   ${INFO_HEIGHT} ${INFO_WIDTH}"
 				return
 			fi
@@ -923,19 +928,19 @@ wifi_load_file(){
 		
 		if [ -f "${SEL_FILE}" ]; then
 			WPA_FILE=${SEL_FILE}
-			eval "${DIALOG}  --clear --defaultno --yesno \
+			eval "${DIALOG}   --defaultno --yesno \
 					   'WPA_FILE changed to ${WPA_FILE}\nRestart wpa_supplicant?' \
 					   ${INFO_HEIGHT} ${INFO_WIDTH}"
 			if [ $? -eq 0 ]; then
 				wifi_restart_wpa ${DEVNAME} ${WPA_FILE}
 			fi
 		else
-			eval "${DIALOG}  --clear --msgbox 'Invalid file name!\n WPA_FILE *not* changed' \
+			eval "${DIALOG}   --msgbox 'Invalid file name!\n WPA_FILE *not* changed' \
 					  ${WINDOW_HEIGHT} ${WINDOW_WIDTH}"
 			return 
 		fi
 	else
-		eval "${DIALOG}  --clear --msgbox 'WPA_FILE was not modified' \
+		eval "${DIALOG}   --msgbox 'WPA_FILE was not modified' \
 				   ${INFO_HEIGHT} ${INFO_WIDTH}"
 	fi
 	
@@ -950,7 +955,7 @@ config_wifi(){
     DEVNAME=$1
 	  
     while true; do
-		    eval "${DIALOG}  --clear --cancel-label 'Up' \
+		    eval "${DIALOG}   --cancel-label 'Up' \
 			   --menu 'Configuring ${DEVNAME}\n(Current file: ${WPA_FILE})' \
 			   ${WINDOW_HEIGHT} ${WINDOW_WIDTH} 12 \
 			   'Restart' 'Restart wpa_supplicant' \
@@ -1010,24 +1015,37 @@ config_wifi(){
 
 
 ##
-## (Re)-Configure a network device
+## (Re)-Configure 
 ##
 
 ##function 
-configure_device(){
+configure_wifi(){
 
 ##local 
     DEVNAME=$1
 
-    ## Check if the network device is a wifi -- this should be more robust...
-    iw ${DEVNAME} info 2>&1 >/dev/null
-    
-	case $? in
-		0)
+	## Automatically Check if the network device is a wifi -- this
+	## should be robust...
+	! iw ${DEVNAME} info 2>&1 >/dev/null
+	IS_WIFI=$?
+	log "configure_device" "Device ${DEVNAME} -- IS_WIFI: ${IS_WIFI} (automatic)"
+	if [ "${IS_WIFI}" = "0" ] && \
+		   [ -n "${WIFI_DEVICES}" ]; then 
+		## WIFI_DEVICES is set, hence we check whether the current
+		## device is in the list 
+		IS_WIFI=$(echo " ${WIFI_DEVICES} " | grep -E -c "(\ ${DEVNAME}\ )")
+		log "configure_device" "Device ${DEVNAME} -- IS_WIFI: ${IS_WIFI} (config file)"
+	fi
+	
+	
+	case ${IS_WIFI} in
+		1)
 			config_wifi ${DEVNAME}
 			;;
 		*)
-			config_ethernet ${DEVNAME}
+			## Show a message here
+			eval "${DIALOG} --msgbox '${DEVNAME} is not a WiFi device... ' \
+            ${INFO_HEIGHT} ${INFO_WIDTH}" 
 			;;
 	esac
 	
@@ -1063,11 +1081,12 @@ show_device_menu(){
     while true; do 	
         DEV_STATUS=$(ip -o link | cut -d " " -f 2,9 | grep -E "^${DEVNAME}: " | cut -d " " -f 2)
         log "show_device_menu" "DEVNAME: ${DEVNAME} DEV_STATUS: ${DEV_STATUS}"
-		    eval "${DIALOG}  --clear --cancel-label 'Up' --menu\
+		    eval "${DIALOG}   --cancel-label 'Up' --menu\
              'Device: ${DEVNAME}\nStatus: ${DEV_STATUS}' \
 			       ${WINDOW_HEIGHT} ${WINDOW_WIDTH} 8 \
 			       'View' 'View current configuration' \
-			       'Conf' 'Configure device' \
+			       'Conf' 'Configure IP Address' \
+                   'WiFi' 'Manage WiFi networking' \
                    'Start' 'Bring interface up' \
 			       'Stop' 'Put interface down' \
 			       'Restart' 'Restart interface'" 2> ${TMPFILE}
@@ -1082,7 +1101,10 @@ show_device_menu(){
 				        show_device_conf ${DEVNAME}
 				        ;;
 			      "Conf")
-				        configure_device ${DEVNAME}
+				        configure_ip_address ${DEVNAME}
+				        ;;
+			      "WiFi")
+				        configure_wifi ${DEVNAME}
 				        ;;
 			      "Start")
 				        set_device_up ${DEVNAME}
@@ -1118,7 +1140,7 @@ show_devs() {
 		    fi
 	  done
     
- 	  eval "${DIALOG}  --clear --cancel-label 'Up' \
+ 	  eval "${DIALOG}   --cancel-label 'Up' \
 			   --menu 'Select Interface to configure' ${WINDOW_HEIGHT} ${WINDOW_WIDTH} 4 \
 			   ${DEVICE_TAGS}" 2> ${TMPFILE}
 	  return $?
@@ -1165,7 +1187,7 @@ Please report bugs at:
     https://git.devuan.org/KatolaZ/setnet
 
 EOF
-	eval "${DIALOG}  --clear --cr-wrap --textbox ${TMPFILE} ${WINDOW_HEIGHT} ${WINDOW_WIDTH}"
+	eval "${DIALOG}   --cr-wrap --textbox ${TMPFILE} ${WINDOW_HEIGHT} ${WINDOW_WIDTH}"
 	return
 }
 
@@ -1185,7 +1207,7 @@ show_copyright(){
 
 
 EOF
-	eval "${DIALOG}  --clear --cr-wrap --textbox ${TMPFILE} ${WINDOW_HEIGHT} ${WINDOW_WIDTH}"
+	eval "${DIALOG}   --cr-wrap --textbox ${TMPFILE} ${WINDOW_HEIGHT} ${WINDOW_WIDTH}"
 	return
 }
 
@@ -1218,7 +1240,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 --------------------------------------------------------------------
 
 EOF
-	eval "${DIALOG}  --clear --cr-wrap --textbox ${TMPFILE} ${WINDOW_HEIGHT} ${WINDOW_WIDTH}"
+	eval "${DIALOG}   --cr-wrap --textbox ${TMPFILE} ${WINDOW_HEIGHT} ${WINDOW_WIDTH}"
 	return
 }
 
@@ -1259,7 +1281,7 @@ notfound(){
     CMDNAME=$1
 
     
-    eval "${DIALOG} --clear --msgbox 'Sorry! Commmand ${CMDNAME} not found!'" \
+    eval "${DIALOG}  --msgbox 'Sorry! Commmand ${CMDNAME} not found!'" \
          ${INFO_HEIGHT} ${INFO_WIDTH}
     
 }
@@ -1282,7 +1304,7 @@ netdiag_DNS(){
     NAMESERVERS=$(grep '^nameserver' /etc/resolv.conf)
     MSG_STR="Configured name servers in /etc/resolv.conf ==\n\n${NAMESERVERS}"
 
-    eval "${DIALOG} --clear --title 'DNS servers' --msgbox '${MSG_STR}' "\
+    eval "${DIALOG}  --title 'DNS servers' --msgbox '${MSG_STR}' "\
          ${WINDOW_HEIGHT} ${WINDOW_WIDTH}
     
 }
@@ -1303,7 +1325,7 @@ netdiag_resolver(){
     ## Dump to dialog
     RESOLVER=$(grep -v '^#' /etc/nsswitch.conf)
 
-    eval "${DIALOG} --clear --title 'Resolver configuration (/etc/nsswitch.conf)' \
+    eval "${DIALOG}  --title 'Resolver configuration (/etc/nsswitch.conf)' \
           --msgbox '${RESOLVER}' "\
          ${WINDOW_HEIGHT} ${WINDOW_WIDTH}
     
@@ -1331,7 +1353,7 @@ netdiag_routes(){
     ## Dump to dialog
     ROUTES=$(netstat -rn > ${TMPFILE} )
     
-    eval "${DIALOG} --clear --no-collapse --title 'Routing table (netstat -rn) [arrows to scroll]'" \
+    eval "${DIALOG}  --no-collapse --title 'Routing table (netstat -rn) [arrows to scroll]'" \
          "--tab-correct --tab-len 4 --textbox ${TMPFILE} "\
          ${LARGE_HEIGHT} ${LARGE_WIDTH}
 }
@@ -1352,7 +1374,7 @@ netdiag_ARP(){
     # Dump to dialog
     ARP=$(cat /proc/net/arp >${TMPFILE})
 
-    eval "${DIALOG} --clear --no-collapse --title 'ARP table (/proc/net/arp) [arrows to scroll]'" \
+    eval "${DIALOG}  --no-collapse --title 'ARP table (/proc/net/arp) [arrows to scroll]'" \
          "--tab-correct --tab-len 4 --textbox ${TMPFILE} "\
          ${LARGE_HEIGHT} ${LARGE_WIDTH}
 }
@@ -1380,7 +1402,7 @@ netdiag_connections(){
     ## Dump to dialog
     SERV=$(netstat -tnp | sed -r -e 's/$/\n/g' > ${TMPFILE})
     
-    eval "${DIALOG} --clear --no-collapse "\
+    eval "${DIALOG}  --no-collapse "\
          " --title 'Active network connections (netstat -tnp) [arrows to scroll]'" \
          "--tab-correct --tab-len 4 --textbox ${TMPFILE} "\
          ${LARGE_HEIGHT} ${LARGE_WIDTH}
@@ -1409,7 +1431,7 @@ netdiag_services(){
 
     SERV=$(netstat -ltnp | sed -r -e 's/$/\n/g' > ${TMPFILE})
     
-    eval "${DIALOG} --clear --no-collapse "\
+    eval "${DIALOG}  --no-collapse "\
          " --title 'Active network services (netstat -ltnp) [arrows to scroll]'" \
          "--tab-correct --tab-len 4 --textbox ${TMPFILE} "\
          ${LARGE_HEIGHT} ${LARGE_WIDTH}
@@ -1419,7 +1441,7 @@ netdiag_services(){
 ##function
 netdiag_ping(){
     
-    HAS_PING=$(echo ${HAS_OPTS} | grep -c " ping ")
+    HAS_PING=$(echo ${HAS_OPTS} | grep -E -c "\ ping\ ")
     if [ ${HAS_PING} -ne 1 ]; then
         notfound "ping"
         return
@@ -1428,13 +1450,13 @@ netdiag_ping(){
 				   ${INFO_HEIGHT} ${INFO_WIDTH}"  2> ${TMPFILE}
 
     if [ $? -ne 0 ]; then
-       	eval "${DIALOG}  --clear --msgbox 'Ping Aborted' \
+       	eval "${DIALOG}   --msgbox 'Ping Aborted' \
 					   ${INFO_HEIGHT} ${INFO_WIDTH}"
         return
     else
         PINGIP=$(cat ${TMPFILE})
         ping -c 5 ${PINGIP} 2>&1  |\
-			eval "${DIALOG} --clear --title 'Ping ${PINGIP}' \
+			eval "${DIALOG}  --title 'Ping ${PINGIP}' \
                  --programbox  ${LARGE_HEIGHT} ${LARGE_WIDTH}" 2>${TMPFILE}
         if [ $! -ne 0 ];then
 		 	log "netdiag_ping" "ping aborted"
@@ -1455,13 +1477,13 @@ netdiag_traceroute(){
 				   ${INFO_HEIGHT} ${INFO_WIDTH}"  2> ${TMPFILE}
 
     if [ $? -ne 0 ]; then
-       	eval "${DIALOG}  --clear --msgbox 'Traceroute Aborted' \
+       	eval "${DIALOG}   --msgbox 'Traceroute Aborted' \
 					   ${INFO_HEIGHT} ${INFO_WIDTH}"
         return
     else
         TRACEIP=$(cat ${TMPFILE})
         traceroute ${TRACEIP} 2>&1 | \
-			eval "${DIALOG} --clear --title 'Traceroute ${TRACEIP}' \
+			eval "${DIALOG}  --title 'Traceroute ${TRACEIP}' \
                  --programbox  ${LARGE_HEIGHT} ${LARGE_WIDTH}" 2>${TMPFILE}
         if [ $! -ne 0 ];then
 		 	log "netdiag_traceroute" "traceroute aborted"
@@ -1471,7 +1493,7 @@ netdiag_traceroute(){
 
 
 ##function
-netdiag_query(){
+netdiag_lookup(){
 
     HAST_HOST=$(echo ${HAS_OPTS} | grep -c " host ")
     if [ $? -ne 1 ]; then
@@ -1479,20 +1501,20 @@ netdiag_query(){
         return
     fi
 
-    eval "${DIALOG} --insecure --inputbox 'Hostname or IP to query:' \
+    eval "${DIALOG} --insecure --inputbox 'Hostname or IP to lookup:' \
 				   ${INFO_HEIGHT} ${INFO_WIDTH}"  2> ${TMPFILE}
     
     if [ $? -ne 0 ]; then
-       	eval "${DIALOG}  --clear --msgbox 'DNS query aborted' \
+       	eval "${DIALOG}   --msgbox 'DNS lookup aborted' \
 					   ${INFO_HEIGHT} ${INFO_WIDTH}"
         return
     else
         QUERYIP=$(cat ${TMPFILE})
         host ${QUERYIP} 2>&1 |\
-			eval "${DIALOG} --clear --title 'host ${QUERYIP}' \
+			eval "${DIALOG}  --title 'host ${QUERYIP}' \
                  --programbox  ${LARGE_HEIGHT} ${LARGE_WIDTH}" 2>${TMPFILE}
         if [ $! -ne 0 ];then
-		 	log "netdiag_ping" "host query aborted"
+		 	log "netdiag_ping" "host lookup aborted"
 		fi
 
     fi
@@ -1526,8 +1548,8 @@ netdiag_menu(){
 			   'ARP' 'Show ARP table'  \
          'Connections' 'List active network connections' \
 			   'DNS' 'List DNS servers' \
+         'Lookup' 'DNS Lookup' \
          'Ping' 'Ping a host'  \
-         'Query' 'DNS Query' \
          'Resolver' 'Show resolver configuration' \
 			   'Routes' 'Show routing table' \
          'Services' 'List active network daemons'  \
@@ -1551,8 +1573,8 @@ netdiag_menu(){
             "Ping")
 				        netdiag_ping
 				        ;;
-            "Query")
-                netdiag_query
+            "Lookup")
+                netdiag_lookup
                 ;;
 			      "Resolver")
 				        netdiag_resolver
@@ -1592,7 +1614,7 @@ dump_file(){
 			      if [ $? -eq 0 ]; then
 				        SEL_FILE=$(cat ${TMPFILE})
 			      else
-				        eval "${DIALOG}  --clear --msgbox 'Dump aborted' \
+				        eval "${DIALOG}   --msgbox 'Dump aborted' \
 						   ${INFO_HEIGHT} ${INFO_WIDTH}"
 				        return
 			      fi
@@ -1608,11 +1630,11 @@ dump_file(){
             eval "netdiag_${c} \"${DUMPFILE}\""
         done
 	  else
-		    eval "${DIALOG}  --clear --msgbox 'Dump aborted' \
+		    eval "${DIALOG}   --msgbox 'Dump aborted' \
 				   ${INFO_HEIGHT} ${INFO_WIDTH}"
         return
 	  fi
-		eval "${DIALOG}  --clear --msgbox 'Status dumped to ${DUMPFILE}' \
+		eval "${DIALOG}   --msgbox 'Status dumped to ${DUMPFILE}' \
 						   ${INFO_HEIGHT} ${INFO_WIDTH}"
 }
 
@@ -1626,7 +1648,7 @@ dump_pastebin(){
 ##function 
 dump_menu(){
 
-    eval "${DIALOG} --clear --checklist 'Select conf to dump' \
+    eval "${DIALOG}  --checklist 'Select conf to dump' \
              ${WINDOW_HEIGHT} ${WINDOW_WIDTH} 10 \
              'ARP' 'ARP table' on \
              'devices' 'Device configuration' on \
@@ -1641,7 +1663,7 @@ dump_menu(){
     
     DUMP_CONF=$(cat ${TMPFILE})
     
-    eval "${DIALOG} --clear --cancel-label 'Up' \
+    eval "${DIALOG}  --cancel-label 'Up' \
            --menu 'Dump configuration to:' \
            ${INFO_HEIGHT} ${INFO_WIDTH} 6 \
            'File' 'Dump to file' \
@@ -1667,7 +1689,7 @@ dump_menu(){
 show_toplevel(){
 
     log "show_toplevel" "TMPFILE: ${TMPFILE}"
-	  eval "${DIALOG} --clear --cancel-label 'Quit' --menu 'Main Menu' \
+	  eval "${DIALOG}  --cancel-label 'Quit' --menu 'Main Menu' \
 		   ${WINDOW_HEIGHT} ${WINDOW_WIDTH} 6 \
 		   'Setup' 'Setup interfaces' \
        'Info' 'Network diagnostics' \
@@ -1717,7 +1739,7 @@ show_disclaimer(){
       Copyleft (C) KatolaZ (katolaz@freaknet.org) 
                     2016, 2017
 
-     -+- This is an alpha release of setnet.sh -+-
+      -+- This is a beta release of setnet.sh -+-
    
                  THIS IS FREE SOFTWARE
         YOU CAN USE AND DISTRIBUTE IT UNDER THE 
@@ -1732,7 +1754,7 @@ show_disclaimer(){
            your right and distribution terms
 EOF
 
-	eval "${DIALOG}  --clear --cr-wrap --textbox ${TMPFILE} 23 60"
+	eval "${DIALOG}   --cr-wrap --textbox ${TMPFILE} 23 60"
 	return
 }
 
@@ -1777,7 +1799,7 @@ initialise(){
 ##function
 log_show(){
     
-    eval "${DIALOG} --clear --cr-wrap --title 'setnet log file (${LOGFILE})'\
+    eval "${DIALOG}  --cr-wrap --title 'setnet log file (${LOGFILE})'\
     --textbox ${LOGFILE} \
     ${WINDOW_HEIGHT} ${WINDOW_WIDTH}"