diff options
Diffstat (limited to 'core/conf/rc.d/net')
-rwxr-xr-x | core/conf/rc.d/net | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/core/conf/rc.d/net b/core/conf/rc.d/net index 53224af..07c46a5 100755 --- a/core/conf/rc.d/net +++ b/core/conf/rc.d/net @@ -4,17 +4,18 @@ # # Connection type: "DHCP" or "static" -TYPE="static" +TYPE="DHCP" # For "static" connections, specify your settings here: # To see your available devices run "ip link". -DEV=enp8s0 -ADDR=192.168.1.9 +DEV=enp11s0 +ADDR=192.168.1.100 MASK=24 -GW=192.168.1.254 +GW=192.168.1.1 # Optional settings: -DHCPOPTS="-h $(/bin/hostname) -C resolv.conf $DEV" +#DHCPOPTS="-h $(/bin/hostname) -C resolv.conf $DEV" +DHCPOPTS="-t 10" case $1 in start) @@ -28,13 +29,17 @@ case $1 in ;; stop) if [ "${TYPE}" = "DHCP" ]; then - /usr/bin/pkill -F /var/run/dhcpcd-${DEV}.pid - + /sbin/dhcpcd -x else + #/sbin/ip route del default + #/sbin/ip link set ${DEV} down + #/sbin/ip addr del ${ADDR}/${MASK} dev ${DEV} + /sbin/ip route del default dev ${DEV} /sbin/ip route flush dev ${DEV} - /sbin/ip link set ${DEV} down - /sbin/ip addr flush dev ${DEV} + /sbin/ip link set ${DEV} down + /sbin/ip addr flush dev ${DEV} + fi ;; restart) |