Skip to content

Commit

Permalink
Typo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
BiteDasher committed May 17, 2020
1 parent 2b5249f commit b78d57c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions wifigui
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ if [ ! -d /etc/wifiman0 ]; then mkdir /etc/wifiman0; else true; fi
if [ "$(ls -ld /etc/wifiman0 | cut -d' ' -f 1)" != "drwxr-----" ]; then chmod 740 /etc/wifiman0; fi
if [ ! -f /etc/wifiman0/.dhcp ]; then
if [ "$(command -v dhcpcd dhclient | wc -l)" == 2 ]; then
zenity --list --title="Choose dhcp client" --text="If you do not see the difference, choose dhcplient" --width=300 --height=250 --radiolist \
zenity --list --title="Choose dhcp client" --text="If you do not see the difference, choose dhclient" --width=300 --height=250 --radiolist \
--column="Pick" --column="Client" \
FALSE dhcpcd \
FALSE dhclient > "$wfile"
case $(cat $wfile) in
dhcpcd) future_dhcp=dhcpcd ;; dhclient) future_dhcp=dhcpcd ;; *) echo "Error."; exit 6 ;; esac
dhcpcd) future_dhcp=dhcpcd ;; dhclient) future_dhcp=dhclient ;; *) echo "Error."; exit 6 ;; esac
zenity --info --title="Information" --text="$(cat $wfile) selected."; echo $future_dhcp > /etc/wifiman0/.dhcp
else
if [ -n "$(command -v dhcpcd)" ]; then future_dhcp=dhcpcd; echo $future_dhcp > /etc/wifiman0/.dhcp
else
if [ -n "$(command -v dhclient)" ]; then future_dhcp=dhclient; echo $future_dhcp > /etc/wifiman0/.dhcp; zenity --error --text "DHCP client not found" --width=300 --height=100; exit 8; fi
if [ -n "$(command -v dhclient)" ]; then future_dhcp=dhclient; echo $future_dhcp > /etc/wifiman0/.dhcp; else zenity --error --text "DHCP client not found" --width=300 --height=100; exit 8; fi
fi; fi; fi
bruh() {
zenity --list --title="WifiMan GUI Manager" \
Expand Down
4 changes: 2 additions & 2 deletions wifiman
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ fi
[[ $cont == 1 ]] && echo "Continue anyway?" && read ques && case $ques in Y*|y*) unset cont ;; *) exit 1 ;; esac; fi
if [ ! -f /etc/wifiman0/.dhcp ]; then
if [ "$(command -v dhcpcd dhclient | wc -l)" == 2 ]; then
echo -e "\033[0;32mIt seems like you have two DHCP clients.\033[0m \033[0;33mdhcpcd\033[0m and \033[0;33mdhclient\033[0m. Which one to use? (If you do not see the difference, choose \033[0;35mdhcplient\033[0m) If you need to change this, execute \033[1;36mwifiman -u CLIENT\033[0m.
echo -e "\033[0;32mIt seems like you have two DHCP clients.\033[0m \033[0;33mdhcpcd\033[0m and \033[0;33mdhclient\033[0m. Which one to use? (If you do not see the difference, choose \033[0;35mdhclient\033[0m) If you need to change this, execute \033[1;36mwifiman -u CLIENT\033[0m.
1. dhcpcd
2. dhclient"
read -rp "> " dhcp_choice
case $dhcp_choice in
1) future_dhcp=dhcpcd ;; 2) future_dhcp=dhclient ;; dhcp*) future_dhcp=dhcpcd ;; dhcl*) future_dhcp=dhcpcd ;; *) echo "Error. Unknown DHCP client."; exit 6 ;; esac
1) future_dhcp=dhcpcd ;; 2) future_dhcp=dhclient ;; dhcp*) future_dhcp=dhcpcd ;; dhcl*) future_dhcp=dhclient ;; *) echo "Error. Unknown DHCP client."; exit 6 ;; esac
echo -e "You have chosen \033[0;33m${future_dhcp}\033[0m"; echo $future_dhcp > /etc/wifiman0/.dhcp
else
if [ -n "$(command -v dhcpcd)" ]; then future_dhcp=dhcpcd; echo $future_dhcp > /etc/wifiman0/.dhcp
Expand Down

0 comments on commit b78d57c

Please sign in to comment.