From 53edaed911ca0416e545537257759c9c5c6d9ac1 Mon Sep 17 00:00:00 2001 From: ache Date: Thu, 10 Aug 2017 04:52:59 +0200 Subject: New prototype --- autoDHCP | 14 +++++++------- 1 file 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" -- cgit v1.2.3