From dc739f3c2746df95e38075dd38af53e5adf7330a Mon Sep 17 00:00:00 2001 From: Henning Heinold Date: Tue, 28 Apr 2015 17:59:46 +0200 Subject: [PATCH] init-ifupdown: Revert - Take the force solution and make our script available This reverts commit 9934406adea76c57b4f1c34cbf9dfe6e5db35515. Fixes: SYS#1534 --- .../init-ifupdown/{sysmobts-v1 => }/init | 0 .../init-ifupdown/sysmobts-v2/init | 91 ------------------- .../init-ifupdown/sysmocom-bsc/init | 91 ------------------- .../init-ifupdown/sysmocom-idu/init | 91 ------------------- .../init-ifupdown/sysmocom-odu/init | 91 ------------------- 5 files changed, 364 deletions(-) rename recipes-bsp/init-ifupdown/init-ifupdown/{sysmobts-v1 => }/init (100%) delete mode 100644 recipes-bsp/init-ifupdown/init-ifupdown/sysmobts-v2/init delete mode 100644 recipes-bsp/init-ifupdown/init-ifupdown/sysmocom-bsc/init delete mode 100644 recipes-bsp/init-ifupdown/init-ifupdown/sysmocom-idu/init delete mode 100644 recipes-bsp/init-ifupdown/init-ifupdown/sysmocom-odu/init diff --git a/recipes-bsp/init-ifupdown/init-ifupdown/sysmobts-v1/init b/recipes-bsp/init-ifupdown/init-ifupdown/init similarity index 100% rename from recipes-bsp/init-ifupdown/init-ifupdown/sysmobts-v1/init rename to recipes-bsp/init-ifupdown/init-ifupdown/init diff --git a/recipes-bsp/init-ifupdown/init-ifupdown/sysmobts-v2/init b/recipes-bsp/init-ifupdown/init-ifupdown/sysmobts-v2/init deleted file mode 100644 index 986a2eb..0000000 --- a/recipes-bsp/init-ifupdown/init-ifupdown/sysmobts-v2/init +++ /dev/null @@ -1,91 +0,0 @@ -#!/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 - diff --git a/recipes-bsp/init-ifupdown/init-ifupdown/sysmocom-bsc/init b/recipes-bsp/init-ifupdown/init-ifupdown/sysmocom-bsc/init deleted file mode 100644 index 986a2eb..0000000 --- a/recipes-bsp/init-ifupdown/init-ifupdown/sysmocom-bsc/init +++ /dev/null @@ -1,91 +0,0 @@ -#!/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 - diff --git a/recipes-bsp/init-ifupdown/init-ifupdown/sysmocom-idu/init b/recipes-bsp/init-ifupdown/init-ifupdown/sysmocom-idu/init deleted file mode 100644 index 986a2eb..0000000 --- a/recipes-bsp/init-ifupdown/init-ifupdown/sysmocom-idu/init +++ /dev/null @@ -1,91 +0,0 @@ -#!/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 - diff --git a/recipes-bsp/init-ifupdown/init-ifupdown/sysmocom-odu/init b/recipes-bsp/init-ifupdown/init-ifupdown/sysmocom-odu/init deleted file mode 100644 index 986a2eb..0000000 --- a/recipes-bsp/init-ifupdown/init-ifupdown/sysmocom-odu/init +++ /dev/null @@ -1,91 +0,0 @@ -#!/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 -