#!/bin/sh #---------------------------------------------------------------------------- # /etc/rc.d/lo - configure loopback interface # # Creation : 2001-10-15 fm # Last Update: $Id$ # # Copyright (c) 2001-@@YEAR@@ the eisfair team, team(at)eisfair(dot)org # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- . /etc/config.d/base . /etc/init.d/functions if [ "${LO_DO_DEBUG}" = "yes" ] then set -x fi boot_mesg " * Configuring loopback and ethernet device ..." case $1 in start) /usr/sbin/ip addr add 127.0.0.1/8 dev lo /usr/sbin/ip link set lo up /usr/sbin/ip route add 127.0.0.0/8 dev lo # /sbin/ifconfig lo 127.0.0.1 netmask 255.0.0.0 up # /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 dev lo evaluate_retval ;; stop) /usr/sbin/ip route del 127.0.0.0/8 dev lo /usr/sbin/ip link set lo down # /sbin/route del -net 127.0.0.0 netmask 255.0.0.0 dev lo # /sbin/ifconfig lo down evaluate_retval ;; esac set +x # --------------------------------------------------------------------------- # end # ---------------------------------------------------------------------------