about summary refs log tree commit diff stats
path: root/core/conf/rc.d/net
diff options
context:
space:
mode:
authorSilvino Silva <silvino@bk.ru>2017-08-02 01:04:50 +0100
committerSilvino Silva <silvino@bk.ru>2017-08-02 01:04:50 +0100
commitb1b5779493352c72cced0251625d0b850ebac5b8 (patch)
tree0f40548a2b5c8eaf9bd99423e21b8baf63b83d65 /core/conf/rc.d/net
parented23bb3344ec5be2893db8d8d838c38c9f2baacd (diff)
parent65167272a3ba52dc4d032a1c60a9ff030408047d (diff)
downloaddoc-b1b5779493352c72cced0251625d0b850ebac5b8.tar.gz
new release 0.3.1
Diffstat (limited to 'core/conf/rc.d/net')
-rwxr-xr-xcore/conf/rc.d/net23
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)