aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2017-08-10 04:52:59 +0200
committerache <ache@ache.one>2017-08-10 04:52:59 +0200
commit53edaed911ca0416e545537257759c9c5c6d9ac1 (patch)
treeb7f11a5db5aacbae63ec8ac9ef49e6919d539a80
parentTipo / comment (diff)
New prototype
-rwxr-xr-xautoDHCP14
1 files changed, 7 insertions, 7 deletions
diff --git a/autoDHCP b/autoDHCP
index 3e8f872..7c1cdff 100755
--- a/autoDHCP
+++ b/autoDHCP
@@ -33,17 +33,17 @@ function guess_nowifi {
-guess_nowifi
+if [ -z "$interface" ] ; then
+ guess_nowifi
+fi
-interface="$interface"
+echo "Working on $interface"
-echo "$interface"
-
-sudo ip l set enp1s0 up
-sudo ip a a 10.5.5.11/24 dev enp1s0
-sudo /usr/bin/dhcpd -4 -q -pf /run/dhcpd4.pid enp1s0
+sudo ip l set "$interface" up
+sudo ip a r "${ip}${range}" dev "$interface"
+sudo /usr/bin/dhcpd -4 -q -pf /run/dhcpd4.pid "$interface"