about summary refs log tree commit diff stats
path: root/core/conf
diff options
context:
space:
mode:
authorSilvino Silva <silvino@bk.ru>2016-10-16 15:28:56 +0100
committerSilvino Silva <silvino@bk.ru>2016-10-16 15:38:43 +0100
commitfef9ed6a55e118baacefe32caa740650ad01ecc3 (patch)
treeb1b8d794b145431b9b297f399f7e4396b810ed57 /core/conf
parent041c2fb6ddca26f2527a4e8ef4ba44ffb08b1bd9 (diff)
downloaddoc-fef9ed6a55e118baacefe32caa740650ad01ecc3.tar.gz
More compatible ip for init net script
and revision of core network document.
Diffstat (limited to 'core/conf')
-rwxr-xr-xcore/conf/rc.d/net8
-rwxr-xr-xcore/conf/rc.d/wlan2
2 files changed, 7 insertions, 3 deletions
diff --git a/core/conf/rc.d/net b/core/conf/rc.d/net
index d46583b..53224af 100755
--- a/core/conf/rc.d/net
+++ b/core/conf/rc.d/net
@@ -9,9 +9,9 @@ TYPE="static"
 # For "static" connections, specify your settings here:
 # To see your available devices run "ip link".
 DEV=enp8s0
-ADDR=10.0.0.1
+ADDR=192.168.1.9
 MASK=24
-GW=10.0.0.1
+GW=192.168.1.254
 
 # Optional settings:
 DHCPOPTS="-h $(/bin/hostname) -C resolv.conf $DEV"
@@ -23,7 +23,7 @@ case $1 in
 		else
 			/sbin/ip addr add ${ADDR}/${MASK} dev ${DEV} broadcast +
 			/sbin/ip link set ${DEV} up
-			#/sbin/ip route add default via ${GW}
+			/sbin/ip route add default via ${GW}
 		fi
 		;;
 	stop)
@@ -31,6 +31,8 @@ case $1 in
 			/usr/bin/pkill -F /var/run/dhcpcd-${DEV}.pid
 
 		else
+                        /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}
 		fi
diff --git a/core/conf/rc.d/wlan b/core/conf/rc.d/wlan
index 263cf42..894a69c 100755
--- a/core/conf/rc.d/wlan
+++ b/core/conf/rc.d/wlan
@@ -33,6 +33,8 @@ case $1 in
 		( $SSD --stop --retry 10 --pidfile $PID_DHCP
 		  $SSD --stop --retry 10 --pidfile $PID_WIFI )
 		RETVAL=$?
+                /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}
 		;;