1
0

Source code upload

This commit is contained in:
calmsacibis995
2022-09-29 17:59:04 +03:00
parent 72fa9da3d7
commit 8fc8fa8089
33399 changed files with 11964078 additions and 0 deletions

57
eoe/cmd/initpkg/init.d/CMW Executable file
View File

@@ -0,0 +1,57 @@
#!/sbin/sh
#Tag 0x00000f00
#
# Start CMW Display Manager
#
# $Revision: 1.4 $
#
IS_ON=/sbin/chkconfig
CMW=CMWloop
CONSOLE=/dev/null
REMOTEHOST=
REMOTEUSER=
DISPLAY=:0
export REMOTEHOST
export REMOTEUSER
export DISPLAY
if $IS_ON verbose ; then # For a verbose startup and shutdown
ECHO=echo
else # For a quiet startup and shutdown
ECHO=:
fi
if $IS_ON xdm ; then
$ECHO CMW startup warning: Xdm is not used in the CMW environment.
$IS_ON xdm off
fi
case "$1" in
'start')
$ECHO 'CMW \c'
/sbin/suattr -C "all=epi" -M dblow -c /usr/bin/X11/"$CMW" > $CONSOLE 2>&1 &
;;
'stop')
/sbin/killall -TERM $CMW
/sbin/killall -TERM 4Dwm
/sbin/killall -TERM xinit
/sbin/killall -TERM Xsgi
/sbin/killall -KILL $CMW
/sbin/killall -KILL 4Dwm
/sbin/killall -KILL xinit
/sbin/killall -KILL Xsgi
/sbin/killall -KILL endsession
/sbin/killall -KILL xprop
;;
*)
echo "usage: /etc/init.d/CMW {start|stop}"
;;
esac

View File

@@ -0,0 +1,148 @@
#!/sbin/sh
#Tag 0x00000f00
#
# CMW Configuration checks.
#
# $Revision: 1.8 $
#
IS_ON=/sbin/chkconfig
#
# turn(option, on/off)
#
# This function is used to deal with /etc/config entries which are
# not root writable. At least one (desktop) of the option flag files
# is installed thus.
#
turn ()
{
/sbin/suattr -C CAP_DAC_WRITE+ep -c "/sbin/chkconfig $1 $2"
}
#
# remove(path)
#
# This function is used to deal with ill-behaved scripts which cause
# errors in the Trix environment. it should be called with the full
# path of the appropriate rc?.d link; do not call it with the init.d path.
# Whenever possible, turning off chkconfig options is preferred over
# removing links.
#
remove()
{
if [ -f "$1" ]; then
/usr/bin/rm "$1"
echo "$1 removed for the CMW environment."
else
:
fi
}
cronmaccheck ()
{
if test "`sysconf MAC`" -eq 1; then
if test ! -d $1; then
/sbin/suattr -m -C all=eip -c "rm -rf $1"
mkdir $1
/sbin/suattr -C all=eip -c "chlabel msenmldlow/minthigh $1"
fi
fi
}
if $IS_ON verbose ; then # For a verbose startup and shutdown
ECHO=echo
else
if $IS_ON CMWquiet ; then # For a verbose startup and shutdown
ECHO=:
else # For a quiet startup and shutdown
ECHO=echo
fi
fi
case "$1" in
'start')
$ECHO 'CMW Configuration checks...'
if $IS_ON xdm ; then
$ECHO CMW: xdm cannot be used.
turn xdm off
fi
if $IS_ON visuallogin ; then
$ECHO CMW: visuallogin cannot be used.
turn visuallogin off
fi
if $IS_ON objectserver ; then
$ECHO CMW: objectserver cannot be used.
turn objectserver off
fi
if $IS_ON directoryserver ; then
$ECHO CMW: directoryserver cannot be used.
turn directoryserver off
fi
if $IS_ON desktop ; then
$ECHO CMW: desktop cannot be used.
turn desktop off
fi
if $IS_ON lockd ; then
$ECHO CMW: lockd cannot be used.
turn lockd off
fi
if $IS_ON audit ; then
: OKay
else
$ECHO Note: audit should be used in the CMW environment.
fi
if $IS_ON timed ; then
: OKay
else
$ECHO Note: timed should be used in the CMW environment.
fi
if $IS_ON lockd ; then
$ECHO CMW: lockd cannot be used.
turn lockd off
fi
# checks added for Irix 6.5se
if $IS_ON autoconfig_ipaddress ; then
$ECHO CMW: DHCP cannot be used.
turn autoconfig_ipaddress off
fi
if $IS_ON sdpd ; then
$ECHO CMW: sdpd cannot be used.
turn sdpd off
fi
if $IS_ON ns_admin ; then
$ECHO CMW: ns_admin cannot be used.
turn ns_admin off
fi
if $IS_ON ns_fasttrack ; then
$ECHO CMW: ns_fasttrack cannot be used.
turn ns_fasttrack off
fi
if $IS_ON webface ; then
$ECHO CMW: webface cannot be used.
turn webface off
fi
# remove these rc2.d links to prevent broken scripts (or unavailable
# functionality) from confusing customers.
remove /etc/rc2.d/S95availmon # availmon doesn't work under Trix
remove /etc/rc0.d/K05availmon # availmon doesn't work under Trix
remove /etc/rc2.d/S98xdm # chkconfig tests broken for Trix/CMW
remove /etc/rc2.d/S60ns_admin # runs $CONFIGURE when chkconfig'd off
remove /etc/rc2.d/S98pcp # no chkconfig option. doesn't work.
remove /etc/rc0.d/K02pcp # no chkconfig option. doesn't work.
remove /etc/rc0.d/K30ns_admin # chkconfig off doesn't fix entirely
remove /etc/rc0.d/K30ns_fasttrack # chkconfig off doesn't fix entirely
remove /etc/rc0.d/K35webface # chkconfig off doesn't fix entirely
# create moldy directories for cron
cronmaccheck /var/spool/cron/crontabs/:mac
cronmaccheck /var/spool/cron/atjobs/:mac
# hist file gets written after attrinit runs. needed for configmsg script.
/sbin/suattr -C CAP_MAC_READ,CAP_DAC_READ_SEARCH,CAP_DAC_WRITE,CAP_MAC_WRITE,CAP_DEVICE_MGT+ip -c "/sbin/attrinit -type=t -mac=dblow var/inst"
$ECHO 'done.'
;;
'stop')
;;
*)
echo "usage: /etc/init.d/CMWchkconfig {start|stop}"
;;
esac

View File

@@ -0,0 +1,84 @@
#ident "$Revision: 1.119 $"
include $(ROOT)/usr/include/make/commondefs
# simple files not changed by the user
MRSIMP =usr filesystems postinst
STDSIMP =configmsg snmp swap uucp xlv
SPCL =quotas
SIMP =$(STDSIMP) $(SPCL) $(MRSIMP)
# configuration files that SGI knows best
MRUPDATE=rmtmpfiles network
STDUPDATE=autoconfig chkdev cron grio mail savecore sysetup xdm fontserver \
announce disk_patch aliases-ip CMW CMWchkconfig failover
UPDATE =$(STDUPDATE) $(MRUPDATE)
#
# Turn on savecore by default ... not all systems will want this
# feature.
SAVECORE_DEFAULT ="mach(CPUBOARD=IP19 CPUBOARD=IP20 CPUBOARD=IP21 CPUBOARD=IP22 CPUBOARD=IP25 CPUBOARD=IP26 CPUBOARD=IP27 CPUBOARD=IP28 CPUBOARD=IP30 CPUBOARD=IP32) config(noupdate)"
# config files for miniroot only
MRONLYFILES=sysetup.mr filesystems.mr
FILES =$(SIMP) $(UPDATE) $(MRONLYFILES) nostickytmp
INSDIR =/etc/init.d
CFGDIR =/etc/config
ETCDIR =/etc
INSCMD =$(INSTALL) -m 755 -F $(INSDIR)
default:$(FILES)
clean clobber:
FRC:
install: default
$(INSTALL) -dir $(INSDIR) $(CFGDIR)
$(INSTALL) -idb "noshare" -F /var -lns /etc/config config
$(INSTALL) -m 644 -F $(INSDIR) README
$(INSTALL) -idb "config(noupdate)" -m 644 -F $(CFGDIR) \
-src verbose.config verbose
$(INSTALL) -idb "config(noupdate)" -m 644 -F $(CFGDIR) \
-src vswap.config vswap
$(INSTALL) -idb "config(noupdate)" -m 644 -F $(CFGDIR) \
-src network.config network
$(INSTALL) -idb "config(noupdate)" -m 644 -F $(CFGDIR) \
-src sendmail.config sendmail
$(INSTALL) -idb "config(noupdate)" -m 644 -F $(CFGDIR) \
-src xlv.config xlv
$(INSTALL) -idb "config(noupdate)" -m 644 -F $(CFGDIR) \
netif.options
$(INSTALL) -idb "config(noupdate)" -m 644 -F $(CFGDIR) \
static-route.options
$(INSTALL) -idb "config(noupdate)" -m 644 -F $(CFGDIR) \
vswap.options
$(INSTALL) -idb "config(noupdate)" -m 644 -F $(CFGDIR) \
autoconfig.options
$(INSTALL) -idb "config(noupdate)" -m 644 -F $(CFGDIR) \
-src ipaliases.config ipaliases
$(INSTALL) -idb "config(noupdate)" -m 644 -F $(CFGDIR) \
ipaliases.options
$(INSTALL) -idb $(SAVECORE_DEFAULT) -m 644 -F $(CFGDIR) \
-src savecore.config savecore
$(INSTALL) -idb "config(noupdate)" -m 644 -F $(ETCDIR) \
-src failover.config failover.conf
$(INSCMD) $(MRSIMP)
$(INSCMD) $(STDSIMP)
$(INSCMD) -idb "config(update)" $(STDUPDATE)
$(INSCMD) quotas
$(INSCMD) -idb "config(update) mach(CPUBOARD=IP19 CPUBOARD=IP21 CPUBOARD=IP25)" sysctlr
$(INSCMD) -idb "config(update) mach(CPUBOARD=IP27)" sn0start
$(INSCMD) -idb "config(update) mach(CPUBOARD=IP27)" partcfg
$(INSCMD) -idb "config(update) mach(CPUBOARD=IP30)" machdepstart.ip30
# make autoconfig a real command
$(INSTALL) -F /etc -lns init.d/autoconfig autoconfig
# All of the following file should be install at least in the mini-root
$(INSCMD) -idb "config(update)" $(MRUPDATE)
$(INSCMD) -src sysetup.mr sysetup
$(INSCMD) -src filesystems.mr filesystems
$(INSTALL) -F $(CFGDIR) -idb 'config(noupdate)' -u root -g sys -m 644 \
nostickytmp

View File

@@ -0,0 +1,41 @@
#"$Revision: 1.6 $"
# /etc/init.d contains initialization and termination scripts for
# changing init states. These scripts are linked when appropriate to
# files in the /etc/rc?.d directories. File names in rc?.d directories
# are of the form [SK]nn<init.d filename> where 'S' means start this job,
# 'K' means kill this job, and 'nn' is the relative sequence number for
# killing or starting the job. When entering a state (init 0,2,3, etc.),
# the rc[0-6] script executes those scripts in /etc/rc[0-6].d that are
# prefixed with 'K' followed by those scripts prefixed with 'S'.
#
# EXAMPLE: When changing to init state 2 (default multi-user mode),
# /etc/rc2 is initiated by the init process. The following
# steps are performed by /etc/rc2:
#
# 1. In the directory /etc/rc2.d are files used to stop processes
# that should not be running in state 2. The filenames
# are prefixed with 'K'. Each 'K' file in the directory is
# executed (by /etc/rc2) in alpha-numeric order when the system
# enters init state 2 (see example under next item).
#
# 2. Also in the /etc/rc2.d directory are files used to start
# processes that should be running in init state 2. As in the step
# above, each 'S' file is executed in alpha-numeric order.
#
# Example:
#
# The file /etc/init.d/network is a script that will
# initiate networking daemons when given the argument
# 'start', and will terminate the daemons if given the
# argument 'stop'. It is linked to /etc/rc2.d/S30network
# and to /etc/rc0.d/K40network. The file is executed by
# '/etc/rc2.d/S30network start' when init state 2 is
# entered and by '/etc/rc0.d/K40network stop' when
# shutting the system down.
#
#
# NOTE: /etc/rc2 has references to the obsolescent 'rc.d' directory.
# These references are for compatibility with old INSTALL scripts. New
# INSTALL scripts should use the init.d directory for related
# executables. The same is true for the shutdown.d directory.

128
eoe/cmd/initpkg/init.d/aliases-ip Executable file
View File

@@ -0,0 +1,128 @@
#!/bin/sh
# $Revision: 1.8 $
#
# NAME
# aliases-ip - configure network IP aliases
#
# SYNOPSIS
# /etc/init.d/aliases-ip ( start | stop ) [ debug ]
#
# DESCRIPTION
# This script automates the configuration of IP address aliases for
# network interfaces.
#
# The file /etc/config/ipaliases.options contains the list of hosts or
# IP addresses to be used as IP address aliases. The format of
# this file is:
#
# interface host1 [netmask addr] [broadcast addr]
# interface host2 [netmask addr] [broadcast addr]
# ...
# interface host3 [netmask addr] [broadcast addr]
#
# hosti is either a valid hostname in /etc/hosts or is a "dot"
# notation IP address as in 192.22.33.44. The interface should be
# the interface name as reported by netstat -i which will support
# the alias (i.e. ec0, ec3, et cetera).
#
# NOTE:
# If you have previously installed the PPP IP alias interim solution
# then you will have a ppp ip alias data file named "/etc/ip-aliases.tab'
# which is in the wrong format and location.
# To convert this file to the new format, run the following command lines
# The shell variable 'interface' should be set to the name of the network
# interface on which you want the new alias'es to be assigned.
#
# OLD=/etc/ipaliases.tab
# NEW=/etc/config/ipaliases.options
# interface=ec0
#
# while read alias
# do
# stuff=`echo $alias | sed -e 's/^#.*//'`
# test -n "$stuff" && echo "$interface $stuff" >> $NEW
# done < $OLD
#
# FILES
# /etc/hosts # host table file
# /etc/config/ipaliases.options
# # table of IP addresses to configure.
# /etc/config/ipaliases # chkconfig control file for ipaliases startup
# /etc/config/network # chkconfig control file for network startup
#
# SEE ALSO
# chkconfig(1M), ifconfig(1M), netstat(1), routed(1M)
#
# COPYRIGHT NOTICE
# Copyright (C) 1995, Silicon Graphics. All Rights Reserved.
#
#
# Configuration variables
#
IPALIASES_TABLE="/etc/config/ipaliases.options"
#
# Convenience macros
#
IS_ON="/sbin/chkconfig"
IFCONFIG="/usr/etc/ifconfig"
#
# If "debug" is passed as second argument, enable output of noisy commands
# to stdout/stderr. Otherwise redirect extraneous output to /dev/null.
#
if test "$2" = "debug" || $IS_ON verbose ; then
DBGOUT="/dev/fd/1"
DBGERR="/dev/fd/2"
else
DBGOUT="/dev/null"
DBGERR="/dev/null"
fi
#
# "main" body. Handle "start|stop".
#
case $1 in
"start")
if $IS_ON network && $IS_ON ipaliases; then
#
# Get hosts from ipaliases.tab. Parse out # comments which begin
# in first column.
#
while read line
do
ipaliases=`echo $line | sed -e 's/[ ]*#.*$//' -e '/^$/d' `
if test -z "$ipaliases" ; then
continue;
fi
read interface host restofline <<-EOF
$ipaliases
EOF
/sbin/suattr -C CAP_NETWORK_MGT+ip -c "$IFCONFIG $interface alias $host $restofline" && echo "Adding alias $host to interface $interface" > $DBGOUT;
done < $IPALIASES_TABLE
fi
;;
"stop")
if $IS_ON network && $IS_ON ipaliases; then
#
# Get hosts from ipaliases.tab. Parse out # comments which begin
# in first column.
#
while read line
do
ipaliases=`echo $line | sed -e 's/[ ]*#.*$//' -e '/^$/d' `
if test -z "$ipaliases" ; then
continue;
fi
read interface host restofline <<-EOF
$ipaliases
EOF
/sbin/suattr -C CAP_NETWORK_MGT+ip -c "$IFCONFIG $interface delete $host" && echo "Deleting alias $host to interface $interface" > $DBGOUT;
done < $IPALIASES_TABLE
fi
;;
esac

View File

@@ -0,0 +1,29 @@
#! /sbin/sh
#
# Announce - Display startup and shutdown anouncements
#
# On some machines, the message is displayed in an alert
# window.
#
# $Revision: 1.10 $
if chkconfig verbose
then
LOGGER='/sbin/lfmt -s info'
else
LOGGER='/sbin/lfmt -s info -G 1'
fi
NOMSGSEVERITY=1 export NOMSGSEVERITY
case $1 in
'start')
$LOGGER "The system is coming up.\n"
;;
'stop')
$LOGGER "The system is shutting down.\nPlease wait.\n"
;;
'restart')
$LOGGER "The system is being restarted.\n"
;;
esac

View File

@@ -0,0 +1,149 @@
#!/sbin/sh
#Tag 0x00000800
#
# Automatically re-configure the kernel. This script uses the
# /etc/config/autoconfig.options file to tell lboot to either
# prompt for permission to reconfigure the kernel or not. The
# default autoconfig.options file contains a '-T', which indicates
# to lboot to reconfigure the kernel without prompting for
# permission. A 't' indicates to lboot to prompt for permission
# first.
#
# When autoconfig runs at system startup, it uses -T or -t to indicate
# to lboot that it should use 'Smart' mode. In 'Smart' mode, lboot
# determines whether or not it should build a new kernel by looking
# at the dates of files in /var/sysgen and comparing to the date of
# /unix. In 'Smart' mode, lboot also auto-registers dynamically loadable
# kernel modules, such as tpsc, hpcplp, hpc3plp, ticlts, dial, sball,
# tablet, wacom, etc.
#
# If the LBOOTOPTS below are changed, so that they don't pass -T or -t
# to lboot, autoconfig will not perform its 'Smart' mode tasks, as
# described above.
#
# "$Revision: 1.52 $"
LBOOTOPTS=
FORCE=
LD_LIBRARY_PATH=
#
# If autoconfig.options is 0 or is missing, then default to -T.
# Also, if it contains bogus information, default to -T.
#
if [ -f /etc/config/autoconfig.options ]; then
FORCE=`cat /etc/config/autoconfig.options 2> /dev/null`
else
FORCE=""
fi
if test "$FORCE" = ""; then
FORCE="-T"
fi
TARGET=${UNIX:=/unix}
USAGE="`basename $0`: [-vf] [-p toolroot] [-d /var/sysgen] [-o lbootopts] [start|stop]"
while getopts "vnfp:d:o:" c; do
case $c in
v) if test "$verbose" = "-v"; then
set -x
else
verbose="-v"
LBOOTOPTS="$LBOOTOPTS -v"
fi
;;
n) LBOOTOPTS="$LBOOTOPTS -e";;
f) FORCE=""
TARGET=${TARGET}.install;;
p) TOOLROOT="$OPTARG";;
d) SYSGEN="$OPTARG";;
o) if test "$OPTARG" = "-t" -o "$OPTARG" = "-T"; then
FORCE=$OPTARG
else
LBOOTOPTS="$LBOOTOPTS $OPTARG"
fi
;;
\?) echo $USAGE; exit 1;;
esac
done
shift `expr $OPTIND - 1`
SYSGEN=${SYSGEN:-/var/sysgen}
BOOTAREA=${BOOTAREA:-${SYSGEN}/boot}
SYSTEM=${SYSTEM:-${SYSGEN}/system}
MASTERD=${MASTERD:-${SYSGEN}/master.d}
STUNEFILE=${STUNEFILE:-${SYSGEN}/stune}
MTUNEDIR=${MTUNEDIR:-${SYSGEN}/mtune}
WORKDIR=${WORKDIR:-${SYSGEN}}
# TOOLROOT and ROOT control where lboot looks for tools and does its work
# TOOLROOT is normally set in the system file.
TOOLROOT=${TOOLROOT:-$SYSGEN/root}
export TOOLROOT
LBOOT=/usr/sbin/lboot
SETSYM=/usr/sbin/setsym
LBOOTOPTS="$LBOOTOPTS $FORCE -m $MASTERD -b $BOOTAREA -w $WORKDIR -s $SYSTEM -u $TARGET -c $STUNEFILE -n $MTUNEDIR"
cd /
case $1 in
""|start)
for nm in $LBOOT $TOOLROOT/usr/bin/cc $TOOLROOT/usr/bin/ld; do
if test ! -x $nm; then
echo "`basename $0`: cannot find $nm" 1>&2
exit 1
fi
done
for nm in $BOOTAREA $MASTERD $SYSTEM; do
if test ! -d $nm; then
echo "`basename $0`: cannot find $nm" 1>&2
exit 1
fi
done
# note - set -e in a case stmt doesn't work right in /bin/sh
rm -rf ${UNIX}.install
/sbin/suattr -C CAP_DEVICE_MGT+ip -c "$LBOOT $LBOOTOPTS"
if [ $? != 0 ]
then
# dont print anything since a no answer to Automatically ..
# causes lboot to exit 1
exit 1
fi
#
# The following puts labels on files created in ${SYSGEN}
# while in the mini-root when trix is installed.
#
if [ -f $BOOTAREA/mac.a ] ; then
echo "labeling ${SYSGEN}" 1>&2
/sbin/suattr -C all=epi -c "/usr/bin/find ${SYSGEN} -follow -print |xargs /sbin/attrinit -mac=dblow" > /dev/null
fi
if test -w ${UNIX}.install; then
chmod a+r ${UNIX}.install
if test -x $SETSYM ; then
$SETSYM ${UNIX}.install > /dev/null 2>&1
# Ignore any error return from setsym, so autoconfig
# will not exit non-zero if setsym has a problem.
true
fi
fi
;;
stop)
exit 1
;;
*)
echo "$USAGE"
exit 1
;;
esac

View File

@@ -0,0 +1 @@
-T

View File

@@ -0,0 +1,77 @@
#! /sbin/sh
#Tag 0x00000f00
# Check for devices that should exist after a reboot; to catch
# devices installed (or removed) since the last system boot.
# Must follow autoconfig, as the devices may have loadable drivers.
# "$Revision: 1.23 $"
case "$1" in
'start')
cd /dev
# create plp devices before running ioconfig in case permissions
# are changed in /etc/ioperms
if [ -d "/hw/parallel" -a ! -L /dev/plp ]; then
/sbin/suattr -C CAP_DEVICE_MGT+ipe -c "./MAKEDEV plp" 2>&1 | logger -t MAKEDEV_plp &
fi
#
# Before generating any devices, run ioconfig.
# -2 option tells ioconfig to prune down the hwgraph file tree walk.
#
/sbin/suattr -C CAP_MAC_READ,CAP_MAC_WRITE,CAP_MKNOD+ipe -c "/sbin/ioconfig -f /hw"
# we always do this now, so that all the tape devices get made, automatically
# not just the first one on the system. It also removes any tape
# devices that are no longer present. Tape devices that are OK aren't modified
/sbin/suattr -C CAP_DEVICE_MGT+ipe -c "./MAKEDEV tape" 2>&1 | logger -t MAKEDEV_tape &
# Create tty and input device symlinks
/sbin/suattr -C CAP_DEVICE_MGT+ipe -c "./MAKEDEV ttys" 2>&1 | logger -t MAKEDEV_ttys &
# same for floppies, since we now make /dev/rdsk/fds* only for
# actually installed floppies.
hinv -c disk | ( IFS="$IFS:" ; while read d dr s r m u targ o s c ctlr rest; do
if [ "$d" = Disk -a "$dr" = drive -a "$r" = removable -a "$m" = media -a "$s" = SCSI ] ; then
if [ ! -c /dev/rdsk/fds${ctlr}d${targ}.3.5 ] ; then
echo Creating floppy devices
/sbin/suattr -C CAP_DEVICE_MGT+ipe -c "./MAKEDEV fds" 2>&1 | logger -t MAKEDEV_fds &
break
fi
fi
done )
# if a diskless inst is done, we need to make audio devices here
# since kdsp is loadable now and does not show up in hinv when
# MAKEDEV is run out of /etc/bcheckrc after a diskless inst.
case "`hinv -c audio`" {
*Audio*) if [ ! -c /dev/hdsp/hdsp0control ] ; then
echo Creating audio devices
/sbin/suattr -C CAP_DEVICE_MGT+ipe -c "./MAKEDEV hdsp" 2>&1 | logger -t MAKEDEV_hdsp &
fi
;;
}
# DIVO video has audio capability, but hinv -c audio doesn't
# show it...
case "`hinv -c video`" {
*"DIVO Video"*) if [ ! -c /dev/hdsp/hdsp0control ] ; then
echo Creating audio devices
/sbin/suattr -C CAP_DEVICE_MGT+ipe -c "./MAKEDEV hdsp" 2>&1 | logger -t MAKEDEV_hdsp &
fi
;;
}
;;
'stop') # nothing to do on stop
;;
*)
echo "usage: $0 {start|stop}"
;;
esac

194
eoe/cmd/initpkg/init.d/configmsg Executable file
View File

@@ -0,0 +1,194 @@
#!/sbin/sh
#Tag 0x00000f00
# The software installation will leave a message, and versions will give
# a zero exit status, if installation has altered one or more configuration
# files. Print the message, which is a reminder to the user to go find
# them and resolve the differences.
#
# Also search for directories that have been moved aside due to the
# filesystem re-org, and inform the user about such.
#
# Also rebuild the man page database for whatis/apropos after anything
# installed or removed.
MSG=/var/inst/.config_changed
MSGTIMER=/var/inst/.change_cnt
msgfile=uxsgicore
LIMIT=13
# sgindexAdmin (infosearch)
#
# If infosearch is installed, check each domain (bks, man, relnotes)
# to see if the index is older than the history file. If so, update
# that index (read in data from any new or changed files). If the
# index is missing or /var/inst/hist is missing, do nothing.
# This followings the exact same logic as the mkwhatis check,
# except that it's internal to sgindexAdmin and checked for
# each content domain.
#
# For the man domain, if the man index exists, use the title
# information in the index to update whatis instead of reading
# the first 4k of every man page. In this case, after sgindexAdmin
# is run successfully, whatis will be newer than the hist file and
# we skip running mkwhatis.
# mkwhatis
#
# rebuild the man page apropos/whatis database after an install
# or if whatis doesn't exist. Don't do it if /var/inst/hist doesn't
# exist (stat returns only one value, and whatis does exist) because
# that probably means a user removed it because of disk space, and we
# would run makewhatis on every boot until hist was recreated.
# outer >/dev/null is in case neither file exists
( if [ -x /usr/lib/infosearch/bin/sgindexAdmin ]; then
/sbin/nice -20 /usr/lib/infosearch/bin/sgindexAdmin -instchk 2>&1 \
| logger -t sgindexAdmin
fi
set `/sbin/stat -mq /var/inst/hist /usr/share/catman/whatis 2>/dev/null` >/dev/null
if [ ! -s /usr/share/catman/whatis -o \( "$2" -a "$1" -gt "$2" \) ]
then
logger -t makewhatis man page database out of date with install history
/sbin/nice -20 /usr/lib/makewhatis -s 2>&1 | logger -t makewhatis
logger -t makewhatis man page database build finished;
fi ) &
# Check for configuration file changes
if test ! -r $MSG -o ! -x /usr/sbin/versions
then exit 0 # don't check for dirs either, if versions isn't there.
# or we have already resolved config files and removed $MSG
fi
cnt=`cat $MSGTIMER 2>/dev/null`
cnt=`expr ${cnt:=0} + 1`
echo $cnt > $MSGTIMER 2>/dev/null
if test $cnt -le $LIMIT && /usr/sbin/versions -t changed>/dev/null; then
gettxt ${msgfile}:1137 '\nSoftware installation has installed new configuration files and/or saved\nthe previous version in some cases. You may need to update or merge\nold configuration files with the newer versions. See the "Updating\nConfiguration Files" section in the versions(1M) manual page for details.\nThe shell command "versions changed" will list the affected files.\n\n' | \
logger -s -t inst
if chkconfig visuallogin; then
# give user a chance to see the message before pandora
sleep 5
fi
else
rm -f $MSG $MSGTIMER
exit 0 # that's enough times to check for directories also
fi
# Check for moved-aside directories.
BANNERPRINT=0
DIRS='
/usr/Cadmin/classes.O
/usr/CaseVision.O
/usr/Insight/lib/data/config/C.O
/usr/Insight/lib/data/entities.O
/usr/Insight/library/SGI_bookshelves/SGI_Admin/books/SiteAdmin/styles.O
/usr/Insight/library/SGI_bookshelves/SGI_EndUser/books/IRISEssentials/styles.O
/usr/Insight/library/SGI_bookshelves/SGI_EndUser/books/PerSysAdmin/styles.O
/usr/Insight/library/SGI_bookshelves/SGI_EndUser/books/ShowcaseUG/styles.O
/usr/Insight/library/SGI_bookshelves/SGI_EndUser/books/Utilities/styles.O
/usr/Insight/library/SGI_bookshelves/SGI_EndUser/books/glossary/styles.O
/usr/WorkShop.O
/usr/adm.O
/usr/catman/u_man/cat1/explorer.O
/usr/demos/bin.O
/usr/diags/crash/Sproc.O
/usr/etc/boot.O
/usr/etc/dn.O
/usr/etc/named.d.O
/usr/etc/yp.O
/usr/frame/.fminit2.0.O
/usr/frame/docs.O
/usr/frame/fmtemplates.O
/usr/gfx/CLOVER2/lib/IP7GT.O
/usr/gfx/libgl/EXPRESSEXPRESS/libGL.so.O
/usr/gfx/libgl/EXPRESSEXPRESS/libGLcore.so.O
/usr/gfx/libgl/LIGHTLG1MC.O
/usr/gfx/libgl/LIGHTLIGHT.O
/usr/gfx/ucode/SKYWR/vof.O
/usr/gfx/ucode/VGX/vof.O
/usr/include/DPS.O
/usr/include/Mrm.O
/usr/include/NCC.O
/usr/include/Vk.O
/usr/include/X11/Mrm.O
/usr/include/X11/Xirisw.O
/usr/include/X11/Xm.O
/usr/include/X11/uil.O
/usr/include/Xm.O
/usr/include/make.O
/usr/include/oz.O
/usr/include/uil.O
/usr/lib/DPS/AFM.O
/usr/lib/DPS/outline/base.O
/usr/lib/Insight.O
/usr/lib/TeamVision.O
/usr/lib/X11.O
/usr/lib/X11/Schemes.O
/usr/lib/X11/app-defaults/XClipboard.O
/usr/lib/X11/app-defaults/Xmh.O
/usr/lib/X11/ja_JP.EUC/schemes/Base.O
/usr/lib/X11/schemes/Base.O
/usr/lib/X11/schemes/FaxMgr.O
/usr/lib/X11/schemes/Lascaux.O
/usr/lib/cron.O
/usr/lib/dict.O
/usr/lib/font/devX100.O
/usr/lib/images.O
/usr/lib/locale/de_AT/LC_MESSAGES.O
/usr/lib/locale/de_CH/LC_MESSAGES.O
/usr/lib/locale/fr_BE/LC_MESSAGES.O
/usr/lib/locale/fr_CA/LC_MESSAGES.O
/usr/lib/locale/fr_CH/LC_MESSAGES.O
/usr/lib/onlineHelp.O
/usr/lib/onlineHelp/CaseVision.O
/usr/lib/sounds.O
/usr/lib/terminfo.O
/usr/lib/tmac.O
/usr/lib/wnn/dic.O
/usr/mail.O
/usr/preserve.O
/usr/relnotes/motif_dev.O
/usr/relnotes/motif_eoe.O
/usr/sbin/r4kpp.O
/usr/spool.O
/usr/sysgen.O
/usr/sysgen/system.O
/usr/tmp.O
/usr/var/X11/input.O
/usr/var/adm/lastlog.O
/usr/var/config.O
/usr/var/inst.O
/usr/var/mail.O
/usr/var/sna/log.O
/usr/var/spool.O
/usr/var/spool/mqueue.O
/usr/var/sysgen/boot.O
/usr/var/sysgen/root.O
/usr/var/tmp.O
'
for dir in $DIRS; do
if test -d $dir; then
# grumble. These dirs are unlikely to hold user modified info. If they did,
# tough. That's what backups are for.
if test $dir = "/usr/include/X11/Mrm.O" -o \
$dir = "/usr/include/X11/Xirisw.O" -o \
$dir = "/usr/include/X11/Xm.O" -o \
$dir = "/usr/include/X11/uil.O" -o \
$dir = "/usr/lib/sounds.O" -o \
$dir = "/usr/lib/terminfo.O" -o \
$dir = "/usr/var/inst.O" -o \
$dir = "/usr/diags/crash/Sproc.O" -o \
$dir = "/usr/lib/cron.O" ; then
rm -rf $dir
continue
fi
if test $BANNERPRINT -ne 1; then
gettxt ${msgfile}:1138 'These directories were unable to be moved properly during the\ninstallation process. Check for any user-modified files, then\ndelete the directories.\n' | \
logger -s -t inst
BANNERPRINT=1
fi
logger -s -t inst " $dir"
fi
done

68
eoe/cmd/initpkg/init.d/cron Executable file
View File

@@ -0,0 +1,68 @@
#! /sbin/sh
#Tag 0x00000f00
# cron control
# "$Revision: 1.23 $"
DIR=/etc/cron.d
OPTIONS=/etc/config/cron.options
case $1 in
'start')
for name in at cron
do
cfgfile=$DIR/${name}.cfg
if [ -r $cfgfile ]
then
grep '^configured$' $cfgfile 1>/dev/null 2>&1
if [ $? -ne 0 ]
then
cat <<- EOF >$cfgfile
# This file records whether the
# cron and at allow/deny files have
# been configured, and to disambiguate
# the presence/absence of those files.
configured
EOF
if [ -r $DIR/${name}.allow -o -r $DIR/${name}.deny ]
then
# from a previous install - leave alone
continue
else
touch $DIR/${name}.deny
fi
fi
else
cat <<- EOF >$cfgfile
# This file records whether the
# cron and at allow/deny files have
# been configured, and to disambiguate
# the presence/absence of those files.
configured
EOF
if [ -r $DIR/${name}.allow -o -r $DIR/${name}.deny ]
then
continue;
fi
touch $DIR/${name}.deny
fi
done
if test -x /sbin/cron; then
trap "" 15 # do not kill ourself,
killall 15 cron # but prevent 2 crons
rm -f /etc/cron.d/FIFO
/sbin/suattr -C CAP_SETGID,CAP_SETUID,CAP_AUDIT_CONTROL,CAP_AUDIT_WRITE,CAP_MAC_RELABEL_OPEN,CAP_MAC_RELABEL_SUBJ,CAP_MAC_MLD,CAP_MAC_READ+ip -c "/sbin/cron ""`cat $OPTIONS 2> /dev/null`"
fi
;;
'stop')
/sbin/killall 15 cron
;;
*)
echo "usage: /etc/init.d/cron {start|stop}"
;;
esac

View File

@@ -0,0 +1,51 @@
#! /sbin/sh
#Tag 0x00000f00
is_deskside ()
{
maxslot=0
hinv -c iobd | grep Ebus | sed "s/://g" | ( \
while read io brd ebus slot slotnum io4 rev revnum; do
if [ $slotnum -gt $maxslot ]; then
maxslot=$slotnum;
fi;
done;
if [ $maxslot -gt 0 -a $maxslot -lt 11 ]; then
echo 1
else
echo 0
fi)
}
case "$1" in
'start')
# check to see if any drives need firmware downloaded, on powerup
# This is to handle any drives moved from another system, etc.,
# This just warns if any drives should be upgraded.
/sbin/diskpatch -W
;;
'stop')
# if we are rebooting, then don't spin down any of the drives.
# otherwise spin down all of the drives that benefit from this
set "`/sbin/who -r`"
if [ "$7" != "6" ]
then
if hinv -c iobd | grep IO4 > /dev/null
then # [Power] Challenge/Onyx DM/L/XL (EVEREST Machines)
if [ `is_deskside` -eq 1 ]; then
spinagain=-S11
else
spinagain=-S5
fi
elif [ "`hinv -c disk | grep 'Disk.*controller *[1-4]' | wc -l`" -gt 3 ]
then
# challenge S, jag or indigo2/challenge M w/external drives
spinagain=-S4
fi
/sbin/diskpatch -H 20 $spinagain
fi
;;
*)
echo "usage: $0 {start|stop}"
;;
esac

View File

@@ -0,0 +1,49 @@
#!/sbin/sh
#ident /etc/init.d/failover: $Revision: 1.2 $
#
# Process failover configuration table.
# Called by /etc/init.d/xlv.
#
assemble=false
doit=false
cd /
case $1 in
init)
keep=-k
assemble=false
doit=true
;;
stop)
doit=false
;;
""|start)
keep=-k
assemble=true
doit=true
;;
esac
if [ '(' -x /sbin/xlv_assemble -o -x /sbin/xvm ')' -a "$doit" = "true" ] ; then
if [ -f /etc/failover.conf ] ; then
if [ -x /sbin/foconfig ] ; then
if /sbin/chkconfig verbose ; then
echo "Configuring Failover."
fi
/sbin/suattr -C CAP_DEVICE_MGT+ip -c "/sbin/foconfig \
$keep -f /etc/failover.conf"
fi
fi
if [ "$assemble" = "true" ] ; then
if [ -x /sbin/xlv_assemble ] ; then
if /sbin/chkconfig verbose ; then
echo "Calling xlv_assemble."
fi
/sbin/suattr -C CAP_DEVICE_MGT+ip -c "/sbin/xlv_assemble \
1> /dev/null 2> /dev/null"
fi
fi
fi

View File

@@ -0,0 +1,64 @@
#ident $Revision: 1.1 $
#
# This is the configuration file for table driven failover support.
# The entries within this file consist of a single line per
# failover grouping. These lines describe up to four paths to
# each device. Obviously, these paths should reference the
# same device! Some sanity checking is performed, but the
# software is not foolproof in this area. (If it was foolproof,
# the configuration file would be unnecessary!) It is recommended
# that all paths to a device be listed.
#
# The format of each line consists of a group name followed by
# up to four device names from the "/dev/scsi" directory. If
# it's not in "/dev/scsi", it cannot be configured. But, this
# implementation assumes that if a device is not present, its
# path has failed. Consequently, no error messages will be
# generated for missing paths. This means that you may have a
# a failover group that consists of a single primary path with
# no alternates.
#
# Additionally, there is a configuration directive available that
# will cause the program to emit debug information. Placing
# "#verbose" at the start of a line, without the quotes, will
# enable the debug output. The debug output is displayed for
# all subsequent configuration directives. Once enabled, the
# debug output cannot be disabled.
#
# Lines that begin with a "#" are considered comment lines.
# A "#" anywhere within a line signals the beginning of a comment.
# White space must separate the last parameter of a line and the #.
# Blank lines are also considered a comment.
#
# --> Lines that begin with 'sc' will be skipped as it's likely a
# --> configuration error.
#
# Sample configuration. (Remember to omit the "#" the start of
# the line.)
#
#
# # Name Pri path | alt path | alt path | alt path
#
# GroupA sc6d50l0 sc7d50l0 sc8d50l0 sc9d50l0
# GroupB sc6d51l0 sc7d51l0 sc8d51l0 sc9d51l0 # Some comment
# GroupC sc6d52l0 sc7d52l0 sc8d52l0 sc9d52l0
#
# One word of caution. The switch to an alternate path is
# choreographed by XLV. XLV is a requirement for failover to
# function.
#
# Notes:
#
# It is not possible to change the primary device of a group after
# the initial configuration by reordering the entries on the line
# and running /etc/init.d/failover start. To change the primary,
# scsifo may be used to switch to the next available path.
#
# It is not possible to remove the primary of a group by deleting
# the entry from the group and running /etc/init.d/failover start.
# A reboot is necessary.
#
# To remove the "DOWN" displayed by hinv for the failed path,
# fix the path and reprobe the bus using scsiha -p #.
#

View File

@@ -0,0 +1,124 @@
#! /sbin/sh
#Tag 0x00000f00
# (u)mount file systems
# "$Revision: 1.50 $"
cd /
case $1 in
'start')
# The /usr filesystem MAY HAVE BEEN mounted earlier earlier so
# that unbundled products would have a chance to execute any
# initialization code after mounting /usr but before mounting
# the rest of /etc/fstab.
#
# Mount any filesystems listed in /etc/fstab that we haven't
# yet mounted. Note that this may include /usr if we haven't
# already mounted it.
#
if /sbin/chkconfig verbose
then
echo "Mounting filesystems:"
fi
# Mount file systems according to file system table /etc/fstab.
# check all filesystems if necessary, in parallel.
if [ -x /sbin/fsck ] ; then
/sbin/fsck -m -c -y | grep -v 'mounted file system, ignored'
fi
if /sbin/suattr -C CAP_MOUNT_MGT+ip -c "/sbin/mount -a -T efs,xfs"
then
if test -s /etc/kernel_config2; then
/etc/kernel_config2
fi
else
lfmt -G 1 'Some filesystems failed to mount; may be unable to reach multiuser state\n'
sleep 5
fi
# mv /tmp to /.oldtmp and create a new /tmp unless the existing
# /tmp or any of its subdirectories is a mount point, or unless /tmp
# is a symbolic link. In these cases, just leave /tmp alone.
chkconfig nocleantmp
if test $? = 1 -a -d /tmp -a ! -L /tmp ; then
# 2 tests because we don't want to run the command part, and
# the shell does the command substitution stuff before running
# test, and we don't want to get "/tmp: No such file or directory"
# when /tmp doesn't exist (as is the case in the miniroot.
if test -z "`/sbin/mount | grep ' on /tmp[/ ]'`" \
-a "`ls -la /tmp | wc -l`" -gt 3; then
# Any existing /.oldtmp means we somehow didn't remove
# it in rmtmpfiles or perhaps never even ran rmtmpfiles
# last time we booted. It might contain good stuff.
if test -d /.oldtmp; then
ls -a1 /tmp | sed -e '/^\.$/d' -e '/^\.\.$/d' | xargs -i rm -rf /.oldtmp/{}
ls -a1 /tmp | sed -e '/^\.$/d' -e '/^\.\.$/d' | xargs -i mv /tmp/{} /.oldtmp
else
/sbin/suattr -m -C CAP_MAC_WRITE,CAP_MAC_READ+ipe -c "rm -rf /.oldtmp"
/sbin/suattr -m -c "mv /tmp /.oldtmp"
mkdir /tmp
if test "`sysconf MAC`" -eq 1; then
chlabel -m /tmp
fi
fi
# do same as rmtmpfiles, for consistency
if chkconfig nostickytmp; then
/sbin/suattr -m -C CAP_FOWNER+eip -c "chmod 777 /tmp /var/tmp"
else
/sbin/suattr -m -C CAP_FOWNER+eip -c "chmod 1777 /tmp /var/tmp"
fi
/sbin/suattr -m -C CAP_FOWNER+eip -c "chown sys.sys /tmp /var/tmp"
fi
fi
# Clear nsd cache files
# DO NOT use su to invoke capabilites.
chkconfig noclearnsd
if test $? = 1 -a -x /sbin/mdbm_remove -a -d /var/ns/cache ; then
/sbin/mdbm_remove /var/ns/cache/* 2>/dev/null
fi
# Apply extended attributes to any newly installed files.
if test -x /sbin/attrinit; then
NOW=`date +%y%m%d%H%M`
if test -r /etc/irix.mac.install ; then
echo "Initializing XFS MAC attributes."
cd /
/sbin/suattr -C CAP_MAC_READ,CAP_DAC_READ_SEARCH,CAP_DAC_WRITE,CAP_MAC_WRITE,CAP_DEVICE_MGT+ip -c "/sbin/attrinit -script=/etc/irix.mac.install -verbose"
mv /etc/irix.mac.install /etc/irix.mac.$NOW
fi
if test -r /etc/irix.cap.install ; then
echo "Initializing XFS CAP attributes."
cd /
/sbin/suattr -C CAP_MAC_READ,CAP_DAC_READ_SEARCH,CAP_DAC_WRITE,CAP_MAC_WRITE,CAP_DEVICE_MGT+ip -c "/sbin/attrinit -script=/etc/irix.cap.install -verbose"
mv /etc/irix.cap.install /etc/irix.cap.$NOW
fi
fi
;;
'stop')
if /sbin/chkconfig verbose
then
echo "Unmounting filesystems:"
fi
sync
_DLMNTS=""
if [ "`/sbin/nvram diskless 2> /dev/null`" -eq 1 ] ; then
_DLMNTS=",/swap,/sbin"
fi
/sbin/suattr -C CAP_MOUNT_MGT+ip -c "/sbin/umount -ak -b /var,/usr,/debug,/proc,/hw,/dev/fd${_DLMNTS}"
sync
;;
*)
echo "usage: /etc/init.d/filesystems {start|stop}"
;;
esac

View File

@@ -0,0 +1,72 @@
#! /bin/sh
#Tag 0x00000f00
# (u)mount file systems other than /usr
# "$Revision: 1.12 $"
cd /
case $1 in
'start')
# The /usr filesystem is mounted earlier earlier so that unbundled
# products have a chance to execute initialization code between
# mounting /usr and mounting the rest of /etc/fstab.
#
# Mount all the rest of the filesystems listed in /etc/fstab
# (ie: beyond / and /usr).
#
if /sbin/chkconfig verbose
then
echo "Mounting filesystems:"
fi
# mv /tmp to /.oldtmp and create a new /tmp unless the existing
# /tmp or any of its subdirectories is a mount point, or unless /tmp
# is a symbolic link. In these cases, just leave /tmp alone.
chkconfig nocleantmp
if test $? = 1 -a -d /tmp -a ! -L /tmp ; then
# 2 tests because we don't want to run the command part, and
# the shell does the command substitution stuff before running
# test, and we don't want to get "/tmp: No such file or directory"
# when /tmp doesn't exist (as is the case in the miniroot.
if test -z "`/sbin/mount | grep ' on /tmp[/ ]'`" \
-a "`ls -la /tmp | wc -l`" -gt 3; then
# Any existing /.oldtmp means we somehow didn't remove
# it in rmtmpfiles or perhaps never even ran rmtmpfiles
# last time we booted. It might contain good stuff.
if test -d /.oldtmp; then
ls -a1 /tmp | sed -e '/^\.$/d' -e '/^\.\.$/d' | xargs -i rm -rf /.oldtmp/{}
ls -a1 /tmp | sed -e '/^\.$/d' -e '/^\.\.$/d' | xargs -i mv /tmp/{} /.oldtmp
else
/sbin/su root -m -C CAP_MAC_WRITE,CAP_MAC_READ+ipe -c "rm -rf /.oldtmp"
/sbin/su root -m -c "mv /tmp /.oldtmp"
/sbin/su root -m -c "mkdir /tmp"
fi
# do same as rmtmpfiles, for consistency
if chkconfig nostickytmp; then
/sbin/su root -m -c "chmod 777 /tmp /var/tmp"
else
/sbin/su root -m -c "chmod 1777 /tmp /var/tmp"
fi
/sbin/su root -m -C CAP_FOWNER+eip -c "chown sys.sys /tmp /var/tmp"
fi
fi
;;
'stop')
if /sbin/chkconfig verbose
then
echo "Unmounting filesystems:"
fi
sync
/sbin/su root -C CAP_MOUNT_MGT+ip -c "/sbin/umount -ak -b /usr,/debug,/proc,/hw"
sync
;;
*)
echo "usage: /etc/init.d/filesystems {start|stop}"
;;
esac

View File

@@ -0,0 +1,41 @@
#!/sbin/sh
#Tag 0x00000f00
#
# Start X Font Server
#
# $Revision: 1.10 $
#
IS_ON=/sbin/chkconfig
CONFIG=/var/X11/xfs/config
FS=/usr/bin/X11/xfs
if $IS_ON verbose ; then
ECHO=echo
else
ECHO=:
fi
case "$1" in
'start')
if $IS_ON fontserver; then
$ECHO "X Font Server setup: \c"
if test -x $FS; then
$ECHO "xfs\c"
/sbin/suattr -C CAP_NETWORK_MGT,CAP_MAC_RELABEL_OPEN,CAP_MAC_MLD,CAP_MAC_UPGRADE,CAP_MAC_DOWNGRADE+ip -c "$FS" &
else
$ECHO "can not execute $FS\c"
fi
$ECHO "."
fi
;;
'stop')
/sbin/killall -TERM xfs
;;
*)
echo "usage: /etc/init.d/fontserver {start|stop}"
;;
esac

View File

@@ -0,0 +1,42 @@
#! /sbin/sh
#Tag 0x00000f00
# GRIO control
# "$Revision: 1.10 $"
CONFIG=/etc/config
case $1 in
'start')
set `/sbin/who -r`
if [ $9 = "S" ]
then
#
# Terminate any running ggds.
#
killall ggd
#
# Start the label daemon
#
/sbin/suattr -C CAP_DEVICE_MGT+ip -c "/usr/sbin/ggd ""`cat $CONFIG/ggd.options 2> /dev/null`" &
fi
;;
'stop')
#
# Shutdown the ggd daemon.
#
if /sbin/chkconfig verbose ; then
echo "Shutting down GGD:"
fi
# Stop the label daemon
killall ggd
;;
*)
echo "usage: /etc/init.d/grio {start|stop}"
;;
esac

View File

@@ -0,0 +1 @@
on

View File

@@ -0,0 +1,34 @@
# This file (/etc/config/ipaliases.options) contains the list of hosts or
# IP addresses to be used as IP address aliases. The format of
# this file is:
#
# interface host1 [netmask addr] [broadcast addr]
# interface host2 [netmask addr] [broadcast addr]
# ...
# interface host3 [netmask addr] [broadcast addr]
#
# For example, using explict IP address'es
#
# ec0 192.111.26.51 netmask 0xffffff00 broadcast 192.111.26.255
#
# or using symbolic names:
# ec0 foobar netmask 0xffffff00 broadcast 192.111.26.255
#
# hosti is either a valid hostname in /etc/hosts or is a "dot"
# notation IP address as in 192.22.33.44. The interface should be
# the interface name as reported by netstat -i which will support
# the alias (i.e. ec0, ec3, et cetera).
#
# FILES
# /etc/hosts # host table file
# /etc/config/ipaliases.options
# # table of IP addresses to configure.
# /etc/config/ipaliases # chkconfig control file for ipaliases startup
# /etc/config/network # chkconfig control file for network startup
#
# SEE ALSO
# chkconfig(1M), ifconfig(1M), netstat(1), routed(1M)
#
# COPYRIGHT NOTICE
# Copyright (C) 1995, Silicon Graphics. All Rights Reserved.
#

25
eoe/cmd/initpkg/init.d/lp Executable file
View File

@@ -0,0 +1,25 @@
#! /sbin/sh
#Tag 0x00000f00
# Start or stop the lp scheduler
# "$Revision: 1.10 $"
case "$1" in
'start')
if test -x /usr/lib/lpshut -a -x /usr/lib/lpsched; then
/usr/lib/lpshut > /dev/null 2>&1
rm -f /var/spool/lp/SCHEDLOCK /var/spool/lp/FIFO
/usr/lib/lpsched
fi
;;
'stop')
if test -x /usr/lib/lpshut; then
/usr/lib/lpshut > /dev/null 2>&1
fi
;;
*)
echo "usage: $0 {start|stop}"
;;
esac

32
eoe/cmd/initpkg/init.d/lv Executable file
View File

@@ -0,0 +1,32 @@
#! /sbin/sh
#Tag 0x00000f00
# LV control
# "$Revision: 1.6 $"
case $1 in
'start')
# If an lvtab is present, run lvinit;
# this must be done before any mounts since any non-root
# filesystem may be on a logical volume.
set `/sbin/who -r`
if [ $9 = "S" ]
then
if [ -f /etc/lvtab ] ; then
if /sbin/chkconfig verbose
then
echo "Starting LV:"
fi
/sbin/lvinit
fi
fi
;;
'stop')
;;
*)
echo "usage: /etc/init.d/lv {start|stop}"
;;
esac

View File

@@ -0,0 +1,24 @@
#! /sbin/sh
# machine dependent startup script for the IP30 (OCTANE) system.
# this script will be run once for each system boot.
#
# "$Revision: 1.1 $"
case "$1" in
'start')
# Transfer any logged information from the Flash PROM into SYSLOG.
# see flash(1m) and syslog(1m) for more information.
/usr/sbin/flash -L
exit 0
;;
'stop')
exit 0
;;
*)
echo "usage: $0 {start|stop}"
;;
esac

217
eoe/cmd/initpkg/init.d/mail Normal file
View File

@@ -0,0 +1,217 @@
#! /sbin/sh
#Tag 0x00000f00
# Start sendmail demon after checking that things are healthy.
# $Revision: 1.63 $
CONFIG=/etc/config
IS_ON=/sbin/chkconfig
QUEUEDIR=/var/spool/mqueue
MAILDIR=/var/mail
G_RC=/usr/local/etc/mgmt/rc
if $IS_ON verbose ; then # For a verbose startup and shutdown
ECHO=echo
VERBOSE=-v
else # For a quiet startup and shutdown
ECHO=:
VERBOSE=
fi
if $IS_ON cap_su_off && test "`sysconf MAC`" -eq 1; then
CSU=csu_off
csu_off () {
while true; do
case "$1" in
-M) shift 2;;
-M?*) shift;;
-m) shift;;
-C) shift 2;;
-C?*) shift;;
*) break;;
esac
done
shift
eval $*
return
}
else
CSU="/sbin/suattr"
fi
CSU_DBADMIN="$CSU -M dbadmin"
CAP_SENDMAIL="CAP_PRIV_PORT+ip"
parse_args () {
OPTS=""
while true; do
case "$1" in
-q) DOPTS="$DOPTS $1$2"; shift 2;;
-q?*) DOPTS="$DOPTS $1"; shift;;
-bd) shift;;
"") break;;
*) OPTS="$OPTS $1"; shift;;
esac
done
if test "$DOPTS" = ""; then
DOPTS="-bd -q15m"
else
DOPTS="-bd $DOPTS"
fi
return
}
case "$1" in
'start')
$ECHO "Mailer daemons: \c"
# Choose sendmail options. The file might contain something like -om
# to turn on "metoo"
OPTS=`cat $CONFIG/sendmail.options 2>/dev/null`
# Force $G if Gauntlet appears to be installed.
if [ -f /etc/init.d/gauntlet ]; then
if expr "$OPTS" : "oMGgauntlet" >/dev/null; then
OPTS="$OPTS -oMGgauntlet"
fi
$G_RC/S100mail stop
fi
parse_args $OPTS
# Move to post office directory
if $CSU -m -c "test ! -d ${MAILDIR} -a ! -L ${MAILDIR}"; then
mkdir -m 775 ${MAILDIR}
if test "`sysconf MAC`" -eq 1; then
chlabel -m ${MAILDIR}
fi
fi
olddir="`pwd`"
cd ${MAILDIR}
if test $? = 0; then
cd ${olddir}
if test "`sysconf MAC`" -eq 1; then
files=`$CSU -m -C CAP_MAC_READ+ipe -c "echo ${MAILDIR}/[A-Z]-[a-z]*"`
for f in $files; do
label=`$CSU -m -C CAP_MAC_READ+ipe -c "ls -1Md $f" \
| awk '{print $2}' \
| sed -e 's!\[!!' -e 's!\]!!'`
if $CSU -M $label -c "test ! -d ${MAILDIR}/:saved"; then
$CSU -M $label -c "mkdir ${MAILDIR}/:saved"
fi
$CSU -M $label -C CAP_FOWNER+ipe \
-c "chown root ${MAILDIR}/. ${MAILDIR}/:saved ; \
/sbin/find ${MAILDIR}/. -local -exec chgrp mail {} \\; \
-exec chmod g+w {} \\;"
done
else
if test ! -d ${MAILDIR}/:saved ; then
mkdir -m 775 ${MAILDIR}/:saved
fi
$CSU -C CAP_FOWNER+ipe \
-c "chown root.mail ${MAILDIR}/. ${MAILDIR}/:saved ; \
/sbin/find ${MAILDIR}/. -local \
\\( ! -group mail -o ! -perm -020 \\) \
-exec chgrp mail {} \\; \
-exec chmod g+w {} \\;"
fi
fi
# Move to spool directory. Make sure the directory exists, and is of the
# proper permissions
if test ! -d /var/spool; then
mkdir /var/spool
fi
if $CSU_DBADMIN -c "test ! -d ${QUEUEDIR}/."; then
$CSU_DBADMIN -c "mkdir -m 755 ${QUEUEDIR}"
fi
$CSU_DBADMIN -C CAP_FOWNER+ipe -c "chmod 755 ${QUEUEDIR}/.; \
chown root.mail ${QUEUEDIR}/."
# Make sure that /usr/lib/sendmail is executable and setuid root
if test ! -x /usr/lib/sendmail; then
echo "mail: no /usr/lib/sendmail, can't use mail"
exit 255
fi
# check the alias data base
if test ! -r /etc/aliases; then
echo "mail: /etc/aliases is missing, can't use mail"
exit 255
fi
if test ! -r /etc/aliases.dir -o ! -r /etc/aliases.pag; then
touch /etc/aliases.dir /etc/aliases.pag
sleep 1
touch /etc/aliases
fi
# Make sure that /bin/mail is correct
if test ! -x /bin/mail; then
echo "mail: no /bin/mail, can't use mail"
exit 255
fi
if test ! -c /dev/log; then
echo "mail: syslogd is not running, /dev/log does not exist"
exit 255
fi
# kill any old daemons
$CSU_DBADMIN -c "/sbin/killall -15 sendmail"
# Clean up any old lock files
$CSU_DBADMIN -c "rm -rf ${QUEUEDIR}/[tnx]f*" >/dev/null 2>&1
# If both smap and sendmail chkconfig'ed on, smap does and should prevail.
if $IS_ON smap; then
if test ! -d /usr/spool/smap; then
mkdir -m 755 -p /usr/spool/smap
chown smap /usr/spool/smap
fi
# /etc/sendmail.fc necessary since sendmail is still delivery agent
if test -s /etc/sendmail.fc; then
(echo "Freezing sendmail.cf" ;
/usr/lib/sendmail -bz) | logger -t sendmail
fi
# ignore SIGHUP from init, so backgrounded demons will not be killed
trap "" 1
# smap and other Gauntlet support is delt with in the gauntlet mail
# startup script
if [ -f /etc/init.d/gauntlet ]; then
$G_RC/S100mail start
fi
elif $IS_ON sendmail; then
# start the daemon.
if test -s /etc/sendmail.fc; then
FRZ="echo Freezing sendmail.cf; /usr/lib/sendmail -bz; "
fi
# start in background because starting can take a while
$CSU_DBADMIN -C $CAP_SENDMAIL -c \
"$FRZ /usr/lib/sendmail $DOPTS $OPTS" \
| logger -t sendmail &
$ECHO "sendmail."
else
$ECHO "none."
fi
# rebuild aliases just in case, but after freezing sendmail.cf.
$CSU_DBADMIN -c "rm -f /etc/aliases.pag /etc/aliases.dir /etc/aliases.db"
newaliases >/dev/null &
;;
'stop')
$CSU_DBADMIN -c "/sbin/killall -15 sendmail"
if [ -f /etc/init.d/gauntlet ]; then
$G_RC/S100mail stop
fi
;;
*)
echo "usage: $0 {start|stop}"
;;
esac

View File

@@ -0,0 +1,89 @@
# netif.options:
#
# The network startup script, /etc/init.d/network, computes typical
# primary and gateway interface names and addresses for most systems.
# Netif.options provides a place for site-dependent network interface
# definitions. You need to modify this file only if:
# 1) the computed primary and/or gateway interface names are incorrect, or
# 2) you don't like the convention used to define addresses for interfaces, or
# 3) the host has more than 2 interfaces.
#
# /etc/init.d/network uses two variables to configure each interface.
# The script uses "if1name" and "if1addr" for the primary interface,
# "if2name" and "if2addr" for the first gateway interface, etc.
# By default, when an fddi interface is present, the network sets it
# to be the primary interface (if1name) and the primary ethernet interface
# to be the secondary (if2name). If you do not want this behavior, you
# must explictly set both if1name and if2name in this file, not just
# if1name (see below).
#
# An ifXname variable (where X=1,2,3...) is the interface's device name as
# reported by "/usr/etc/netstat -i". Valid names include ef0, eg0,
# rns0, rns1, ipg0, ipg1, atm0, atm1, etc., but NOT lo0.
#
# An ifXaddr variable is a hostname containing $HOSTNAME or a hostname
# in /etc/hosts or an IP address in dot notation. ($HOSTNAME is the host's
# name in /etc/sys_id.) By convention, gateway interfaces use the
# "gate-", "gate2-" and "gate3-" prefixes in front of $HOSTNAME.
# If you don't like this convention, change the appropriate ifXaddr variables.
# For the system to boot correctly, make sure that names specified in ifXaddr
# variables have entries in /etc/hosts.
# IMPORTANT: any ifXname variables not defined, or commented out, in
# /etc/config/netif.options will retain their default values chosen
# by the network startup script. Care should be taken not to assign
# such a default value to another ifXname without ensuring that the
# ifXname also referencing this interface is assigned a different
# name, since this can lead to unexpected results and possible loss
# of network connectivity. As an example, on a system which has
# an et interface and an ipg interface, the following netif.options
# would be wrong:
#
# # if1name commented out
# #if1name=ef0
# #if1addr=192.0.0.1
# # define if2name to be FDDI
# if2name=rns0
# if2addr=192.0.1.1
#
# since the system would choose the rns FDDI interface to be the default
# value for if1name and would subsequently try to configure it twice;
# as if1name and if2name.
# The following shell variables have the form "var=value", with no spaces
# before or after the = character (for example: if1name=fxp1).
# Lines with the leading : character are commented out.
# Append the interface name and remove the leading : to override
# the primary interface selection.
: if1name=
# To override the primary interface address, change the value part
# and remove the leading : character.
: if1addr=$HOSTNAME
# To override the name and/or address of the first gateway interface,
# change the value part and remove the leading : character.
: if2name=
: if2addr=gate-$HOSTNAME
# If this host has more than 2 interfaces, you must define values for
# if3name (and if4name if appropriate). Change if3addr (and if4addr) to
# the appropriate names in /etc/hosts if your site has different naming
# conventions.
if3name=
if3addr=gate2-$HOSTNAME
if4name=
if4addr=gate3-$HOSTNAME
# If this host has more than 8 network interfaces, set the number of
# interfaces that the network startup script will configure.
: if_num=8

View File

@@ -0,0 +1,934 @@
#!/sbin/sh
#Tag 0x00000f00
# Initialize/Shutdown the standard and optional network software.
#
# $Revision: 5.96 $
#
# If the IP address for this host is the default 192.0.2.1 Internet test
# address, the software is configured for loopback (standalone) mode.
# An Internet address other than the default must be chosen in order to
# configure the network properly. See the "Network Administration" chapter
# in the Network Communications Guide or details on selecting an address.
#
# NOTE: Defaults for network interface names and addresses can be changed by
# editting /etc/config/netif.options. Therefore, you don't need to edit
# this file.
#
# A daemon or subsystem is enabled if its configuration flag in the
# /etc/config directory in the "on" state. /sbin/chkconfig is used
# to test a flag's state (see chkconfig(1M) for details). If the flag
# file is missing, the flag is considered off.
#
# Flag Action if On
# network Allow incoming & outgoing traffic. This flag can be
# set off if you need to isolate the machine from
# network without removing cables.
# verbose Print name of daemons as they are started & other info
# gated Start Cornell routing daemon instead of BSD routed
# mrouted Start Stanford IP multicast routing daemon
# (Useful only on gateways)
# named Start 4.3BSD Internet domain name server
# rsvpd Start ISI RSVP daemon
# rwhod Start 4.3BSD rwho daemon
# timed Start 4.3BSD time synchronization daemon
# timeslave Start SGI time synchronization daemon
# hypernet Initialize HyperNET controller and routes
# routed Start 4.3BSD RIP routing daemon
# ipfilterd Enable SGI IP Packet Filtering daemon
#
# The following flags are installed only in the optional products:
#
# nfs Start NFS daemons, mount NFS filesystems
# autofs Start the NFS autofs daemon (overrides automount)
# automount Start the NFS automounter daemon
# lockd Start the NFS lock and status daemons
# pcnfsd Start the PC-NFS server daemon
# rarpd Start the Reverse ARP daemon
# snetd Start the DLPI daemon - snetd
# nsd Start the name service daemon - nsd
# ypmaster Become the NIS master; start passwd server
# 4DDN Initialize 4DDN (DECnet) software
#
# Site-dependent options for daemons belong in "options" files in /etc/config.
# Certain daemons require options so their options file must contain valid
# information. See the daemon's manual page in section 1M for details on
# valid options. If this host is on networks that use subnetting, add the
# appropriate 'netmask' to the ifconfig-*.options files (see ifconfig(1M) for
# details on netmasks).
#
# File Status
# autofs.options optional
# automount.options optional
# biod.options optional
# gated.options optional
# ifconfig-1.options optional (for primary network interface)
# ifconfig-2.options optional (for 1st gateway network interface)
# ifconfig-3.options optional (for 2nd gateway network interface)
# ifconfig-4.options optional (for 3rd gateway network interface)
# ifconfig-hy.options optional (for HyperNET interface)
# inetd.options optional
# lockd.options optional
# mrouted.options optional
# named.options optional
# netif.options optional (to select different primary &
# gateway interfaces, etc.)
# nfsd.options optional
# nsd.options optional
# portmap.options optional
# rarpd.options optional
# routed.options optional
# rpc.passwd.options optional
# rsvpd.options optional
# rwhod.options optional
# snetd.options optional
# static-route.options optional add static routes
# timed.options optional
# timeslave.options required
#
# In addition, site-dependent configuration commands related to networking
# should be put in a separate shell script called /etc/init.d/network.local.
# Make symbolic links in /etc/rc0.d and /etc/rc2.d to this file to have it
# called during system startup and shutdown:
# ln -s /etc/init.d/network.local /etc/rc0.d/K39network # before network
# ln -s /etc/init.d/network.local /etc/rc2.d/S31network # after network
# The script is called with one argument ("start" or "stop").
#
#
# Copyright 1988-1995 Silicon Graphics, Inc.
# All rights reserved.
#
# This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
# the contents of this file may not be disclosed to third parties, copied or
# duplicated in any form, in whole or in part, without the prior written
# permission of Silicon Graphics, Inc.
#
# RESTRICTED RIGHTS LEGEND:
# Use, duplication or disclosure by the Government is subject to restrictions
# as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
# and Computer Software clause at DFARS 252.227-7013, and/or in similar or
# successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
# rights reserved under the Copyright Laws of the United States.
CONFIG=/etc/config
IS_ON=/sbin/chkconfig
# The verbose flag controls the printing of the names of daemons as they
# are started and the printing of NFS-mounted filesystem names as they are
# mounted and unmounted.
if $IS_ON verbose; then
ECHO=echo
VERBOSE=-v
QUIET=
LOGGER='lfmt -l network -s warn'
else # For a quiet startup and shutdown
ECHO=:
VERBOSE=
QUIET=-q # also used in static-route.options
LOGGER='lfmt -l network -s warn -G 3'
fi
PATH=$PATH:/usr/etc/yp:.
NFS=/usr/etc
YPDOMFILE=/var/yp/ypdomain
YPSETDOM=/usr/bin/domainname
IFCONFIG=/usr/etc/ifconfig
ROUTE=/usr/etc/route
MSGTIME=10 # number of seconds to display error message
localhost=127.0.0.1 # definition of 'localhost' in /etc/hosts
if $IS_ON cap_su_off && test "`sysconf MAC`" -eq 1; then
CSU=csu_off -C
csu_off () {
while true; do
case "$1" in
-M) shift 2;;
-M?*) shift;;
CAP*) shift;;
-C) shift 2;;
-C?*) shift;;
*) break;;
esac
done
shift
eval $*
return
}
else
CSU="/sbin/suattr -C"
fi
CAP_MNT="$CSU CAP_MOUNT_MGT+ip -c"
CAP_NET="$CSU CAP_NETWORK_MGT+ip -c"
CAP_PORT="$CSU CAP_PRIV_PORT+ip -c"
CAP_PORT_MNT="$CSU CAP_PRIV_PORT,CAP_MOUNT_MGT+ip -c"
CAP_MREAD_MNT="$CSU CAP_MAC_READ,CAP_MOUNT_MGT+ip -c"
CAP_DEMON="$CSU CAP_NETWORK_MGT,CAP_PRIV_PORT+ip -c"
CAP_INFO="$CSU CAP_SYSINFO_MGT+ip -c"
CAP_DEVNET="$CSU CAP_DEVICE_MGT,CAP_NETWORK_MGT+ip -c"
nfs_on () {
$IS_ON nfs && test -x /usr/sbin/havenfs && $CAP_MNT "/usr/sbin/havenfs"
return
}
svr4net_on ()
{
test -c /dev/tcp && (echo </dev/tcp) >/dev/null 2>&1
return
}
configure () {
# args: $1 = interface name, $2 = address, $3 = ifconfig options filename
# $4 = "primary" or ""
$ECHO "Configuring $1 as $2"
CONF_OPT="`cat $3 2> /dev/null`"
case "$1" {
ipg* | xpi* | rns*)
if /usr/etc/smtconfig $1 $2 $4 $CONF_OPT 2> /dev/null
then :
else
$CAP_DEVNET "$IFCONFIG $1 inet $2 $4 $CONF_OPT" 2> /dev/null
fi
;;
mtr*)
if test -s /etc/config/${1}config.options; then
topt="`cat /etc/config/${1}config.options`"
else
topt="restart"
fi
# load the firmware to the driver
/usr/etc/mtrconfig $1 $topt 2> /dev/null
$CAP_DEVNET "$IFCONFIG $1 inet $2 $4 $CONF_OPT" 2> /dev/null
;;
eg*)
$ECHO "Downloading firmware for $1"
/usr/etc/egconfig `cat $CONFIG/$1.options 2> /dev/null` $1
$CAP_DEVNET "$IFCONFIG $1 inet $2 $4 $CONF_OPT" 2> /dev/null
;;
gsn*)
# Initialize the GSN interface.
# Needs to be done before ifconfig of IP addr.
if test -s /etc/init.d/network.gsn1; then
/etc/init.d/network.gsn1 start
fi
$CAP_DEVNET "$IFCONFIG $1 inet $2 $4 $CONF_OPT" 2> /dev/null
;;
*)
$CAP_DEVNET "$IFCONFIG $1 inet $2 $4 $CONF_OPT" 2> /dev/null
;;
}
if test $? -ne 0 ; then
$LOGGER "Failed to configure $1 as $2.\n"
sleep $MSGTIME
return 1
fi
return 0
}
# print a warning message when we try to configure the same interface twice
config_conflict()
{
echo "\nWARNING: $1 has already been configured."
echo "Please read the notes in /etc/config/netif.options for "
echo "likely reasons for this and change your configuration\n"
}
DLMNTOPTS='-b /ns'
if test "`/sbin/nvram diskless 2> /dev/null`" -eq 1; then
DLMNTOPTS='-b /,/usr,/sbin,/swap,/ns'
RFLUSHFLAG=-fqn
# If an interface is being used for diskless, don't shut it down when
# turning off the system.
DLIF=`/sbin/nvram dlif 2> /dev/null`
else
RFLUSHFLAG=-Fqn
fi
# Turn off an interface that needs to be turned off when the system
# is shutdown, but do not turn off the interface used by a diskless
# system, since that is catastrophic.
# Do not bother poking at non-existent interfaces.
if_off () {
# args: $1 = interface name
eval _ifname='$HAVE_'$1
if test "$_ifname" = "$1" -a "$1" != "$DLIF"; then
$CAP_DEVNET "$IFCONFIG $1 down" 2> /dev/null
fi
}
# Discover the interfaces we have by creating variables of the
# form HAVE_xxx
IFNAMES="`ifconfig -a \
| sed -n -e '/^lo0/d' -e '/^ /d' -e 's/^\([^:]*\):.*/HAVE_\1=\1/p'`"
eval $IFNAMES
case "$1" in
'start')
# Check the Internet address to decide how to configure things.
HOSTNAME=`/usr/bsd/hostname`
netstate="loopback"
if test -x /usr/bsd/hostid; then
if $CAP_INFO "/usr/bsd/hostid -h $HOSTNAME"; then
if test "`/usr/bsd/hostid`" = "0xc0000201"; then
reason="${HOSTNAME}'s Internet address is the default.\n"
elif $IS_ON network; then
netstate="ok"
fi
else
$CAP_INFO "/usr/bsd/hostid 0"
reason="Cannot find $HOSTNAME in /etc/hosts.\n"
fi
elif $IS_ON network; then
netstate="ok" # assume it is ok
fi
if svr4net_on; then
SHORTNAME=`/usr/bsd/hostname -s`
echo $SHORTNAME $SHORTNAME > /etc/net/ticlts/hosts 2>/dev/null
echo $SHORTNAME $SHORTNAME > /etc/net/ticots/hosts 2>/dev/null
echo $SHORTNAME $SHORTNAME > /etc/net/ticotsord/hosts 2>/dev/null
fi
# Download remote host database
if test -x /usr/etc/rhost; then
$ECHO "Downloading Remote Host Database"
HOSTRESORDER=local $CAP_NET "/usr/etc/rhost"
fi
# The following tests determine the names and addresses of the primary
# and gateway interfaces for typical configurtations, where
# Name = interface name reported by "/usr/etc/netstat -i".
# Address = hostname in /etc/hosts or an IP address in dot notation.
#
# Edit /etc/config/netif.options to override values computed below.
#
# Note: If this host has more than 2 interfaces, you must edit
# /etc/config/netif.options to set the ifXname and ifXaddr variables
# as appropriate, and if this host has more than 8 interfaces, you must
# also set if_num to the number of interfaces.
#
# Suggested addresses for the primary and gateway interfaces.
if1addr=$HOSTNAME
if2addr=gate-$HOSTNAME
if_num=9
# If FDDI is present, make it the primary interface and
# Ethernet the gateway interface.
if test -n "$HAVE_ipg0"; then
if1name=ipg0
elif test -n "$HAVE_xpi0"; then
if1name=xpi0
elif test -n "$HAVE_rns0"; then
if1name=rns0
fi
if test "$if1name"; then
if test -n "$HAVE_et0"; then
# Challenge/Onyx & POWER Series systems
if2name=et0
elif test -n "$HAVE_ec0"; then
# Indigo & Personal Iris series
if2name=ec0
elif test -n "$HAVE_ef0"; then
if2name=ef0
elif test -n "$HAVE_fxp0"; then
if2name=fxp0
fi
elif test -n "$HAVE_et0"; then
if1name=et0
if test -n "$HAVE_et1"; then
if2name=et1
elif test -n "$HAVE_fxp0"; then
if2name=fxp0
fi
elif test -n "$HAVE_ec0"; then
if1name=ec0
if test -n "$HAVE_ec1"; then
if2name=ec1
if test -n "$HAVE_ec2"; then
if3name=ec2
fi
elif test -n "$HAVE_ec2"; then
if2name=ec2
elif test -n "$HAVE_fxp0"; then
if2name=fxp0
fi
elif test -n "$HAVE_ef0"; then
if1name=ef0
if test -n "$HAVE_ef1"; then
if2name=ef1
fi
elif test -n "$HAVE_fxp0"; then
if1name=fxp0
fi
# Obtain site-dependent values for if1name,if1addr,...,if64name,if64addr.
if test -s $CONFIG/netif.options; then
. $CONFIG/netif.options
fi
# Do site-dependent ha work for pre-start
#
# The HA script must be started before doing anything with
# the interfaces because the HA script may change interface
# related parameters.
if test -s /etc/init.d/network.ha.prestart; then
. /etc/init.d/network.ha.prestart
fi
# IP Packet Filtering daemon.
#
# It should be started before any gateway interface is configured "up"
# in order to guarantee that all inbound packets are filtered.
if $IS_ON ipfilterd && test -x /usr/etc/ipfilterd; then
/sbin/killall ipfilterd
IPFILTERD_OPTS="`cat $CONFIG/ipfilterd.options 2> /dev/null`"
$CAP_NET "/usr/etc/ipfilterd $IPFILTERD_OPTS"
$ECHO "Starting ipfilterd."
fi
# Flush all old routes iff not diskless
$CAP_NET "$ROUTE $RFLUSHFLAG"
# Configure the main network interface.
if test "$netstate" = "ok"; then
# update E-Plex 8-port Ethernet firmware.
if test -x /usr/etc/epfirm; then
$CAP_NET "/usr/etc/epfirm $VERBOSE"
if test $? -ne 0 ; then
$LOGGER "Failed to install E-Plex firmware.\n"
sleep $MSGTIME
fi
fi
if ! configure $if1name $if1addr $CONFIG/ifconfig-1.options primary; then
reason="Cannot access primary interface, $if1name.\n"
netstate="loopback"
fi
else
netstate="loopback"
fi
if test $netstate = "loopback"; then
$LOGGER "${reason}Using standalone network mode.\n"
sleep $MSGTIME
if test -n "$if1name"; then
$CAP_DEVNET "$IFCONFIG $if1name inet $if1addr" 2>/dev/null
$CAP_DEVNET "$IFCONFIG $if1name down" 2>/dev/null
fi
$CAP_DEVNET "$IFCONFIG lo0 $localhost"
$CAP_NET "$ROUTE -q add 224.0 $localhost -interface"
else
# Initialize other boards if this host is a gateway or multi-homed
# (no harm if they are missing). Systems with more than 2 interfaces
# must update /etc/config/netif.options (see comments in the file).
num=2
while test $num -le $if_num; do
eval _ifname='$'if${num}name _ifaddr='$'if${num}addr
if test -n "$_ifname"; then
eval _ifhave='$'HAVE_$_ifname
if test -n "$_ifhave"; then
# before configuring, check that there is no name
# conflict with a default value chosen automatically above.
# we just check the first three interfaces, since these
# can have their if?addr and if?name values set above.
cc_num=1
cc_lim=$num
if test $cc_lim -gt 4 ; then
cc_lim=4
fi
while test $cc_num -lt $cc_lim; do
eval _ifname_cc='$'if${cc_num}name
eval _ifaddr_cc='$'if${cc_num}addr
if [ "$_ifname" = "$_ifname_cc" ] ; then
config_conflict $_ifname
fi
if [ "$_ifaddr" = "$_ifaddr_cc" ] ; then
config_conflict $_ifaddr
fi
cc_num=`expr $cc_num + 1`
done
configure $_ifname $_ifaddr $CONFIG/ifconfig-$num.options
fi
fi
num=`expr $num + 1`
done
# Initialize the HyperNET interface.
if $IS_ON hypernet && test -n "$HAVE_hy0" &&
configure hy0 $HOSTNAME-hy $CONFIG/ifconfig-hy.options; then
/usr/etc/hyroute hy0 -s /usr/etc/hyroute.conf
fi
# Initialize the HIPPI interface.
if test -s /etc/init.d/network.hippi; then
. /etc/init.d/network.hippi
fi
# Initialize ATM TCP/IP software.
if test -s /etc/init.d/network.atm; then
. /etc/init.d/network.atm
fi
# Configure network multi-client striping
if $IS_ON ls && test -s /etc/init.d/network.ls; then
. /etc/init.d/network.ls
fi
# Configure point-to-point network striping
if $IS_ON lsp && test -s /etc/init.d/network.lsp; then
. /etc/init.d/network.lsp
fi
# Initialize the loop-back interface
$CAP_DEVNET "$IFCONFIG lo0 $localhost"
fi
# Send traffic for this host through lo0 for better performance
HOSTRESORDER=local $CAP_NET "$ROUTE -q add $if1addr $localhost -host"
# make 255.255.255.255 do something by pointing out the primary interface
if test "$if1name"; then
BCAST=`$CAP_DEVNET "$IFCONFIG $if1name" \
| sed -n -e 's/.*broadcast \([0-9.]*\).*/\1/p' 2>/dev/null`
if test "$BCAST"; then
$CAP_NET "$ROUTE -qn add 255.255.255.255 $BCAST"
fi
fi
# Add static routes before any routing daemons get theirs installed
if test $netstate = "ok" -a -s $CONFIG/static-route.options; then
. $CONFIG/static-route.options
fi
$ECHO "Network daemons:\c"
/sbin/killall gated routed mrouted rpcbind portmap named rsvpd
if test -x /usr/etc/satmpd; then
$CSU CAP_NETWORK_MGT,CAP_PRIV_PORT+ip -M userlow -c "/usr/etc/satmpd"
$ECHO " satmpd\c"
fi
if test $netstate = "ok" ; then
# Start either gated or routed.
if $IS_ON gated && test -x /usr/etc/gated ; then
GATED_OPTS="`cat $CONFIG/gated.options 2> /dev/null`"
$CAP_PORT "/usr/etc/gated $GATED_OPTS" &
$ECHO " gated\c"
elif $IS_ON routed && test -x /usr/etc/routed ; then
ROUTED_OPTS="`cat $CONFIG/routed.options 2> /dev/null`"
$CAP_DEMON "/usr/etc/routed $ROUTED_OPTS" &
$ECHO " routed\c"
fi
# Set the default route for all IP multicast packets to the
# primary interface.
HOSTRESORDER=local $CAP_NET "$ROUTE -q add 224.0 $if1addr -interface"
if $IS_ON mrouted && test -x /usr/etc/mrouted; then
MROUTED_OPTS="`cat $CONFIG/mrouted.options 2> /dev/null`"
$CAP_NET "/usr/etc/mrouted $MROUTED_OPTS" &
$ECHO " mrouted\c"
fi
fi
# Start rpcbind(1M) if SVR4 networking has been installed.
if test -x /usr/etc/rpcbind && svr4net_on; then
/usr/etc/rpcbind `cat $CONFIG/rpcbind.options 2> /dev/null` &
$ECHO " rpcbind\c"
elif test -x /usr/etc/portmap; then
PMAP_OPTS="`cat $CONFIG/portmap.options 2> /dev/null`"
$CAP_DEMON "/usr/etc/portmap $PMAP_OPTS" &
$ECHO " portmap\c"
fi
# Berkeley Internet Name Domain server:
#
# It has to be started before NIS and NFS so they can use hostnames
# not in /etc/hosts.
if $IS_ON named && test -x /usr/sbin/named; then
NAMED_OPTS="`cat $CONFIG/named.options 2> /dev/null`"
$CSU CAP_NETWORK_MGT,CAP_PRIV_PORT,CAP_MAC_UPGRADE,CAP_MAC_DOWNGRADE,CAP_MAC_RELABEL_OPEN,CAP_MAC_MLD+ip -c "/usr/sbin/named $NAMED_OPTS" </dev/null &
$ECHO " named\c"
fi
# RSVP daemon (logs to /var/tmp/.rsvpd.log)
if $IS_ON rsvpd && test -x /usr/etc/rsvpd; then
RSVPD_OPTS="`cat $CONFIG/rsvpd.options 2> /dev/null`"
$CAP_DEMON "/usr/etc/rsvpd $RSVPD_OPTS" &
$ECHO " rsvpd\c"
fi
$ECHO "."
# Define the NIS domain name.
if test -x $YPSETDOM; then
# The ypdomain file is needed only if NIS domain != Internet domain.
YPDOMAIN=`cat $YPDOMFILE 2> /dev/null`
if test ! "$YPDOMAIN" ; then
# Extract the domain from the hostname.
YPDOMAIN=`echo $HOSTNAME | sed -e 's/[^.]*\.\(.*\)/\1/'`
if test "$YPDOMAIN" = "$HOSTNAME"; then
# Hostname does not contain domain.
YPDOMAIN=""
fi
fi
# Set the domain even if NIS is not "on" so nsd can be
# started by hand later.
if test "$YPDOMAIN"; then
$CAP_INFO "$YPSETDOM $YPDOMAIN"
fi
fi
# Fire up name service daemons.
#
# Note: nsd has replaced ypserv and ypbind.
if test $netstate = "ok" && $IS_ON nsd ; then
$ECHO "Name services:\c"
/sbin/killall -TERM nsd
if test -x $NFS/nsd; then
NSD_OPTIONS="`cat $CONFIG/nsd.options 2> /dev/null`"
$CSU CAP_MAC_UPGRADE,CAP_MAC_DOWNGRADE,CAP_MAC_RELABEL_OPEN,CAP_MAC_MLD,CAP_MOUNT_MGT,CAP_NETWORK_MGT,CAP_PRIV_PORT,CAP_MAC_WRITE+ip -c "$NFS/nsd $NSD_OPTIONS"
$ECHO " nsd\c"
fi
if $IS_ON ypserv ; then
if ! grep -q -s nisserv /var/ns/domains/*/nsswitch.conf ; then
$LOGGER "No NIS domains found to serve.\nchkconfig ypserv off or ypinit the system.\n"
fi
fi
if $IS_ON ypmaster ; then
if test ! "$YPDOMAIN" ; then
$LOGGER "Cannot start NIS -- domain name not defined.\nEdit $YPDOMFILE to contain your domain name and reboot.\n"
sleep $MSGTIME
else
YPDBDIR=/var/ns/domains/$YPDOMAIN
$CAP_INFO "$YPSETDOM $YPDOMAIN"
/sbin/killall rpc.passwd
if test -x $NFS/rpc.passwd; then
# A reasonable alternate password file is '/etc/passwd.yp'
# This allows the valid accounts on the NIS master
# to not be all valid accounts in the network.
PASSWD=`cat $CONFIG/rpc.passwd.options 2> /dev/null`
$CAP_DEMON "$NFS/rpc.passwd ${PASSWD:=/etc/passwd} -m passwd" &
$ECHO " rpc.passwd\c"
fi
fi
fi
$ECHO "."
fi
# Load the GSN static HARP mapping table. Needs to be done after named is launched.
if test -s /etc/init.d/network.gsn2; then
. /etc/init.d/network.gsn2
fi
# Fire up AFS if configured - this needs to occur after networking
# is enabled but before nfsd's are run
if test -x /etc/init.d/afs ; then
/etc/init.d/afs netstart
fi
#
# cachefs must start prior to exportfs
#
if test -x /etc/init.d/cachefs ; then
/etc/init.d/cachefs netstart
fi
# Fire up NFS daemons if the kernel supports NFS and the daemons are
# present and executable. Also mount the NFS filesystems in /etc/fstab.
if test "$netstate" = "ok" && nfs_on ; then
# Clear this host from the client list (/etc/rmtab) of all
# servers on the network. Remove any stale exports from
# the current exports list (/etc/xtab).
$CAP_PORT_MNT "/sbin/umount -aT nfs,nfs3,nfs3pref ${DLMNTOPTS}" > /dev/null 2>&1
$CAP_MREAD_MNT "$NFS/exportfs -au" > /dev/null 2>&1
$CAP_MREAD_MNT "$NFS/exportfs -a $VERBOSE"
$ECHO "NFS daemons:\c"
/sbin/killall nfsd biod
# NFS server daemons
if test -x $NFS/nfsd; then
NNFSD=`cat $CONFIG/nfsd.options 2> /dev/null`
$CAP_DEMON "$NFS/nfsd $NNFSD";
$ECHO " nfsd\c"
fi
# NFS client bio daemons
if test -x $NFS/biod; then
NBIOD=`cat $CONFIG/biod.options 2> /dev/null`
$CAP_MNT "$NFS/biod ${NBIOD:=4}";
$ECHO " biod\c"
fi
$ECHO "."
$CAP_PORT_MNT "/sbin/mount $VERBOSE -aT nfs,nfs3,nfs3pref ${DLMNTOPTS}"
if $IS_ON automount || $IS_ON autofs || $IS_ON lockd || \
$IS_ON pcnfsd ; then
$ECHO "Other NFS daemons:\c"
# Start the NFS lock and status daemons
if $IS_ON lockd ; then
if test -x $NFS/rpc.statd ; then
/sbin/killall rpc.statd
$CAP_NET "$NFS/rpc.statd ""`cat $CONFIG/statd.options 2> /dev/null`"
$ECHO " statd\c"
fi
if test -x $NFS/rpc.lockd ; then
/sbin/killall rpc.lockd
$CSU CAP_CHROOT,CAP_NETWORK_MGT,CAP_PRIV_PORT,CAP_DAC_WRITE,CAP_MAC_READ,CAP_MAC_WRITE+ip -c "$NFS/rpc.lockd ""`cat $CONFIG/lockd.options 2> /dev/null`" &
$ECHO " lockd\c"
fi
fi
# PC-NFS server daemon
if $IS_ON pcnfsd && test -x $NFS/pcnfsd ; then
$NFS/pcnfsd & $ECHO " pcnfsd\c"
fi
# Start the NFS automounter daemon
if $IS_ON autofs && test -x $NFS/autofsd && \
test -x $NFS/autofs; then
/sbin/killall -k 30 -TERM automount
/sbin/killall -k 10 autofs autofsd
AUTOFSD_OPTS="`cat $CONFIG/autofs.options 2> /dev/null`"
$CSU CAP_MOUNT_MGT,CAP_SCHED_MGT,CAP_MAC_READ,CAP_MAC_WRITE,CAP_AUDIT_WRITE,CAP_MAC_UPGRADE,CAP_MAC_DOWNGRADE,CAP_MAC_RELABEL_OPEN,CAP_MAC_MLD,CAP_NETWORK_MGT,CAP_PRIV_PORT+ip -c "$NFS/autofsd $AUTOFSD_OPTS" >/dev/null 2>&1
$ECHO " autofsd\c"
AUTOFS_OPTS="`cat $CONFIG/autofs.options 2> /dev/null`"
$CSU CAP_MOUNT_MGT,CAP_MAC_READ+ip -c "$NFS/autofs $AUTOFS_OPTS" >/dev/null 2>&1
elif $IS_ON automount && test -x $NFS/automount ; then
/sbin/killall -k 30 -TERM automount
AUTOMOUNT_OPTS="`cat $CONFIG/automount.options 2> /dev/null`"
$NFS/automount $AUTOMOUNT_OPTS >/dev/null 2>&1
$ECHO " automount\c"
fi
$ECHO "."
fi
fi
# Daemons started below may reside on NFS filesystems.
$ECHO "Internet daemons:\c"
/sbin/killall inetd timed timeslave rarpd rwhod
# Internet super-server:
#
# Invokes servers in /usr/etc/inetd.conf. Use the inetd.options file
# to specify a different configuration file.
if test -x /usr/etc/inetd; then
INETD_OPTS="`cat $CONFIG/inetd.options 2> /dev/null`"
$CAP_DEMON "/usr/etc/inetd $INETD_OPTS" < /dev/null
$ECHO " inetd\c"
fi
# SVR4 service access controller
if test -x /usr/lib/saf/sac && svr4net_on; then
rm -f /etc/saf/_sacpipe /etc/saf/tcp/_pmpipe
/usr/lib/saf/sac -t 30 < /dev/null &
$ECHO " sac\c"
fi
# Time synchronization servers:
# timed keeps time consistent among machines on a local network.
# timeslave tracks changes made by a master time keeper.
#
# Timed can be given options in $CONFIG/timed.options, detailed
# in the timed(1M) man page.
#
# Timeslave requires the name of host to follow (-H hostname)
# or the name of clock device that listens to WWV (-C /dev/ttyXX).
# Other options are listed in the man page.
if $IS_ON timed && test $netstate = "ok" -a -x /usr/etc/timed ; then
TIMED_OPTS="`cat $CONFIG/timed.options 2> /dev/null`"
$CSU CAP_TIME_MGT,CAP_PRIV_PORT,CAP_NETWORK_MGT,CAP_SCHED_MGT+ip -M userlow -c "/usr/etc/timed -M $TIMED_OPTS" &
$ECHO " timed\c"
fi
if $IS_ON timeslave && test -x /usr/etc/timeslave ; then
if test -s $CONFIG/timeslave.options ; then
# timeslave cannotlive without timeslave.options
$CSU CAP_TIME_MGT,CAP_SCHED_MGT+ip -c "/usr/etc/timeslave `cat $CONFIG/timeslave.options`" &
$ECHO " timeslave\c"
else
$LOGGER "timeslave not started -- options missing.\nAdd them to %s and reboot.\n" "$CONFIG/timeslave.options"
sleep $MSGTIME
fi
fi
# RARPD: Reverse ARP daemon.
#
# RARP is used by Sun diskless clients to discover their Internet
# addresses, given their Ethernet addresses.
if $IS_ON rarpd && test $netstate = "ok" -a -x /usr/etc/rarpd ; then
$CAP_PORT "/usr/etc/rarpd ""`cat $CONFIG/rarpd.options 2> /dev/null`" &
$ECHO " rarpd\c"
fi
# Rwhod: 4.3BSD system status daemon.
#
# Important: if there are lots of hosts on the network,
# DO NOT run rwhod because it can saturate the network.
if $IS_ON rwhod && test $netstate = "ok" -a -x /usr/etc/rwhod; then
if test ! -d /var/spool/rwho; then
mkdir /var/spool/rwho
fi
RWHOD_OPTS="`cat $CONFIG/rwhod.options 2> /dev/null`"
$CAP_DEMON "/usr/etc/rwhod $RWHOD_OPTS"
$ECHO " rwhod\c"
fi
$ECHO "."
# DLPI daemon must be started before 4DDN.
if $IS_ON snetd && test -x /usr/etc/snetd ; then
/usr/etc/snetd
fi
if $IS_ON 4DDN && test $netstate = "ok" -a -x /var/opt/dn/dnstart.sh; then
/sbin/killall -TERM dnserver
/var/opt/dn/dnstart.sh $VERBOSE
fi
# Do site-dependent ha work for post-start
if test -s /etc/init.d/network.ha.poststart; then
. /etc/init.d/network.ha.poststart
fi
;;
'stop')
# Servers that might start shells.
USERS='rlogind rexecd rshd ftpd telnetd sethostd dnserver comlink latd'
# The following servers should be killed immediately.
EDAEMONS='inetd bootp tftpd timed timeslave rarpd rwhod talkd fingerd
automount autofs rpc.mountd rpc.lockd rpc.statd
rpc.bootparamd rpc.rexd rpc.rstatd rpc.rusersd rpc.rwalld
rpc.ypupdated fal smtd sac listen osid'
# Remote daemons
RDAEMONS='nsd rpc.passwd nfsd biod pcnfsd rpc.rquotad named gated
routed mrouted rsvpd'
# These daemons should be kept alive until the last minute.
LDAEMONS='autofsd portmap rpcbind ppp slip ipfilterd snetd'
# Do site-dependent ha work for pre-stop
if test -s /etc/init.d/network.ha.prestop; then
. /etc/init.d/network.ha.prestop
fi
# Kill (probable) shell process groups first
/sbin/killall -k 1 -g 1 $USERS
/sbin/killall -k 1 -TERM $EDAEMONS $USERS
$CAP_PORT_MNT "/sbin/umount $VERBOSE -kt nfs,nfs3,nfs3pref,lofs ${DLMNTOPTS}"
/sbin/killall -k 1 -TERM $RDAEMONS
# Unexport any exported NFS filesystems (assumes netstate = ok)
# Do this after killing the NFS demons so that clients do not
# suffer errors on their read(2) requests, if they have hard-mounted
# things. /usr may not be mounted, so you must check to see
# that exportfs is available.
if nfs_on && test -x $NFS/exportfs; then
$CAP_MREAD_MNT "$NFS/exportfs -au $VERBOSE"
fi
# cachefs shutdown must occur after exportfs but before the network
# interfaces are shut down
if test -x /etc/init.d/cachefs ; then
/etc/init.d/cachefs netstop
fi
# Blow away any background mounts and the broadcast umount since
# the network will be shut down soon.
/sbin/killall mount umount $USERS $EDAEMONS $RDAEMONS $LDAEMONS
for _ifname in `echo $IFNAMES | sed -e 's/HAVE[^=]*=//g'`; do
case $_ifname in
# Shutdown FDDI to turn off the optical bypasses to cleanly take
# the system out of the ring.
xpi*|ipg*|rns*) if_off $_ifname;;
# Shutdown ethernet (Indigo family (IP12/IP20/IP22))
ec1|ec2) if_off $_ifname;;
esac
done
# Shutdown HIPPI interface
if test -s /etc/init.d/network.hippi; then
. /etc/init.d/network.hippi
fi
# Shutdown GSN interface
if test -s /etc/init.d/network.gsn2; then
# Unload GSN HARP table entries
. /etc/init.d/network.gsn2
# Shutdown GSN interface
. /etc/init.d/network.gsn1
fi
# Shutdown ATM TCP/IP software.
if test -s /etc/init.d/network.atm; then
. /etc/init.d/network.atm
fi
# Do site-dependent ha work for post-stop
if test -s /etc/init.d/network.ha.poststop; then
. /etc/init.d/network.ha.poststop
fi
;;
*)
echo "usage: $0 {start|stop}"
;;
esac
# DECnet is a trademark of Digital Equipment Corp.
# NFS is a trademark of Sun Microsystems, Inc.

View File

@@ -0,0 +1 @@
on

View File

@@ -0,0 +1 @@
off

50
eoe/cmd/initpkg/init.d/partcfg Executable file
View File

@@ -0,0 +1,50 @@
#! /sbin/sh
#Tag 0x00000f00
# SN Partition Config Daemon - mkpd
# "$Revision: 1.5 $"
IS_ON=/sbin/chkconfig
MKPD=/usr/sbin/mkpd
case "$1" in
'start')
# (Re)start the partition config daemon.
#
# The following check skips mkpd if running on an Origin200. (for now)
if [ `ls -d /hw/module/*/slot/MotherBoard 2>/dev/null | wc -l` = 0 ]
then
killall -k 3 mkpd
if $IS_ON mkpd && test -x $MKPD; then
if $IS_ON verbose; then
echo "Partition Config daemons : mkpd."
fi
killall mkpd
MFLAGS=""
/sbin/suattr -C CAP_SCHED_MGT,CAP_DEVICE_MGT+ip -c "${MKPD} ${MFLAGS}" 2> /dev/null &
sleep 1; echo "\r\c"
fi
fi
exit 0
;;
'stop')
# Stop the partition config daemon
killall 15 mkpd
exit 0
;;
*)
echo "usage: $0 {start|stop}"
;;
esac

18
eoe/cmd/initpkg/init.d/postinst Executable file
View File

@@ -0,0 +1,18 @@
#! /sbin/sh
#Tag 0x00000f00
# Check for uncompleted installation operations
# "$Revision: 1.5 $"
# Check for & execute any uncompleted parts of an installation; this could
# happen if the inst succeeds but the system comes down abnormally.
# This must be done while local filesystems are mounted but while few
# other processes are active. That time is early during startup, or late
# during shutdown.
#
# It is a safe no-op if no installation has been done.
if [ -x /usr/sbin/postinst ]
then
/usr/sbin/postinst
fi

65
eoe/cmd/initpkg/init.d/quotas Executable file
View File

@@ -0,0 +1,65 @@
#! /sbin/sh
#Tag 0x00000f00
# Start or stop the quotas subsystem. This should be done immediately after
# the local file systems (EFS) are mounted.
# "$Revision: 1.11 $"
# Ideally we should run quotacheck(1M) when the file system has been
# mounted and quotas enabled. But since this might take up some time
# we provide a option /etc/config/quotacheck which will determine
# whether to run quotacheck(1M) during mount time or not.
#
# "$Revision: 1.11 $"
if /sbin/chkconfig verbose ; then
VERBOSE=-v
else
VERBOSE=
fi
case "$1" in
'start')
if /sbin/chkconfig quotas ; then
/sbin/suattr -C CAP_QUOTA_MGT+ip -c "/usr/etc/quotaon ${VERBOSE} -a"
if /sbin/chkconfig quotacheck ; then
/sbin/suattr -C CAP_QUOTA_MGT+ip -c "/usr/etc/quotacheck ${VERBOSE} -a"
fi
fi
;;
'stop')
/sbin/suattr -C CAP_QUOTA_MGT+ip -c "/usr/etc/quotaoff ${VERBOSE} -a"
;;
*)
echo "usage: $0 {start|stop}"
;;
esac
if [ -a /usr/tmp/restore_quotas ]
then
echo "Attempting to restore quotas after restoring disk from tape."
if [ -a /etc/init.d/quotas ]
then
repquota -s -a > /dev/null 2> /dev/null
if [ $? ]
then
repquota -s / 2>&1 | \
grep -q 'user quota accounting.*off'
if [ $? -ne 0 ]
then
edquota -i /usr/tmp/restore_quotas
rm /usr/tmp/restore_quotas
echo "Quotas have been restored"
else
echo "Use quotaon(1M) to turn on quotas, then reboot"
fi
else
echo "Quotas must be turned on before restoring."
fi
fi
fi

27
eoe/cmd/initpkg/init.d/raid Executable file
View File

@@ -0,0 +1,27 @@
#! /sbin/sh
#Tag 0x00000f00
# RAID control
# "$Revision: 1.8 $"
case $1 in
'start')
if /sbin/chkconfig verbose
then
echo "Checking for down RAID disks:"
fi
/usr/sbin/raid -L -cmf
;;
'stop')
if /sbin/chkconfig verbose
then
echo "Checking for down RAID disks:"
fi
/usr/sbin/raid -L -cmf
;;
*)
echo "usage: /etc/init.d/raid {start|stop}"
;;
esac

View File

@@ -0,0 +1,96 @@
#! /sbin/sh
#Tag 0x00000f00
# Clean up temporary files.
# "$Revision: 1.35 $"
set `/sbin/who -r`
if test $9 != "S"; then
exit 1
fi
# If no reasonable /tmp exists (!?!?!) create one.
if test ! -d /tmp -a ! -L /tmp; then
/sbin/suattr -m -c "rm -f /tmp"
mkdir /tmp
if test "`sysconf MAC`" -eq 1; then
chlabel -m /tmp
fi
fi
# Preserve any editor scratch files. If we moved /tmp to /.oldtmp earlier
# on, scratch files may be in /.oldtmp. To be really thorough, run through
# both /tmp and any /.oldtmp.
# Note that if we moved /tmp to /.oldtmp earlier on, it means we are both
# allowed and expected to delete the entire old /tmp contents. Since this
# is true, we can delete /.oldtmp when we are done with it.
if test -x /usr/lib/expreserve; then
if test -d /.oldtmp; then
/usr/lib/expreserve -d /.oldtmp
/sbin/suattr -m -C CAP_DAC_WRITE,CAP_DAC_READ_SEARCH,CAP_MAC_WRITE,CAP_MAC_READ,CAP_FOWNER+ipe -c "rm -rf /.oldtmp"
fi
if test "`sysconf MAC`" -eq 1; then
for dir in `/sbin/suattr -m -C CAP_MAC_READ+ipe -c "echo /tmp/[A-Z]-[a-z]"`;do
label=`/sbin/suattr -m -C CAP_MAC_READ+ipe -c "ls -1Md ${dir}" | awk '{print $2}' | sed -e 's!\[!!' -e 's!\]!!'`
/sbin/suattr -M $label -c "/usr/lib/expreserve -d /tmp"
done
else
/usr/lib/expreserve -d /tmp
fi
fi
# make /var/tmp exist
if test ! -d /var/tmp -a ! -L /var/tmp; then
/sbin/suattr -m -c "rm -f /var/tmp"
mkdir /var/tmp
if test "`sysconf MAC`" -eq 1; then
chlabel -m /var/tmp
fi
fi
if ls -ld /usr/tmp 2>/dev/null | grep "^d" > /dev/null 2>&1 ; then
/sbin/suattr -m -c "rm -rf /usr/TMPOLD > /dev/null 2>&1"
/sbin/suattr -m -c "mv /usr/tmp /usr/TMPOLD > /dev/null 2>&1"
/sbin/suattr -m -c "rm -rf /usr/tmp > /dev/null 2>&1"
/sbin/suattr -m -c "ln -s ../var/tmp /usr/tmp"
fi
if chkconfig nostickytmp; then
/sbin/suattr -m -C CAP_FOWNER+ipe -c "chmod 777 /tmp /var/tmp"
else
/sbin/suattr -m -C CAP_FOWNER+ipe -c "chmod 1777 /tmp /var/tmp"
fi
/sbin/suattr -m -C CAP_FOWNER+ipe -c "chown sys.sys /tmp /var/tmp"
# clean directories from /usr/tmp_rex or make sure it doesn't exist.
# Do not delete it recursively in case rexd is already running.
# XXX This should be removed along with rexd.
# XXX This is too late, since inetd is already running, which means
# XXX rexd might already be using its directory.
if test -d /var/tmp_rex; then
rmdir /var/tmp_rex/* 2> /dev/null
else
rm -f /var/tmp_rex
mkdir /var/tmp_rex
fi
# Don't make the symlink if the rm fails. In order to do this, we
# need to remove the -f flag to rm; otherwise, it won't exit with a
# non-zero value when rm fails. If /usr/tmp_rex is already a symlink,
# we may just be making a symlink the thing it already points at.
# On diskless systems, /usr is mounted read-only. Therefore, the rm
# of /usr/tmp_rex will fail. Checking to see if /usr/tmp_rex is the
# correct symlink requires using something like awk which isn't in
# /sbin. This is a good comprimise.
if test -d /usr/tmp_rex; then
rm -r /usr/tmp_rex 2> /dev/null
if [ $? = 0 ]; then
ln -s ../var/tmp_rex /usr/tmp_rex 2> /dev/null
fi
fi
/sbin/suattr -C CAP_FOWNER+ipe -c "chmod 775 /var/tmp_rex"
/sbin/suattr -C CAP_FOWNER+ipe -c "chown sys.sys /var/tmp_rex"
# prime the ps command data file, /tmp/.ps_data
/sbin/nice ps -e < /dev/null > /dev/null 2>&1 &

154
eoe/cmd/initpkg/init.d/savecore Executable file
View File

@@ -0,0 +1,154 @@
#!/sbin/sh
#Tag 0x00000800
#
# Perform a crash dump save.
# "$Revision: 1.23 $"
#
# Get the crash directory from the savecore.options file (if any). This
# way we can set up the savecore.options file in any fashion we want.
#
OPTIONS=`cat /etc/config/savecore.options 2> /dev/null`
CRASHDIR=""
if [ ! "${OPTIONS}" = "" ] ; then
for DIR in ${OPTIONS} ; do
if [ -d "${DIR}" ] ; then
CRASHDIR="${DIR}"
fi
done
if [ "${CRASHDIR}" = "" ] ; then
CRASHDIR="/var/adm/crash"
OPTIONS="${OPTIONS} ${CRASHDIR}"
fi
else
OPTIONS="/var/adm/crash"
CRASHDIR=${OPTIONS}
fi
#
# Set the current bounds value, if any.
#
BOUNDS=`/sbin/suattr -M dbadmin -c "cat ${CRASHDIR}/bounds" 2> /dev/null`
BOUNDS=${BOUNDS:=0}
#
# Assign filenames appropriately for the files in ${CRASHDIR} so that
# we write out the right reports to the right files. Note that the .N
# extension is whatever bounds value was assigned to this particular
# system panic or hang.
#
# For completeness, the files that can end up in ${CRASHDIR} are:
#
# fru.N:
# The FRU analysis of the hardware on the system if the IP type is
# valid and results are returned.
#
# analysis.N:
# The full IRIX crash core file report that displays lots of data
# on what happened when the system crashed. This report can be
# analyzed by SGI support personnel in order to try and find out
# why the system either paniced or hung.
#
# summary.N:
# The summary information about a crash, primarily used by the
# availmon information gathering process. Note that this file
# is removed as soon as 'availmon' picks it up.
#
# unix.N:
# A copy of /unix from the time of the system crash.
#
# vmcore.N.comp:
# A compressed version of the virtual memory at the time of the
# system crash. It can be used in combination with unix.N in order
# to gather details about the machine panic or hang.
#
FRU=${CRASHDIR}/fru.${BOUNDS}
UNIX=${CRASHDIR}/unix.${BOUNDS}
VMCORE=${CRASHDIR}/vmcore.${BOUNDS}.comp
ANA=${CRASHDIR}/analysis.${BOUNDS}
SUM=${CRASHDIR}/summary.${BOUNDS}
CLG=${CRASHDIR}/crashlog.${BOUNDS}
#
# Flag to determine if we need to update the bounds file or not. This
# is needed when 'savecore' exits with a status of 2, which means that
# there isn't enough disk space for a core dump, but there might be
# enough disk space to save a report.
#
UPDATE_BOUNDS=0
CONFIG=/etc/config
IS_ON=/sbin/chkconfig
if $IS_ON verbose ; then
LOGGER='/sbin/lfmt -l savecore -s info'
else
LOGGER='/sbin/lfmt -l savecore -s info -G 1'
fi
NOMSGSEVERITY=1 export NOMSGSEVERITY
#
# If 'savecore' is chkconfiged on, run 'savecore', followed by 'icrash',
# followed by 'fru', checking to make sure that the binaries are installed
# on a given system. If 'savecore' is chkconfiged off, run 'icrash',
# followed by 'fru', and then clear the dump out of /dev/swap.
#
if $IS_ON savecore || [ ! -f /usr/bin/icrash ] ; then
/sbin/suattr -M dbadmin -C CAP_MAC_WRITE+ip -c "/usr/etc/savecore ${OPTIONS}"
if [ $? -eq 1 ] ; then
exit 1
elif [ $? -eq 2 ] ; then
UNIX=/unix
VMCORE=/dev/swap
UPDATE_BOUNDS=1
fi
if [ -f /usr/bin/icrash ] ; then
/sbin/suattr -M dbadmin -c "/bin/rm -f ${SUM} ${ANA}"
/sbin/suattr -M dbadmin -c "/usr/bin/icrash -r -a ${SUM} -w ${ANA} ${UNIX} ${VMCORE}" 2> /dev/null
if [ $? -eq 0 ] ; then
${LOGGER} "Created crash report.\n"
if /sbin/suattr -M dbadmin -c "test -f ${CLG}" ; then
/sbin/suattr -M dbadmin -c "/bin/rm -f ${CLG}"
fi
if [ $UPDATE_BOUNDS -eq 1 ] ; then
BOUNDS=`expr ${BOUNDS} + 1`
/sbin/suattr -M dbadmin -c "echo ${BOUNDS} > ${CRASHDIR}/bounds"
fi
/sbin/suattr -M dbadmin -c "/bin/rm -f ${FRU}"
/sbin/suattr -M dbadmin -c "/usr/bin/icrash -S -w ${FRU} -e "fru" ${UNIX} ${VMCORE}" 2> /dev/null
if [ $? -eq 0 ] ; then
${LOGGER} "Created fru report.\n"
else
/sbin/suattr -M dbadmin -c "/bin/rm -f ${FRU}"
fi
else
/sbin/suattr -M dbadmin -c "/bin/rm -f ${SUM} ${ANA}"
if /sbin/suattr -M dbadmin -c "test -f ${CLG}" ; then
/sbin/suattr -M dbadmin -c "/bin/mv ${CLG} ${ANA}"
fi
fi
fi
else
UNIX=/unix
VMCORE=/dev/swap
if [ -f /usr/bin/icrash ] ; then
/sbin/suattr -M dbadmin -c "/bin/rm -f ${SUM} ${ANA}"
/sbin/suattr -M dbadmin -c "/usr/bin/icrash -r -a ${SUM} -w ${ANA} ${UNIX} ${VMCORE}" 2> /dev/null
if [ $? -eq 0 ] ; then
${LOGGER} "Created crash report.\n"
BOUNDS=`expr ${BOUNDS} + 1`
/sbin/suattr -M dbadmin -c "echo ${BOUNDS} > ${CRASHDIR}/bounds"
/sbin/suattr -M dbadmin -c "/bin/rm -f ${FRU}"
/sbin/suattr -M dbadmin -c "/usr/bin/icrash -S -w ${FRU} -e "fru" ${UNIX} ${VMCORE}" 2> /dev/null
if [ $? -eq 0 ] ; then
${LOGGER} "Created fru report.\n"
else
/sbin/suattr -M dbadmin -c "/bin/rm -f ${FRU}"
fi
else
/sbin/suattr -M dbadmin -c "/bin/rm -f ${SUM} ${ANA}"
fi
/sbin/suattr -M dbadmin -c "/usr/bin/icrash -c ${UNIX} ${VMCORE}" 2> /dev/null
fi
fi

View File

@@ -0,0 +1 @@
on

View File

@@ -0,0 +1 @@
on

View File

@@ -0,0 +1 @@
off

View File

@@ -0,0 +1 @@
on

89
eoe/cmd/initpkg/init.d/sn0start Executable file
View File

@@ -0,0 +1,89 @@
#! /sbin/sh
#Tag 0x00000f00
# SN0 System Startup
# "$Revision: 1.15 $"
IS_ON=/sbin/chkconfig
MMSCD=/usr/etc/mmscd
CLSHMCTL=/usr/etc/clshmctl
case "$1" in
'start')
# Retrieve messages from the IP27 PROM Log
/usr/sbin/sn0log -s -a
# (Re)start the multi-module system controller daemon.
#
# Note: the daemon probes to determines if an MMSC is present, and
# exits if not. If no MMSC is present, the probing process results
# in an MMSC "ping" command being sent to the console, consisting of
# the characters 0xa0 0x00 0x00 0x00 0xa0.
#
# The following check skips mmscd if running on an Origin200.
if [ `ls -d /hw/module/*/slot/MotherBoard 2>/dev/null | wc -l` = 0 ]
then
killall -k 3 mmscd
if $IS_ON mmscd; then
if $IS_ON verbose; then
echo "System controller daemons: mmscd."
fi
MFLAGS=""
if $IS_ON cleanpowerdown ; then MFLAGS="${MFLAGS} -g"; fi
if $IS_ON cpumeter ; then MFLAGS="${MFLAGS} -m"; fi
if [ -f /usr/gfx/gfxinit ]; then MFLAGS="${MFLAGS} -G"; fi
if [ `nvram console` != d ]; then
MFLAGS="${MFLAGS} -c /dev/ttyd1"
fi
/sbin/suattr -C CAP_SCHED_MGT,CAP_DEVICE_MGT+ip \
-c "${MMSCD} ${MFLAGS} -t 'System activity for `hostname`'"
sleep 1; echo "\r\c"
fi
# Starts up the craylink shared memory daemon.
# since placed the enclosing "if" doesn't get run on o200s
${CLSHMCTL} shutdown > /dev/null 2>&1
if $IS_ON clshmd; then
if $IS_ON verbose; then
echo "Craylink shared memory daemon: clshmd."
fi
/sbin/suattr -C CAP_SCHED_MGT,CAP_DEVICE_MGT+ip \
-c "${CLSHMCTL} startup"
sleep 1; echo "\r\c"
fi
fi
exit 0
;;
'stop')
# Stop the system controller daemon
# /sbin/scmsg "System coming down.."
killall -TERM -k 3 mmscd
# Stop the craylink shared memory daemon
${CLSHMCTL} shutdown > /dev/null 2>&1
exit 0
;;
*)
echo "usage: $0 {start|stop}"
;;
esac

89
eoe/cmd/initpkg/init.d/snmp Executable file
View File

@@ -0,0 +1,89 @@
#! /bin/sh
#
# This script starts then SNMP agents. SNMP support is made
# up of multiple parts. In the front is the Peer Networks
# master agent which handles new requests in SNMPv1 or v2.
# The master agent talks to an encapsulator which forwards
# requests on to agents. Currently we only ship one agent
# with the base operating system, which supports MIB2 and the
# SGI enterprise MIB. We ship subagents for the HP-UX mib
# and the atm mib as layerred products.
#
# Running chkconfig snmpd off/on controls whether the daemons
# are started.
#
# Configuration files for this are:
# peer_snmp.options command line arguments for master agent
# peer_encaps.options command line arguments for encapsulator
# snmpd.options command line arguments for MIB2/SGI sub-agent
# hpsnmpd.options command line arguments for HP-UX sub-agent
#
IS_ON=/sbin/chkconfig
if $IS_ON verbose ; then
ECHO=echo
else
ECHO=:
fi
CONFIG=/etc/config
BINDIR=/usr/etc
case "$1" in
'start')
if $IS_ON snmpd ; then
$ECHO "SNMP Agents:\c"
#
# peer_snmpd is the master agent which deals with SNMP
# protocol conversion.
#
if test -x $BINDIR/peer_snmpd ; then
$BINDIR/peer_snmpd `cat $CONFIG/peer_snmpd.options 2>/dev/null`
$ECHO " peer_snmpd\c"
fi
#
# peer_encaps is an encapsulator to allow the use of SNMPv1
# agents.
#
if test -x $BINDIR/peer_encaps ; then
$BINDIR/peer_encaps `cat $CONFIG/peer_encaps.options 2>/dev/null`
$ECHO " peer_encaps\c"
fi
#
# snmpd - handles MIB2 and the SGI enterprise mib.
#
if test -x $BINDIR/snmpd ; then
$BINDIR/snmpd `cat $CONFIG/snmpd.options 2>/dev/null`
$ECHO " snmpd\c"
fi
#
# hpsnmpd - handles the SGI port of the hp-ux mib.
#
if test -x $BINDIR/hpsnmpd ; then
$BINDIR/hpsnmpd `cat $CONFIG/hpsnmpd.options 2>/dev/null`
$ECHO " hpsnmpd\c"
fi
$ECHO "."
fi
;;
'stop')
#
# Kill all of the agents.
#
/sbin/killall -TERM peer_snmpd peer_encaps snmpd hpsnmpd
;;
*)
echo "usage: $0 {start|stop}"
;;
esac
exit 0

View File

@@ -0,0 +1,17 @@
# static-route.options
#
# The network startup script, /etc/init.d/network, invokes this
# script to set static routes. Site-dependent static routes should
# be put here.
#
# Because name services are not active when this file is invoked, any
# names used here should be defined in /etc/hosts.
#
# Read `man route`.
#
# Since $ROUTE and $QUIET are set in /etc/init.d/network, it is convenient
# to use `route` commands similar to the following here:
#
# $ROUTE $QUIET add -net 10 192.0.2.3
# or
# $ROUTE $QUIET add 192.168.1.1 192.0.2.5

68
eoe/cmd/initpkg/init.d/swap Executable file
View File

@@ -0,0 +1,68 @@
#! /sbin/sh
#Tag 0x00000f00
# Add/Delete swap files other than /dev/swap
# "$Revision: 1.13 $"
cd /
case $1 in
'start')
if /sbin/chkconfig verbose
then
echo "Adding swap areas declared in /etc/fstab\c"
fi
# Mount swap according to file system table /etc/fstab.
# Example:
# /swap/1 swap swap pri=3 0 0
#
/sbin/suattr -C CAP_SWAP_MGT+ip -c "/sbin/swap -m"
if /sbin/chkconfig verbose
then
echo "."
fi
if /sbin/chkconfig vswap
then
vswaplen=80000
if [ -s /etc/config/vswap.options ] ; then
. /etc/config/vswap.options
fi
#
# for now don't let users override vswapfile since an error
# could be costly because of the rm -rf below
#
vswapfile=/.swap.virtual
if /sbin/chkconfig verbose ; then
echo "Adding virtual swap."
fi
if [ ! -f ${vswapfile} ] ; then
rm -rf ${vswapfile}
fi
touch ${vswapfile}
/sbin/suattr -C CAP_SWAP_MGT+ip -c "/sbin/swap -a -v${vswaplen} ${vswapfile} 0 0"
fi
;;
'stop')
if /sbin/chkconfig verbose
then
echo "Removing swap areas\c"
fi
/sbin/suattr -C CAP_SWAP_MGT+ip -c "/sbin/swap -u"
if /sbin/chkconfig verbose
then
echo "."
fi
;;
*)
echo "usage: /etc/init.d/swap {start|stop}"
;;
esac

47
eoe/cmd/initpkg/init.d/sysctlr Executable file
View File

@@ -0,0 +1,47 @@
#! /sbin/sh
#Tag 0x00000f00
# System Controller Daemon
# "$Revision: 1.12 $"
IS_ON=/sbin/chkconfig
case "$1" in
'start')
# Start the system controller daemon
killall -TERM sysctlrd
# Do we want the powermeter?
if $IS_ON cpumeter ; then
# Do we want graceful shutdown?
if $IS_ON cleanpowerdown ; then
/sbin/suattr -C CAP_SCHED_MGT+ip -c "/usr/etc/sysctlrd -d -g" &
else
/sbin/suattr -C CAP_SCHED_MGT+ip -c "/usr/etc/sysctlrd -d" &
fi
else
# Do we want graceful shutdown?
if $IS_ON cleanpowerdown ; then
/sbin/suattr -C CAP_SCHED_MGT+ip -c "/usr/etc/sysctlrd -n -d -g" &
else
/sbin/suattr -C CAP_SCHED_MGT+ip -c "/usr/etc/sysctlrd -n -d" &
fi
fi
;;
'stop')
# Stop the system controller daemon
killall -TERM sysctlrd
sleep 2
/sbin/scmsg "System coming down.."
exit 0
;;
*)
echo "usage: $0 {start|stop}"
;;
esac

58
eoe/cmd/initpkg/init.d/sysetup Executable file
View File

@@ -0,0 +1,58 @@
#! /sbin/sh
#Tag 0x00000f00
# Initial System Setup
# "$Revision: 1.42 $"
case "$1" in
'start')
# If there are trademark files, print them.
if test -d /etc/tm; then
cat /etc/tm/* 2> /dev/null
fi
# set the system name
/sbin/suattr -C CAP_SYSINFO_MGT+ip -c "hostname `cat /etc/sys_id`"
# Start the syslog-demon
/sbin/suattr -M dbadmin -c "killall syslogd"
/sbin/suattr -M dbadmin -C CAP_DAC_WRITE,CAP_MAC_WRITE,CAP_NETWORK_MGT,CAP_PRIV_PORT+ip -c "/usr/etc/syslogd ""`cat /etc/config/syslogd.options 2> /dev/null`"
# Start the eventmonitor-demon
if test -x /etc/init.d/eventmonitor; then
/etc/init.d/eventmonitor start >/dev/null 2>&1
fi
# Setup Autologin
if test -r /etc/autologin; then
> /etc/autologin.on
fi
for ENTRY in /etc/autologin.ttyd*
do
if test -r $ENTRY
then
> $ENTRY.on
fi
done
;;
'stop')
# Stop the eventmonitor-demon
if test -x /etc/init.d/eventmonitor; then
/etc/init.d/eventmonitor stop >/dev/null 2>&1
fi
# Stop the syslog-demon
/sbin/suattr -M dbadmin -c "killall 15 syslogd"
killall 15 cached
exit 0
;;
*)
echo "usage: $0 {start|stop}"
;;
esac

View File

@@ -0,0 +1,23 @@
#! /bin/sh
#Tag 0x00000f00
# Initial System Setup
# "$Revision: 1.7 $"
case "$1" in
'start')
# syslogd not started here in miniroot
;;
'stop')
# Stop the syslog-demon
killall 15 syslogd
exit 0
;;
*)
echo "usage: $0 {start|stop}"
;;
esac

80
eoe/cmd/initpkg/init.d/usr Executable file
View File

@@ -0,0 +1,80 @@
#! /sbin/sh
#Tag 0x00000f00
# (u)mount the /usr filesystem (if necessary)
# "$Revision: 1.16 $"
cd /
MESSAGE='\07/usr failed to mount; may be unable to reach multiuser state'
case $1 in
'start')
#
# Mount only the /usr filesystem, and only if neccesary.
#
# This is done so that unbundled products must have initialization
# code run between mounting /usr (where their binaries probably live)
# and mounting the rest of the filesystems.
#
# On Indy (single partition) systems (and possibly others) /usr does
# not normally exist, so we must be able to just exit. The below
# test looks for "@/usr@" or "@/usr/@" in /etc/fstab where @ is
# white space defined by a space or tab. Lines beginning with a #
# are excluded as well as comments.
#
if test -z "`grep -v '^\#' /etc/fstab | sed 's/#.*//' | grep '[ ]/usr[/]*[ ]' `"; then
exit 0
fi
#
# If we don't have any products that require initialization code
# to be run between mounting /usr and mounting the rest of the
# filesystems, then we shouldn't mount /usr now. The serialization
# will slow booting.
#
# We test for this by looking for anything in the boot sequence
# between mounting /usr (executing "/etc/rc2.d/S02usr") and mounting
# the other filesystems (executing "/etc/rc2.d/S12filesystems").
#
if test -n "`/sbin/ls /etc/rc2.d | sed '/S04usr/,/S12filesystems/!d' | \
sed -e '/S04usr/d' -e '/S12filesystems/d'`"; then
# if /usr is already listed in mtab then it's already mounted
# no reason to try mounting again
if grep '^[^ ]* /usr ' /etc/mtab > /dev/null 2>&1
then
exit 0
fi
if /sbin/chkconfig verbose
then
echo "Mounting /usr:"
fi
#
# Check and mount /usr.
#
if /sbin/suattr -C CAP_MOUNT_MGT+ip -c "/sbin/mount -c /usr" > /etc/fscklogs/rusr 2>&1
then
cat /etc/fscklogs/rusr
else
cat /etc/fscklogs/rusr
echo $MESSAGE
sleep 5
fi
fi
;;
'stop')
#
# Unmount /usr.
#
# We use "-k" here because we know that this operation is late in
# the game and we don't want to fail because of running processes.
#
;;
*)
echo "usage: /etc/init.d/usr {start|stop}"
;;
esac

29
eoe/cmd/initpkg/init.d/uucp Executable file
View File

@@ -0,0 +1,29 @@
#! /sbin/sh
#Tag 0x00000f00
# UUCP control
# "$Revision: 1.15 $"
# demons which may be present when taking the system down
DEMONS="UUCICO uucico uusched uux"
case $1 in
'start')
# Clean-up uucp locks, status, and temporary files
set `/sbin/who -r`
if [ $9 = "S" ]
then
/bin/rm -rf /var/spool/locks/*
fi
;;
'stop')
/sbin/killall 15 $DEMONS
sleep 1
/sbin/killall $DEMONS
;;
*)
echo "usage: /etc/init.d/uucp {start|stop}"
;;
esac

View File

@@ -0,0 +1 @@
off

View File

@@ -0,0 +1 @@
off

View File

@@ -0,0 +1,8 @@
#
# This file is used to the startup script /etc/init.d/swap
# to determine the amount of virtual swap to add. You can
# totally disable the addition of virtual swap by
# 'chkconfig vswap off'
# See swap(1M) for a discussion on virtual swap
#
vswaplen=80000

View File

@@ -0,0 +1,33 @@
#!/sbin/sh
#Tag 0x00000f00
#
# Start X Display Manager
#
# $Revision: 1.9 $
#
IS_ON=/sbin/chkconfig
XSGI=/usr/bin/X11/Xsgi
XDM=/usr/bin/X11/xdm
case "$1" in
'start')
if test -x $XDM; then
if $IS_ON windowsystem && test -x $XSGI || $IS_ON xdm
then
exec $XDM
fi
fi
;;
'stop')
/sbin/killall -k 10 -TERM xdm
/sbin/killall -k 10 -TERM Xsgi
rm -rf /var/tmp/.XsgiShmInfo* /var/tmp/.Xsgishm*
;;
*)
echo "usage: /etc/init.d/xdm {start|stop}"
;;
esac

137
eoe/cmd/initpkg/init.d/xlv Executable file
View File

@@ -0,0 +1,137 @@
#! /sbin/sh
#Tag 0x00000f00
# XLV control
# "$Revision: 1.26 $"
always=true
revive_opt=""
startup_xlv ()
{
#
# Get user-supplied command arguments.
#
2>/dev/null read xlv_labd_opt < /etc/config/xlv_labd.options
2>/dev/null read assemble_opt < /etc/config/xlv_assemble.options
2>/dev/null read xlv_plexd_opt < /etc/config/xlv_plexd.options
#
# Get the local nodename directly from the
# /etc/sys_id file. Cannot use hostname(1)
# because the system name may not be set yet.
#
if [ -f /etc/sys_id ] ; then
read name < /etc/sys_id
name=${name%%.*}
else
name="IRIS"
fi
if /sbin/chkconfig verbose ; then
echo "Starting XLV:"
assemble_opt="$assemble_opt -t"
xlv_labd_opt="$xlv_labd_opt -v"
else
assemble_opt="$assemble_opt -q"
fi
# Start the plex revive daemon with a max of 4
# concurrent revives. This daemon needs to be
# started before any mirrored volumes are assembled.
#
if [ -x /sbin/xlv_plexd ]
then
if [ "$always" = "true" ] ; then
killall xlv_plexd > /dev/null 2>&1
/sbin/suattr -C CAP_DEVICE_MGT+ip -c "/sbin/xlv_plexd -m 4 -w 1 $xlv_plexd_opt"
else
ps -ef | grep -v grep | grep xlv_plexd > /dev/null 2>&1
if [ $? != 0 ] ; then
/sbin/suattr -C CAP_DEVICE_MGT+ip -c "/sbin/xlv_plexd -m 4 -w 1 $xlv_plexd_opt"
fi
fi
fi
# Set the geometry of the logical volume.
#
/sbin/suattr -C CAP_DEVICE_MGT+ip -c "/sbin/xlv_assemble -h $name $revive_opt $assemble_opt"
# Make sure that any configuration files written by xlv_assemble
# are written to disk.
/sbin/sync
# Start the label daemon. Note that we start it
# after running xlv_assemble because xlv_labd
# will only hang around if there are logical volumes.
#
if [ -x /sbin/xlv_labd ]
then
# The label daemon could have been automatically
# started by xlv_assemble when it kicked off revives.
#
if [ ! -p /etc/.xlv_labd_fifo ] ; then
/sbin/suattr -C CAP_SCHED_MGT,CAP_MEMORY_MGT,CAP_DEVICE_MGT+ip -c "/sbin/xlv_labd $xlv_labd_opt"
fi
fi
}
#
# M a i n
#
case $1 in
'init')
#
# init process
#
# Remove cruft from the last time system
# was restarted.
#
rm -rf /etc/.xlv_plexd_request_fifo > /dev/null 2>&1
rm -rf /etc/.xlv_labd_fifo > /dev/null 2>&1
rm -rf /dev/xlv > /dev/null 2>&1
rm -rf /dev/rxlv > /dev/null 2>&1
#
# During the "init" phase, xlv_assemble must be
# doing a full revive. This allows root volume
# to be made consistent.
#
revive_opt="-f"
startup_xlv
;;
'start')
#
# (Re)Start operation
#
# Set $always to "false" because we don't want to
# start xlv daemons multiple times.
#
always=false
startup_xlv
;;
'stop')
#
# Shutdown operation
#
if /sbin/chkconfig verbose ; then
echo "Shutting down XLV:"
fi
# /sbin/suattr -C CAP_DEVICE_MGT+ip -c "/sbin/xlv_shutdown"
# Stop the label daemon
killall xlv_plexd > /dev/null 2>&1
killall xlv_labd > /dev/null 2>&1
;;
*)
echo "usage: /etc/init.d/xlv {init|start|stop}"
;;
esac

View File

@@ -0,0 +1 @@
on