clfs-1.2
clfs-2.1
clfs-3.0.0-systemd
clfs-3.0.0-sysvinit
systemd
sysvinit
Last change
on this file since 830ccf9 was d66bf46, checked in by Jim Gifford <clfs@…>, 18 years ago |
Update bootscripts to follow our standards
|
-
Property mode
set to
100644
|
File size:
936 bytes
|
Rev | Line | |
---|
[163a6701] | 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 |
|
---|
| 19 | case "${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 | ;;
|
---|
| 51 | esac
|
---|
| 52 |
|
---|
| 53 | # End $rc_base/init.d/localnet
|
---|
Note:
See
TracBrowser
for help on using the repository browser.