mirror of https://github.com/hak5/openwrt-owl.git
base-files: add /etc/iproute2/rt_tables, replace ifconfig-usage
Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 46830owl
parent
899a23227e
commit
00045fe9d0
|
@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||||
include $(INCLUDE_DIR)/version.mk
|
include $(INCLUDE_DIR)/version.mk
|
||||||
|
|
||||||
PKG_NAME:=base-files
|
PKG_NAME:=base-files
|
||||||
PKG_RELEASE:=158
|
PKG_RELEASE:=159
|
||||||
|
|
||||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
||||||
PKG_BUILD_DEPENDS:=opkg/host usign/host
|
PKG_BUILD_DEPENDS:=opkg/host usign/host
|
||||||
|
@ -57,6 +57,7 @@ define Package/base-files/conffiles
|
||||||
/etc/crontabs/
|
/etc/crontabs/
|
||||||
/etc/sysctl.d/local.conf
|
/etc/sysctl.d/local.conf
|
||||||
/etc/sysctl.d/
|
/etc/sysctl.d/
|
||||||
|
/etc/iproute2/rt_tables
|
||||||
$(call $(TARGET)/conffiles)
|
$(call $(TARGET)/conffiles)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
#
|
||||||
|
# reserved values
|
||||||
|
#
|
||||||
|
255 local
|
||||||
|
254 main
|
||||||
|
253 default
|
||||||
|
0 unspec
|
||||||
|
#
|
||||||
|
# local
|
||||||
|
#
|
||||||
|
#1 inr.ruhep
|
|
@ -10,13 +10,15 @@ preinit_ip() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
|
[ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
|
||||||
ifconfig $pi_ifname $pi_ip netmask $pi_netmask broadcast $pi_broadcast up
|
ip link set dev $pi_ifname up
|
||||||
|
ip -4 address add $pi_ip/$pi_netmask broadcast $pi_broadcast dev $pi_ifname
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
preinit_ip_deconfig() {
|
preinit_ip_deconfig() {
|
||||||
[ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
|
[ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
|
||||||
ifconfig $pi_ifname 0.0.0.0 down
|
ip -4 address flush dev $pi_ifname
|
||||||
|
ip link set dev $pi_ifname down
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue