Merge commit 'e0bcee0206fd3052fd2cf45c587957e6143fd1c7' into dora
With interfaces change from harald and the init script revert
This commit is contained in:
commit
d98550a233
|
@ -0,0 +1,91 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: networking
|
||||||
|
# Required-Start: mountvirtfs $local_fs
|
||||||
|
# Required-Stop: $local_fs
|
||||||
|
# Should-Start: ifupdown
|
||||||
|
# Should-Stop: ifupdown
|
||||||
|
# Default-Start: S
|
||||||
|
# Default-Stop: 0 6
|
||||||
|
# Short-Description: Raise network interfaces.
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
|
||||||
|
|
||||||
|
[ -x /sbin/ifup ] || exit 0
|
||||||
|
|
||||||
|
check_network_file_systems() {
|
||||||
|
[ -e /proc/mounts ] || return 0
|
||||||
|
|
||||||
|
if [ -e /etc/iscsi/iscsi.initramfs ]; then
|
||||||
|
echo "not deconfiguring network interfaces: iSCSI root is mounted."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec 9<&0 < /proc/mounts
|
||||||
|
while read DEV MTPT FSTYPE REST; do
|
||||||
|
case $DEV in
|
||||||
|
/dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
|
||||||
|
echo "not deconfiguring network interfaces: network devices still mounted."
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case $FSTYPE in
|
||||||
|
nfs|nfs4|smbfs|ncp|ncpfs|cifs|coda|ocfs2|gfs|pvfs|pvfs2|fuse.httpfs|fuse.curlftpfs)
|
||||||
|
echo "not deconfiguring network interfaces: network file systems still mounted."
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
exec 0<&9 9<&-
|
||||||
|
}
|
||||||
|
|
||||||
|
check_network_swap() {
|
||||||
|
[ -e /proc/swaps ] || return 0
|
||||||
|
|
||||||
|
exec 9<&0 < /proc/swaps
|
||||||
|
while read DEV MTPT FSTYPE REST; do
|
||||||
|
case $DEV in
|
||||||
|
/dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
|
||||||
|
echo "not deconfiguring network interfaces: network swap still mounted."
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
exec 0<&9 9<&-
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
echo -n "Configuring network interfaces... "
|
||||||
|
mkdir /run/network || true
|
||||||
|
sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1
|
||||||
|
ifup -a
|
||||||
|
echo "done."
|
||||||
|
;;
|
||||||
|
|
||||||
|
stop)
|
||||||
|
check_network_file_systems
|
||||||
|
check_network_swap
|
||||||
|
|
||||||
|
echo -n "Deconfiguring network interfaces... "
|
||||||
|
ifdown -a
|
||||||
|
echo "done."
|
||||||
|
;;
|
||||||
|
|
||||||
|
force-reload|restart)
|
||||||
|
echo "Running $0 $1 is deprecated because it may not enable again some interfaces"
|
||||||
|
echo "Reconfiguring network interfaces... "
|
||||||
|
ifdown -a || true
|
||||||
|
ifup -a
|
||||||
|
echo "done."
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Usage: /etc/init.d/networking {start|stop}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
|
@ -4,15 +4,27 @@
|
||||||
auto lo
|
auto lo
|
||||||
iface lo inet loopback
|
iface lo inet loopback
|
||||||
|
|
||||||
# eth0 is attached to the IDU-internal managed switch
|
# eth0 is attached to the IDU-internal managed switch (IES-3080)
|
||||||
# in the future we will use VLANs to use individual switch ports as
|
# in the future we will use VLANs to use individual switch ports as
|
||||||
# break-out interfaces. For now we simply do static config for use with
|
# break-out interfaces. For now we simply do DHCP.
|
||||||
# the iridium openport satmodem
|
|
||||||
iface eth0 inet static
|
# VLAN 2000: The iridium openport satellite modem attached to
|
||||||
|
# port 1 of the IES-3080
|
||||||
|
auto eth0.2000
|
||||||
|
iface eth0.2000 inet static
|
||||||
address 192.168.0.254
|
address 192.168.0.254
|
||||||
netmask 255.255.255.0
|
netmask 255.255.255.0
|
||||||
network 192.168.0.0
|
network 192.168.0.0
|
||||||
post-up ip r add 10.6.1.0/24 via 192.168.0.1
|
post-up ip r add 10.6.1.0/24 via 192.168.0.1
|
||||||
|
|
||||||
|
# VLAN 2001: Reserved for a future C-Band satellite modem
|
||||||
|
# attached to port 8 of the IES-3080
|
||||||
|
auto eth0.2001
|
||||||
|
iface eth0.2001 inet manual
|
||||||
|
|
||||||
|
# management VLAN of IES-3080 switch (172.16.2.3)
|
||||||
|
auto eth0.6
|
||||||
|
iface eth0.6 inet manual
|
||||||
|
|
||||||
#eth1 is our admin interface and will provide dhcp to clients
|
#eth1 is our admin interface and will provide dhcp to clients
|
||||||
auto eth1
|
auto eth1
|
||||||
|
@ -29,7 +41,6 @@ iface eth2 inet manual
|
||||||
|
|
||||||
# * br0 is a bridge interface on top of eth2
|
# * br0 is a bridge interface on top of eth2
|
||||||
# * we use the bridging code so we can run mstpd and become the root bridge
|
# * we use the bridging code so we can run mstpd and become the root bridge
|
||||||
|
|
||||||
auto br0
|
auto br0
|
||||||
iface br0 inet static
|
iface br0 inet static
|
||||||
bridge_ports eth2
|
bridge_ports eth2
|
||||||
|
@ -38,21 +49,27 @@ iface br0 inet static
|
||||||
netmask 255.255.254.0
|
netmask 255.255.254.0
|
||||||
network 172.16.4.0
|
network 172.16.4.0
|
||||||
|
|
||||||
# VLAN 6: management VLAN
|
# management VLAN towards {N,P}JB
|
||||||
auto br0.6
|
auto br0.6
|
||||||
iface br0.6 inet static
|
iface br0.6 inet manual
|
||||||
|
|
||||||
|
# bridge for VLAN 6: management VLAN
|
||||||
|
auto br-mgmt
|
||||||
|
iface br-mgmt inet static
|
||||||
|
bridge_ports br0.6 eth0.6
|
||||||
|
bridge_maxwait 0
|
||||||
address 172.16.2.1
|
address 172.16.2.1
|
||||||
netmask 255.255.254.0
|
netmask 255.255.254.0
|
||||||
network 172.16.2.0
|
network 172.16.2.0
|
||||||
|
|
||||||
# 172.16.1.1 is the service IP address for SOBMGMT
|
# 172.16.1.1 is the service IP address for SOBMGMT
|
||||||
auto br0.6:0
|
auto br-mgmt:0
|
||||||
iface br0.6:0 inet static
|
iface br-mgmt:0 inet static
|
||||||
address 172.16.1.1
|
address 172.16.1.1
|
||||||
netmask 255.255.255.255
|
netmask 255.255.255.255
|
||||||
|
|
||||||
auto br0.7
|
auto br0.7
|
||||||
iface br0.7 inet static
|
iface br0.7 inet static
|
||||||
address 172.16.7.1
|
address 172.16.7.1
|
||||||
netmask 255.255.255.0
|
netmask 255.255.255.0
|
||||||
network 172.16.7.0
|
network 172.16.7.0
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
SYSMOCOM := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
|
SYSMOCOM := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
|
||||||
FILESEXTRAPATHS_prepend := "${SYSMOCOM}/init-ifupdown-${PV}:${SYSMOCOM}/init-ifupdown:"
|
FILESEXTRAPATHS_prepend := "${SYSMOCOM}/init-ifupdown-${PV}:${SYSMOCOM}/init-ifupdown:"
|
||||||
PRINC = "10"
|
PRINC = "11"
|
||||||
|
|
||||||
# systemd does not look at /etc/rcS.d for the script. Make sure
|
# systemd does not look at /etc/rcS.d for the script. Make sure
|
||||||
# there is a symlink available
|
# there is a symlink available
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
d /run/network - - - -
|
|
|
@ -7,7 +7,6 @@ LICENSE = "GPLv2"
|
||||||
LIC_FILES_CHKSUM = "file://debian/copyright;md5=7adfbe801102d1e7e6bfdd3f03754efa"
|
LIC_FILES_CHKSUM = "file://debian/copyright;md5=7adfbe801102d1e7e6bfdd3f03754efa"
|
||||||
|
|
||||||
SRC_URI = "https://launchpadlibrarian.net/194033720/ifupdown_${PV}.tar.xz \
|
SRC_URI = "https://launchpadlibrarian.net/194033720/ifupdown_${PV}.tar.xz \
|
||||||
file://ifupdown.conf \
|
|
||||||
file://busybox-yocto-compat.patch "
|
file://busybox-yocto-compat.patch "
|
||||||
|
|
||||||
SRC_URI[md5sum] = "bb204ae2fa4171d6f1de4097f4570a7d"
|
SRC_URI[md5sum] = "bb204ae2fa4171d6f1de4097f4570a7d"
|
||||||
|
@ -15,7 +14,7 @@ SRC_URI[sha256sum] = "8a0647c59ee0606f5da9205c5b3c5b000fea98fe39348f6bb2cba5fecf
|
||||||
|
|
||||||
CFLAGS += "-D'IFUPDOWN_VERSION="0.7"'"
|
CFLAGS += "-D'IFUPDOWN_VERSION="0.7"'"
|
||||||
|
|
||||||
PR = "r3"
|
PR = "r2"
|
||||||
|
|
||||||
do_configure() {
|
do_configure() {
|
||||||
chmod a+rx makecdep.sh makenwdep.sh
|
chmod a+rx makecdep.sh makenwdep.sh
|
||||||
|
@ -27,9 +26,6 @@ do_install() {
|
||||||
ln -s ${base_sbindir}/ifup.${BPN} ${D}${base_sbindir}/ifdown.${BPN}
|
ln -s ${base_sbindir}/ifup.${BPN} ${D}${base_sbindir}/ifdown.${BPN}
|
||||||
ln -s ${base_sbindir}/ifup.${BPN} ${D}${base_sbindir}/ifquery
|
ln -s ${base_sbindir}/ifup.${BPN} ${D}${base_sbindir}/ifquery
|
||||||
install -D -m 0755 settle-dad.sh ${D}/lib/ifupdown/settle-dad.sh
|
install -D -m 0755 settle-dad.sh ${D}/lib/ifupdown/settle-dad.sh
|
||||||
|
|
||||||
install -d ${D}${libdir}/tmpfiles.d
|
|
||||||
install -m 0644 ${WORKDIR}/ifupdown.conf ${D}${libdir}/tmpfiles.d/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherit update-alternatives
|
inherit update-alternatives
|
||||||
|
@ -44,4 +40,4 @@ ALTERNATIVE_TARGET[ifup] = "${base_sbindir}/ifup.${BPN}"
|
||||||
ALTERNATIVE_LINK_NAME[ifdown] = "${base_sbindir}/ifdown"
|
ALTERNATIVE_LINK_NAME[ifdown] = "${base_sbindir}/ifdown"
|
||||||
ALTERNATIVE_TARGET[ifdown] = "${base_sbindir}/ifdown.${BPN}"
|
ALTERNATIVE_TARGET[ifdown] = "${base_sbindir}/ifdown.${BPN}"
|
||||||
|
|
||||||
FILES_${PN} += "/lib/ifupdown/settle-dad.sh ${libdir}/tmpfiles.d/*"
|
FILES_${PN} += "/lib/ifupdown/settle-dad.sh"
|
||||||
|
|
Loading…
Reference in New Issue