source: bootscripts/lfs/init.d/localnet@ 35df0584

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 35df0584 was 40f7031, checked in by Jim Gifford <clfs@…>, 19 years ago

r1029@server (orig r1027): jim | 2006-01-08 22:12:20 -0800

r1324@server: jim | 2006-01-08 22:09:38 -0800
localnet: ip link set lo up, will set to loopback address automatically


  • Property mode set to 100644
File size: 936 bytes
Line 
1#!/bin/sh
2########################################################################
3# Begin $rc_base/init.d/localnet
4#
5# Description : Loopback device
6#
7# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
8#
9# Version : 00.00
10#
11# Notes :
12#
13########################################################################
14
15. /etc/sysconfig/rc
16. ${rc_functions}
17. /etc/sysconfig/network
18
19case "${1}" in
20 start)
21 boot_mesg "Bringing up the loopback interface..."
22 ip link set lo up
23 evaluate_retval
24
25 boot_mesg "Setting hostname to ${HOSTNAME}..."
26 hostname ${HOSTNAME}
27 evaluate_retval
28 ;;
29
30 stop)
31 boot_mesg "Bringing down the loopback interface..."
32 ip link set lo down
33 evaluate_retval
34 ;;
35
36 restart)
37 ${0} stop
38 sleep 1
39 ${0} start
40 ;;
41
42 status)
43 echo "Hostname is: $(hostname)"
44 ip link show lo
45 ;;
46
47 *)
48 echo "Usage: ${0} {start|stop|restart|status}"
49 exit 1
50 ;;
51esac
52
53# End $rc_base/init.d/localnet
Note: See TracBrowser for help on using the repository browser.