Path: utzoo!attcan!uunet!cme!durer!rowe From: rowe@cme.nist.gov (Walter Rowe) Newsgroups: comp.unix.admin Subject: Re: Software installation opinions needed Message-ID: Date: 26 Sep 90 09:23:22 GMT References: <312@pcad.UUCP> Sender: news@cme.nist.gov Organization: National Institute of Standards and Technology Lines: 122 In-reply-to: john@pcad.UUCP's message of 25 Sep 90 21:02:29 GMT >>>>> On 25 Sep 90 21:02:29 GMT, john@pcad.UUCP (John Grow) said: >> While the rc.local file is modified (either by the installation >> scripts or by hand), only a line calling another file, rc. >> (ours is rc.pcad), is inserted. The rc. file does all the >> necessary startup work. Some of colleagues and myself implemented an extension of this idea some time ago so that we wouldn't have to continually edit any of the distributed bootup (rc, rc.boot, rc.local) scripts. One of the local administrators (Ken Manheimer - klm@cme.nist.gov) came up with the idea of creating a script called `rc.site' that is run as the last thing in /etc/rc. Since all our machines mount the same /usr/local partition from a central server, that is a good place to store it. # Call my local rc.site script if [ -x /usr/local/sys/rc.site ]; then /usr/local/sys/rc.site > /dev/console 2>&1 fi Every machine on the net runs `rc.site' at bootup, so all machine specific bootup commands can go in this file. And since all NFS mounts take place in rc.local, adding it to the end of /etc/rc makes sure that /usr/local has already been mounted and that we can find the script. Using an `rc.site' has the advantages that: [1] all site-specific bootup procedures are in one place, [2] we don't have to customize the rc scripts on a machine-by-machine basis, and [3] all special bootup procedures are preserved across OS upgrades. Enclosed is a sample rc.site (modified for obvious reasons). Just press `n' to skip it, though I think it makes some points clear. wpr --- Walter P. Rowe ARPA: rowe@cme.nist.gov System Administrator, Robot Systems Division UUCP: uunet!cme-durer!rowe National Institute of Standards and Technology LIVE: (301) 975-3694 ====8<======8<======8<======[ rc.site ]======>8======>8======>8==== #! /bin/csh -fb # Start local stuff # echo -n 'local stuff:' # Add path for mount_xxx binaries # set path=($path /usr/kvm) # get the current hostname # set hostname = `hostname` # aliases to check if hostname is(not) in a list of names # alias IfHostIn echo "\!* | grep -s $hostname ;" 'if ($status == 0) then' alias IfHostNotIn echo "\!* | grep -s $hostname ;" 'if ($status == 1) then' # Start the UPS monitor on stella # IfHostIn foo /etc/upswatch echo -n ' upswatch' endif # Start the automounter on all hosts # if (-f /etc/auto.master) then /usr/etc/automount -v -M /auto -m -f /etc/auto.master echo -n ' automounter' endif # File servers use the atomic clock # Other machines use file servers # IfHostIn foo bar rdate india.colorado.edu >& /dev/null else rdate bar >& /dev/null endif echo -n ' rdate' # Run screenblank (bar doesn't have a bitmap console) # IfHostNotIn bar if (-x /usr/bin/screenblank) then screenblank echo -n ' screenblank' endif endif # Start up license servers on bar # THIS COULD SIMPLY CALL RC. # IfHostIn bar setenv FMHOME /depot/.primary/frame if (-x $FMHOME/bin/rpc.frameusersd) then $FMHOME/bin/rpc.frameusersd $FMHOME/frameusers >& /dev/null echo -n ' maker' endif endif # Exit normally (successful) # echo '.' exit 0