diff options
author | DJ Lucas <dj@linuxfromscratch.org> | 2011-05-15 03:17:07 +0000 |
---|---|---|
committer | DJ Lucas <dj@linuxfromscratch.org> | 2011-05-15 03:17:07 +0000 |
commit | 63a2c2d454e05553cb83f3656108838f46975ba6 (patch) | |
tree | 1a025d83023b0dcd87259c0b78818b3e2c338692 /bootscripts/contrib/lsb-v3/etc/init.d/localnet | |
parent | dcae1d7df3deb6ae9a24b90d83f66feff49c93b0 (diff) |
Moved BOOK/bootscripts/contrib/lsb-v3 to BOOK/lsb-bootscripts.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9538 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'bootscripts/contrib/lsb-v3/etc/init.d/localnet')
-rw-r--r-- | bootscripts/contrib/lsb-v3/etc/init.d/localnet | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/bootscripts/contrib/lsb-v3/etc/init.d/localnet b/bootscripts/contrib/lsb-v3/etc/init.d/localnet deleted file mode 100644 index 322bb8749..000000000 --- a/bootscripts/contrib/lsb-v3/etc/init.d/localnet +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/sh -# Begin /etc/init.d/localnet - -### BEGIN INIT INFO -# Provides: localnet -# Required-Start: $local_fs -# Should-Start: -# Required-Stop: -# Should-Stop: -# Default-Start: S -# Default-Stop: 0 6 -# Short-Description: Starts the local network. -# Description: Sets the hostname of the machine and starts the -# loopback interface. -# X-LFS-Provided-By: LFS -### END INIT INFO - -. /lib/lsb/init-functions - -case "${1}" in - start) - ip addr add 127.0.0.1/8 label lo dev lo - ip link set lo up - if [ "${?}" -eq "0" ] - then - log_success_msg "Bringing up the loopback interface..." - else - log_failure_msg "Bringing up the loopback interface..." - fi - - hostname "${HOSTNAME}" - if [ "${?}" -eq "0" ] - then - log_success_msg "Setting hostname to ${HOSTNAME}..." - else - log_failure_msg "Setting hostname to ${HOSTNAME}..." - fi - - ;; - - stop) - ip link set lo down - if [ "${?}" -eq "0" ] - then - log_success_msg "Bringing down the loopback interface..." - else - log_failure_msg "Bringing down the loopback interface..." - fi - - ;; - - restart) - ip link set lo down - retval="${?}" - sleep 1 - ip addr add 127.0.0.1/8 label lo dev lo - retval=$(( "${retval}" + "${?}" )) - ip link set lo up - retval=$(( "${retval}" + "${?}" )) - hostname "${HOSTNAME}" - retval=$(( "${retval}" + "${?}" )) - if [ "${retval}" -eq "0" ] - then - log_success_msg "Restarting local network..." - else - log_failure_msg "Restarting local network..." - fi - ;; - - status) - log_success_msg "Hostname is: ${INFO}$(hostname)${NORMAL}" - ip link show lo - ;; - - *) - echo "Usage: ${0} {start|stop|restart|status}" - exit 1 - ;; -esac - -# End /etc/init.d/localnet |