aboutsummaryrefslogtreecommitdiffstats
path: root/bootscripts/contrib/lsb-v3/sysconfig/network-devices
diff options
context:
space:
mode:
Diffstat (limited to 'bootscripts/contrib/lsb-v3/sysconfig/network-devices')
-rw-r--r--bootscripts/contrib/lsb-v3/sysconfig/network-devices/ifdown93
-rw-r--r--bootscripts/contrib/lsb-v3/sysconfig/network-devices/ifup87
-rw-r--r--bootscripts/contrib/lsb-v3/sysconfig/network-devices/services/ipv4-static80
-rw-r--r--bootscripts/contrib/lsb-v3/sysconfig/network-devices/services/ipv4-static-route92
4 files changed, 0 insertions, 352 deletions
diff --git a/bootscripts/contrib/lsb-v3/sysconfig/network-devices/ifdown b/bootscripts/contrib/lsb-v3/sysconfig/network-devices/ifdown
deleted file mode 100644
index 28d1f1813..000000000
--- a/bootscripts/contrib/lsb-v3/sysconfig/network-devices/ifdown
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/bin/sh
-########################################################################
-# Begin $NETWORK_DEVICES/ifdown
-#
-# Description : Interface Down
-#
-# Authors : Nathan Coulson - nathan@linuxfromscratch.org
-# Kevin P. Fleming - kpfleming@linuxfromscratch.org
-#
-# Version : 00.01
-#
-# Notes : the IFCONFIG variable is passed to the scripts found
-# in the services directory, to indicate what file the
-# service should source to get environmental variables.
-#
-########################################################################
-
-. /lib/lsb/init-functions
-
-# Collect a list of configuration files for our interface
-if [ -n "${2}" ]; then
- for file in ${@#$1}; do # All parameters except $1
- FILES="${FILES} ${NETWORK_DEVICES}/ifconfig.${1}/${file}"
- done
-elif [ -d "${NETWORK_DEVICES}/ifconfig.${1}" ]; then
- FILES=`echo ${NETWORK_DEVICES}/ifconfig.${1}/*`
-else
- FILES="${NETWORK_DEVICES}/ifconfig.${1}"
-fi
-
-# Reverse the order configuration files are processed in
-for file in ${FILES}; do
- FILES2="${file} ${FILES2}"
-done
-FILES=${FILES2}
-
-# Process each configuration file
-for file in ${FILES}; do
- # skip backup files
- if [ "${file}" != "${file%""~""}" ]; then
- continue
- fi
-
- if [ ! -f "${file}" ]; then
- message="${file} is not a network configuration file or directory."
- log_warning_msg
- fi
- (
- . ${file}
-
- # Will not process this service if started by boot, and ONBOOT
- # is not set to yes
- if [ "${IN_BOOT}" = "1" -a "${ONBOOT}" != "yes" ]; then
- continue
- fi
-
- # Will not process this service if started by hotplug, and
- # ONHOTPLUG is not set to yes
- if [ "${IN_HOTPLUG}" = "1" -a "${ONHOTPLUG}" != "yes" ]; then
- continue
- fi
-
- # This will run the service script, if SERVICE is set
- if [ -n "${SERVICE}" -a -x "${NETWORK_DEVICES}/services/${SERVICE}" ]; then
- if ip link show ${1} > /dev/null 2>&1
- then
- IFCONFIG=${file} ${NETWORK_DEVICES}/services/${SERVICE} ${1} down
- else
- message="Interface ${1} doesn't exist."
- log_warning_msg
- fi
- else
- echo -e "${FAILURE}Unable to process ${file}. Either"
- echo -e "${FAILURE}the SERVICE variable was not set,"
- echo -e "${FAILURE}or the specified service cannot be executed."
- message=""
- log_failure_msg
- fi
- )
-done
-
-if [ -z "${2}" ]; then
- link_status=`ip link show $1`
- if [ -n "${link_status}" ]; then
- if echo "${link_status}" | grep -q UP; then
- message="Bringing down the ${1} interface..."
- ip link set ${1} down
- evaluate_retval standard
- fi
- fi
-fi
-
-# End $NETWORK_DEVICES/ifdown
diff --git a/bootscripts/contrib/lsb-v3/sysconfig/network-devices/ifup b/bootscripts/contrib/lsb-v3/sysconfig/network-devices/ifup
deleted file mode 100644
index 50e173ca6..000000000
--- a/bootscripts/contrib/lsb-v3/sysconfig/network-devices/ifup
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/sh
-########################################################################
-# Begin $NETWORK_DEVICES/ifup
-#
-# Description : Interface Up
-#
-# Authors : Nathan Coulson - nathan@linuxfromscratch.org
-# Kevin P. Fleming - kpfleming@linuxfromscratch.org
-#
-# Version : 00.00
-#
-# Notes : the IFCONFIG variable is passed to the scripts found
-# in the services directory, to indicate what file the
-# service should source to get environmental variables.
-#
-########################################################################
-
-. /lib/lsb/init-functions
-
-# Collect a list of configuration files for our interface
-if [ -n "${2}" ]; then
- for file in ${@#$1} # All parameters except $1
- do
- FILES="${FILES} ${NETWORK_DEVICES}/ifconfig.${1}/${file}"
- done
-elif [ -d "${NETWORK_DEVICES}/ifconfig.${1}" ]; then
- FILES=`echo ${NETWORK_DEVICES}/ifconfig.${1}/*`
-else
- FILES="${NETWORK_DEVICES}/ifconfig.${1}"
-fi
-
-message="Bringing up the ${1} interface..."
-
-# Process each configruation file
-for file in ${FILES}; do
- # skip backup files
- if [ "${file}" != "${file%""~""}" ]; then
- continue
- fi
-
- if [ ! -f "${file}" ]; then
- log_warning_msg
- message="${file} is not a network configuration file or directory."
- log_warning_msg
- fi
-
- (
- . ${file}
-
- # Will not process this service if started by boot, and ONBOOT
- # is not set to yes
- if [ "${IN_BOOT}" = "1" -a "${ONBOOT}" != "yes" ]; then
- continue
- fi
- # Will not process this service if started by hotplug, and
- # ONHOTPLUG is not set to yes
- if [ "${IN_HOTPLUG}" = "1" -a "${ONHOTPLUG}" != "yes" -a "${HOSTNAME}" != "(none)" ]; then
- continue
- fi
-
- if [ -n "${SERVICE}" -a -x "${NETWORK_DEVICES}/services/${SERVICE}" ]; then
- if [ -z "${CHECK_LINK}" -o "${CHECK_LINK}" = "y" -o "${CHECK_LINK}" = "yes" -o "${CHECK_LINK}" = "1" ]; then
- if ip link show ${1} > /dev/null 2>&1; then
- link_status=`ip link show ${1}`
- if [ -n "${link_status}" ]; then
- if ! echo "${link_status}" | grep -q UP; then
- ip link set ${1} up
- evaluate_retval standard
- fi
- fi
- else
- message="${message}Interface ${1} doesn't exist."
- log_warning_msg
- fi
- fi
- IFCONFIG=${file} ${NETWORK_DEVICES}/services/${SERVICE} ${1} up
- else
- echo -e "${FAILURE}Unable to process ${file}. Either"
- echo -e "${FAILURE}the SERVICE variable was not set,"
- echo -e "${FAILURE}or the specified service cannot be executed."
- message=""
- log_failure_msg
- fi
- )
-done
-
-# End $NETWORK_DEVICES/ifup
diff --git a/bootscripts/contrib/lsb-v3/sysconfig/network-devices/services/ipv4-static b/bootscripts/contrib/lsb-v3/sysconfig/network-devices/services/ipv4-static
deleted file mode 100644
index 417d22de6..000000000
--- a/bootscripts/contrib/lsb-v3/sysconfig/network-devices/services/ipv4-static
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/sh
-########################################################################
-# Begin $NETWORK_DEVICES/services/ipv4-static
-#
-# Description : IPV4 Static Boot Script
-#
-# Authors : Nathan Coulson - nathan@linuxfromscratch.org
-# Kevin P. Fleming - kpfleming@linuxfromscratch.org
-#
-# Version : 00.00
-#
-# Notes :
-#
-########################################################################
-
-. /lib/lsb/init-functions
-. ${IFCONFIG}
-
-if [ -z "${IP}" ]; then
- log_failure_msg "IP variable missing from ${IFCONFIG}, cannot continue."
- exit 1
-fi
-
-if [ -z "${PREFIX}" -a -z "${PEER}" ]; then
- log_warning_msg "PREFIX variable missing from ${IFCONFIG}, assuming 24."
- PREFIX=24
- args="${args} ${IP}/${PREFIX}"
-elif [ -n "${PREFIX}" -a -n "${PEER}" ]; then
- log_failure_msg "PREFIX and PEER both specified in ${IFCONFIG}, cannot continue."
- exit 1
-elif [ -n "${PREFIX}" ]; then
- args="${args} ${IP}/${PREFIX}"
-elif [ -n "${PEER}" ]; then
- args="${args} ${IP} peer ${PEER}"
-fi
-
-if [ -n "${BROADCAST}" ]; then
- args="${args} broadcast ${BROADCAST}"
-fi
-
-if [ -n "${SOURCE}" ]; then
- args="${args} src ${SOURCE}"
-fi
-
-case "${2}" in
- up)
- MESSAGE="Adding IPv4 address ${IP} to the ${1} interface..."
- ip addr add ${args} dev ${1}
- evaluate_retval
-
- if [ -n "${GATEWAY}" ]; then
- if ip route | grep -q default; then
- log_warning_msg "Gateway already setup; skipping." ${WARNING}
- else
- MESSAGE="Setting up default gateway..."
- ip route add default via ${GATEWAY} dev ${1}
- evaluate_retval
- fi
- fi
- ;;
-
- down)
- if [ -n "${GATEWAY}" ]; then
- MESSAGE="Removing default gateway..."
- ip route del default
- evaluate_retval
- fi
-
- MESSAGE="Removing IPv4 address ${IP} from the ${1} interface..."
- ip addr del ${args} dev ${1}
- evaluate_retval
- ;;
-
- *)
- echo "Usage: ${0} [interface] {up|down}"
- exit 1
- ;;
-esac
-
-# End $NETWORK_DEVICES/services/ipv4-static
diff --git a/bootscripts/contrib/lsb-v3/sysconfig/network-devices/services/ipv4-static-route b/bootscripts/contrib/lsb-v3/sysconfig/network-devices/services/ipv4-static-route
deleted file mode 100644
index 4205a022d..000000000
--- a/bootscripts/contrib/lsb-v3/sysconfig/network-devices/services/ipv4-static-route
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/bin/sh
-########################################################################
-# Begin $NETWORK_DEVICES/services/ipv4-static-route
-#
-# Description : IPV4 Static Route Script
-#
-# Authors : Kevin P. Fleming - kpfleming@linuxfromscratch.org
-#
-# Version : 00.00
-#
-# Notes :
-#
-########################################################################
-
-. /lib/lsb/init-functions
-. ${IFCONFIG}
-
-case "${TYPE}" in
- ("" | "network")
- need_ip=1
- need_gateway=1
- ;;
-
- ("default")
- need_gateway=1
- args="${args} default"
- desc="default"
- ;;
-
- ("host")
- need_ip=1
- ;;
-
- ("unreachable")
- need_ip=1
- args="${args} unreachable"
- desc="unreachable "
- ;;
-
- (*)
- boot_mesg "Unknown route type (${TYPE}) in ${IFCONFIG}, cannot continue." ${FAILURE}
- echo_failure
- exit 1
- ;;
-esac
-
-if [ -n "${need_ip}" ]; then
- if [ -z "${IP}" ]; then
- boot_mesg "IP variable missing from ${IFCONFIG}, cannot continue." ${FAILURE}
- echo_failure
- exit 1
- fi
-
- if [ -z "${PREFIX}" ]; then
- boot_mesg "PREFIX variable missing from ${IFCONFIG}, cannot continue." ${FAILURE}
- echo_failure
- exit 1
- fi
-
- args="${args} ${IP}/${PREFIX}"
- desc="${desc}${IP}/${PREFIX}"
-fi
-
-if [ -n "${need_gateway}" ]; then
- if [ -z "${GATEWAY}" ]; then
- boot_mesg "GATEWAY variable missing from ${IFCONFIG}, cannot continue." ${FAILURE}
- echo_failure
- exit 1
- fi
- args="${args} via ${GATEWAY}"
-fi
-
-case "${2}" in
- up)
- boot_mesg "Adding '${desc}' route to the ${1} interface..."
- ip route add ${args} dev ${1}
- evaluate_retval
- ;;
-
- down)
- boot_mesg "Removing '${desc}' route from the ${1} interface..."
- ip route del ${args} dev ${1}
- evaluate_retval
- ;;
-
- *)
- echo "Usage: ${0} [interface] {up|down}"
- exit 1
- ;;
-esac
-
-# End $NETWORK_DEVICES/services/ipv4-static-route