home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
tusportal.tus.k12.pa.us
/
tusportal.tus.k12.pa.us.tar
/
tusportal.tus.k12.pa.us
/
Wyse
/
latest-image.raw
/
0.img
/
etc
/
init.d
/
boot.localnet
< prev
next >
Wrap
Text File
|
2010-05-05
|
2KB
|
82 lines
#! /bin/sh
#
# Copyright (c) 2001-2002 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
#
# /etc/init.d/boot.localnet
#
### BEGIN INIT INFO
# Provides: boot.localnet
# Required-Start: boot.cleanup
# Required-Stop: $null
# Default-Start: B
# Default-Stop:
# Short-Description: setup hostname and yp
# Description: setup hostname and yp
### END INIT INFO
. /etc/rc.status
. /etc/sysconfig/cron
rc_reset
case "$1" in
start)
# clean up old yp bindings
rm -f /var/yp/binding/*.[12] 2>/dev/null
#
# set hostname and domainname
#
XHOSTNAME=""
test -f /etc/HOSTNAME && {
XHOSTNAME=`cat /etc/HOSTNAME`
}
test -n "$HOSTNAME" -a "$HOSTNAME" != '(none)' && {
echo Using boot-specified hostname \'${HOSTNAME}\'
XHOSTNAME="$HOSTNAME"
}
test -n "$XHOSTNAME" && {
echo -n Setting up hostname \'${XHOSTNAME%%.*}\'
hostname ${XHOSTNAME%%.*}
rc_status -v -r
}
XDOMAINNAME=""
test -f /etc/defaultdomain && {
XDOMAINNAME=`cat /etc/defaultdomain`
}
test -n "$XDOMAINNAME" && {
echo -n Setting up NIS domainname \'$XDOMAINNAME\'
}
domainname "$XDOMAINNAME"
test -n "$XDOMAINNAME" && {
rc_status -v -r
}
unset XHOSTNAME
unset XDOMAINNAME
test -x /sbin/ifup -a -f /etc/sysconfig/network/ifcfg-lo && {
echo -n "Setting up loopback interface "
/sbin/ifup lo -o rc manual
rc_status -v -r
}
;;
stop|restart)
# skip / nothing to do
;;
status)
# assume we have been run
rc_reset
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
;;
esac
rc_exit