home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / apollo / 3291 < prev    next >
Encoding:
Text File  |  1992-08-17  |  21.4 KB  |  736 lines

  1. Newsgroups: comp.sys.apollo
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!utcsri!helios.physics.utoronto.ca!alchemy.chem.utoronto.ca!system
  3. From: system@alchemy.chem.utoronto.ca (System Admin (Mike Peterson))
  4. Subject: Re: Post OS installations: what do YOU do?
  5. Message-ID: <1992Aug17.171055.2597@alchemy.chem.utoronto.ca>
  6. Organization: University of Toronto Chemistry Department
  7. References: <1992Aug15.222958.27644@edsi.plexus.COM>
  8. Date: Mon, 17 Aug 1992 17:10:55 GMT
  9. Lines: 725
  10.  
  11. In article <1992Aug15.222958.27644@edsi.plexus.COM> chuck@edsi.plexus.COM (Chuck Tomasi) writes:
  12. >Over the last couple of years I have evolved a script to take care of a
  13. >machine once the OS and patches have been installed.  It started out
  14. >with a few site specific links and has grown to include patches to rc
  15. >files, extreme conditional checking, and lots more.  I'm curious to know
  16. >how many other sites have a post_os (or some other named) script and
  17. >what it includes.  Would you be willing to post it here (commented of
  18. >course to help readability) or a synopsis of what you do?
  19.  
  20. This one also started the same way, and is augmented by ~20 pages
  21. of nroff'ed notes on stuff I must do manually after an install.
  22. (I am willing to post them too if anyone wants them).
  23. I also have a similar script to this for our HP-UX systems,
  24. plus scripts that do automatic sysadmin every hour, day and month
  25. for both Domain/OS and HP-UX.
  26.  
  27. #! /bin/ksh
  28. #
  29. # Usage: Localstuff             - create any local files/links.
  30. #     Localstuff clean    - remove and recreate all local files/links.
  31. #
  32. host=`hostname`
  33. clean=$1
  34. #
  35. umask 22
  36. #
  37. # Set master news node.
  38. #
  39. masternews=alchemy
  40. #
  41. if [ "$clean" = "clean" ]; then
  42.    echo "Removing old files/links/directories, and relinking."
  43.    echo " "
  44. fi
  45. #
  46. # Create extra /dev files only if they don't exist:
  47. #    /dev/wn1a    (only on //plumbum)
  48. #    /dev/rwn1a    (only on //plumbum)
  49. #    /dev/pty[pqrs]*    (only on //plumbum)
  50. #    /dev/tty[pqrs]*    (only on //plumbum)
  51. # Link /dev/rmt8 and /dev/rmt12 to /dev/ws_rmt8 and /dev/ws_rmt12
  52. # respectively (on //plumbum only).
  53. #
  54. if [ $host = plumbum ]; then
  55.    if [ -f /dev/wn1a ]; then
  56.       echo "/dev/wn1a already exists - do nothing."
  57.    else
  58.       /etc/mknod /dev/wn1a b 0 17
  59.       chmod 666 /dev/wn1a
  60.       echo "/dev/wn1a created - see /etc/rc for the mount command."
  61.    fi
  62.    if [ -f /dev/rwn1a ]; then
  63.       echo "/dev/rwn1a already exists - do nothing."
  64.    else
  65.       /etc/mknod /dev/rwn1a c 0 17
  66.       chmod 666 /dev/rwn1a
  67.       echo "/dev/rwn1a created."
  68.    fi
  69.    if [ -f /dev/ptyp0 ]; then
  70.       echo "Some pty's already exist - do nothing."
  71.    else
  72.       /etc/crpty 32
  73.       echo "/dev/pty[pqrs]* created."
  74.    fi
  75.    if [ "$clean" = "clean" ]; then
  76.       rm -f /dev/rmt8 ; echo "/dev/rmt8 removed."
  77.       rm -f /dev/rmt12 ; echo "/dev/rmt12 removed."
  78.    fi
  79.    test -L /dev/rmt8
  80.    if [ "$?" = 0 ]; then
  81.       echo "/dev/rmt8 is already a link - do nothing."
  82.    else
  83.       ln -s ws_rmt8 /dev/rmt8
  84.       echo "/dev/rmt8 linked to /dev/ws_rmt8."
  85.    fi
  86.    test -L /dev/rmt12
  87.    if [ "$?" = 0 ]; then
  88.       echo "/dev/rmt12 is already a link - do nothing."
  89.    else
  90.       ln -s ws_rmt12 /dev/rmt12
  91.       echo "/dev/rmt12 linked to /dev/ws_rmt12."
  92.    fi
  93. fi
  94. #
  95. # Create NFS mount points for systems with multiple file systems
  96. # (if they don't exist).
  97. # Create reference directories if they don't exist; note that these
  98. # directories will contain links to the NFS mount point directories.
  99. # Do the link for the root (/) file system.
  100. #
  101. for nfshost in alchemy argentum gatto solaia taurasi tikva yaffa
  102. do
  103.    f1=/nfs
  104.    if [ -d $f1 ]; then
  105.       echo "$f1 already exists - do nothing."
  106.    else
  107.       mkdir $f1
  108.       echo "$f1 created."
  109.    fi
  110.    f1=/nfs/$nfshost
  111.    if [ -d $f1 ]; then
  112.       echo "$f1 already exists - do nothing."
  113.    else
  114.       mkdir $f1
  115.       echo "$f1 created."
  116.    fi
  117.    f1=/$nfshost
  118.    if [ -d $f1 ]; then
  119.       echo "$f1 already exists - do nothing."
  120.    else
  121.       mkdir $f1
  122.       echo "$f1 created."
  123.    fi
  124.    f1=/nfs/$nfshost/root
  125.    f2=/$nfshost/root
  126.    if [ "$clean" = "clean" ]; then
  127.       rm -f $f2 ; echo "$f2 removed."
  128.    fi
  129.    test -L $f2
  130.    if [ "$?" = 0 ]; then
  131.       echo "$f2 already is a link - do nothing."
  132.    else
  133.       rm -f $f2 ; echo "$f2 removed."
  134.       ln -s $f1 $f2
  135.       echo "$f2 linked to $f1."
  136.    fi
  137. done
  138. #
  139. # Do NFS root (/) mount point link for systems with single file systems
  140. # (if they don't exist).
  141. #
  142. #for nfshost in
  143. #do
  144. #   f1=/nfs
  145. #   if [ -d $f1 ]; then
  146. #      echo "$f1 already exists - do nothing."
  147. #   else
  148. #      mkdir $f1
  149. #      echo "$f1 created."
  150. #   fi
  151. #   f1=/nfs/$nfshost
  152. #   f2=/$nfshost
  153. #   if [ "$clean" = "clean" ]; then
  154. #      rm -f $f2 ; echo "$f2 removed."
  155. #   fi
  156. #   test -L $f2
  157. #   if [ "$?" = 0 ]; then
  158. #      echo "$f2 already is a link - do nothing."
  159. #   else
  160. #      rm -f $f2 ; echo "$f2 removed."
  161. #      ln -s $f1 $f2
  162. #      echo "$f2 linked to $f1."
  163. #   fi
  164. #done
  165. #
  166. # Do extra links for host argentum (for /u1).
  167. #
  168. for filesys in u1
  169. do
  170.    f1=/nfs/argentum/$filesys
  171.    f2=/argentum/$filesys
  172.    if [ "$clean" = "clean" ]; then
  173.       rm -f $f2 ; echo "$f2 removed."
  174.    fi
  175.    test -L $f2
  176.       if [ "$?" = 0 ]; then
  177.       echo "$f2 already is a link - do nothing."
  178.    else
  179.       rm -f $f2 ; echo "$f2 removed."
  180.       ln -s $f1 $f2
  181.       echo "$f2 linked to $f1."
  182.    fi
  183. done
  184. #
  185. # Do extra links for host gatto (for /usr).
  186. #
  187. for filesys in usr
  188. do
  189.    f1=/nfs/gatto/$filesys
  190.    f2=/gatto/$filesys
  191.    if [ "$clean" = "clean" ]; then
  192.       rm -f $f2 ; echo "$f2 removed."
  193.    fi
  194.    test -L $f2
  195.       if [ "$?" = 0 ]; then
  196.       echo "$f2 already is a link - do nothing."
  197.    else
  198.       rm -f $f2 ; echo "$f2 removed."
  199.       ln -s $f1 $f2
  200.       echo "$f2 linked to $f1."
  201.    fi
  202. done
  203. #
  204. # Do extra links for host alchemy (for /u1 and /news).
  205. #
  206. for filesys in u1 news
  207. do
  208.    f1=/nfs/alchemy/$filesys
  209.    f2=/alchemy/$filesys
  210.    if [ "$clean" = "clean" ]; then
  211.       rm -f $f2 ; echo "$f2 removed."
  212.    fi
  213.    test -L $f2
  214.       if [ "$?" = 0 ]; then
  215.       echo "$f2 already is a link - do nothing."
  216.    else
  217.       rm -f $f2 ; echo "$f2 removed."
  218.       ln -s $f1 $f2
  219.       echo "$f2 linked to $f1."
  220.    fi
  221. done
  222. #
  223. # Do extra links for host solaia (for /users).
  224. #
  225. for filesys in users
  226. do
  227.    f1=/nfs/solaia/$filesys
  228.    f2=/solaia/$filesys
  229.    if [ "$clean" = "clean" ]; then
  230.       rm -f $f2 ; echo "$f2 removed."
  231.    fi
  232.    test -L $f2
  233.       if [ "$?" = 0 ]; then
  234.       echo "$f2 already is a link - do nothing."
  235.    else
  236.       rm -f $f2 ; echo "$f2 removed."
  237.       ln -s $f1 $f2
  238.       echo "$f2 linked to $f1."
  239.    fi
  240. done
  241. #
  242. # Do extra links for host taurasi (for /u1).
  243. #
  244. for filesys in u1
  245. do
  246.    f1=/nfs/taurasi/$filesys
  247.    f2=/taurasi/$filesys
  248.    if [ "$clean" = "clean" ]; then
  249.       rm -f $f2 ; echo "$f2 removed."
  250.    fi
  251.    test -L $f2
  252.       if [ "$?" = 0 ]; then
  253.       echo "$f2 already is a link - do nothing."
  254.    else
  255.       rm -f $f2 ; echo "$f2 removed."
  256.       ln -s $f1 $f2
  257.       echo "$f2 linked to $f1."
  258.    fi
  259. done
  260. #
  261. # Do extra links for host tikva (for /u1 and /usr).
  262. #
  263. for filesys in u1 usr
  264. do
  265.    f1=/nfs/tikva/$filesys
  266.    f2=/tikva/$filesys
  267.    if [ "$clean" = "clean" ]; then
  268.       rm -f $f2 ; echo "$f2 removed."
  269.    fi
  270.    test -L $f2
  271.    if [ "$?" = 0 ]; then
  272.       echo "$f2 already is a link - do nothing."
  273.    else
  274.       rm -f $f2 ; echo "$f2 removed."
  275.       ln -s $f1 $f2
  276.       echo "$f2 linked to $f1."
  277.    fi
  278. done
  279. #
  280. # Create administrative files only if they don't exist:
  281. #    /usr/adm/imagen_acct/imagen
  282. #    /usr/spool/lpd/imagen/log
  283. #    /usr/adm/wtmp
  284. #
  285. if [ -f /usr/adm/imagen_acct/imagen ]; then
  286.    echo "/usr/adm/imagen_acct/imagen already exists - do nothing."
  287. else
  288.    if [ ! -d /usr/adm/imagen_acct ]; then
  289.       mkdir /usr/adm/imagen_acct
  290.       chmod 755 /usr/adm/imagen_acct
  291.       echo "/usr/adm/imagen_acct directory created."
  292.    fi
  293.    touch /usr/adm/imagen_acct/imagen
  294.    chmod 664 /usr/adm/imagen_acct/imagen
  295.    chown -R daemon.daemon /usr/adm/imagen_acct
  296.    echo "/usr/adm/imagen_acct/imagen created."
  297. fi
  298. if [ -f /usr/spool/lpd/imagen/log ]; then
  299.    echo "/usr/spool/lpd/imagen/log already exists - do nothing."
  300. else
  301.    if [ ! -d /usr/spool/lpd/imagen ]; then
  302.       mkdir /usr/spool/lpd/imagen
  303.       chmod 755 /usr/spool/lpd/imagen
  304.       echo "/usr/spool/lpd/imagen directory created."
  305.    fi
  306.    touch /usr/spool/lpd/imagen/log
  307.    chmod 664 /usr/spool/lpd/imagen/log
  308.    chown -R daemon.daemon /usr/spool/lpd/imagen
  309.    echo "/usr/spool/lpd/imagen/log created."
  310. fi
  311. if [ -f /usr/adm/wtmp ]; then
  312.    echo "/usr/adm/wtmp already exists - do nothing."
  313. else
  314.    touch /usr/adm/wtmp
  315.    chmod 666 /usr/adm/wtmp
  316.    echo "/usr/adm/wtmp created."
  317. fi
  318. #
  319. # Make links for man pages.
  320. # Link /usr/man/catl to /usr/local/man/catl on //plumbum, //todah,
  321. # //aurum and //flatland.
  322. # Link the man pages on //aqua to //plumbum/bsd4.3/usr/man and
  323. # //plumbum/bsd4.3/usr/apollo/man respectively.
  324. # Make links in /usr/local/man/catl to /usr/local/doc/*.out on //plumbum,
  325. # //todah, //aurum and //flatland.
  326. #
  327. if [ $host = plumbum -o $host = todah -o $host = aurum -o $host = flatland ]; then
  328.    if [ "$clean" = "clean" ]; then
  329.       rm -f /bsd4.3/usr/man/catl ; echo "/bsd4.3/usr/man/catl removed."
  330.    fi
  331.    if [ -d /bsd4.3/usr/man/catl ]; then
  332.       echo "/bsd4.3/usr/man/catl already exists - do nothing."
  333.    else
  334.       ln -s ../../../usr/local/man/catl /bsd4.3/usr/man/catl
  335.       echo "/bsd4.3/usr/man/catl linked to /usr/local/man/catl."
  336.    fi
  337.    cwd=`pwd`
  338.    cd /usr/local/doc
  339.    for i in *.out
  340.    do
  341.       ibase=`basename $i .out`
  342.       if [ "$clean" = "clean" ]; then
  343.          rm -f /usr/local/man/catl/$ibase.l
  344.          echo "/usr/local/man/catl/$ibase.l removed."
  345.       fi
  346.       if [ -f /bsd4.3/usr/man/catl/$ibase.l ]; then
  347.          echo "/bsd4.3/usr/man/catl/$ibase.l already exists - do nothing."
  348.       else
  349.          ln -s /usr/local/doc/$i /usr/local/man/catl/$ibase.l
  350.          echo "/usr/local/man/catl/$ibase.l linked to /usr/local/doc/$i."
  351.       fi
  352.    done
  353.    cd $cwd
  354. fi
  355. if [ $host = aqua ]; then
  356.    if [ "$clean" = "clean" ]; then
  357.       rm -f /bsd4.3/usr/man ; echo "/bsd4.3/usr/man removed."
  358.       rm -f /usr/apollo/man ; echo "/usr/apollo/man removed."
  359.    fi
  360.    if [ -d /bsd4.3/usr/man ]; then
  361.       echo "/bsd4.3/usr/man already exists - do nothing."
  362.    else
  363.       ln -s //plumbum/bsd4.3/usr/man /bsd4.3/usr/man
  364.       echo "/bsd4.3/usr/man linked to //plumbum/bsd4.3/usr/man."
  365.    fi
  366.    if [ -d /usr/apollo/man ]; then
  367.       echo "/usr/apollo/man already exists - do nothing."
  368.    else
  369.       ln -s //plumbum/usr/apollo/man /usr/apollo/man
  370.       echo "/usr/apollo/man linked to //plumbum/usr/apollo/man."
  371.    fi
  372. fi
  373. #
  374. # Make links for /usr/msgs on all nodes except //plumbum.
  375. # Link the msgs directory to //plumbum.
  376. # Make sure that /usr/msgs is a link to ../$(SYSTYPE)/usr/msgs.
  377. #
  378. if [ "$clean" = "clean" ]; then
  379.    rm -fr /usr/msgs ; echo "/usr/msgs removed."
  380.    rm -fr /bsd4.3/usr/msgs ; echo "/bsd4.3/usr/msgs removed."
  381. fi
  382. if [ -d /bsd4.3/usr/msgs ]; then
  383.    echo "/bsd4.3/usr/msgs already exists - do nothing."
  384. else
  385.    ln -s /alchemy/root/usr/msgs /bsd4.3/usr/msgs
  386.    echo "/bsd4.3/usr/msgs linked to /alchemy/root/usr/msgs."
  387. fi
  388. if [ -d /usr/msgs ]; then
  389.       echo "/usr/msgs already exists - do nothing."
  390. else
  391.    ln -s '../$(SYSTYPE)/usr/msgs' /usr/msgs
  392.    echo '/usr/msgs linked to ../$(SYSTYPE)/usr/msgs.'
  393. fi
  394. #
  395. # Make links between Apollo-supplied /usr/... and /usr/local/...
  396. # on all nodes.
  397. #
  398. if [ "$clean" = "clean" ]; then
  399.    rm -f /usr/lib/tmac/tmac.utchemdoc ; echo "/usr/lib/tmac/tmac.utchemdoc removed."
  400.    rm -f /usr/lib/tmac/tmac.*vcat ; echo "/usr/lib/tmac/tmac.*vcat removed."
  401. fi
  402. if [ -f /usr/lib/tmac/tmac.utchemdoc ]; then
  403.    echo "/usr/lib/tmac/tmac.utchemdoc already exists - do nothing."
  404. else
  405.    ln -s /usr/local/lib/tmac/tmac.utchemdoc /usr/lib/tmac/tmac.utchemdoc
  406.    echo "/usr/lib/tmac/tmac.utchemdoc (re)linked."
  407. fi
  408. if [ -f /usr/lib/tmac/tmac.psh_vcat ]; then
  409.    echo "/usr/lib/tmac/tmac.psh_vcat already exists - do nothing."
  410. else
  411.    ln -s /usr/local/lib/tmac/tmac.psh_vcat /usr/lib/tmac/tmac.psh_vcat
  412.    echo "/usr/lib/tmac/tmac.psh_vcat (re)linked."
  413. fi
  414. if [ -f /usr/lib/tmac/tmac.pst_vcat ]; then
  415.    echo "/usr/lib/tmac/tmac.pst_vcat already exists - do nothing."
  416. else
  417.    ln -s /usr/local/lib/tmac/tmac.pst_vcat /usr/lib/tmac/tmac.pst_vcat
  418.    echo "/usr/lib/tmac/tmac.pst_vcat (re)linked."
  419. fi
  420. if [ -f /usr/lib/tmac/tmac.vcat ]; then
  421.    echo "/usr/lib/tmac/tmac.vcat already exists - do nothing."
  422. else
  423.    ln -s /usr/local/lib/tmac/tmac.vcat /usr/lib/tmac/tmac.vcat
  424.    echo "/usr/lib/tmac/tmac.vcat (re)linked."
  425. fi
  426. #
  427. # Make links between /tftp/... and /usr/local/....
  428. # on //plumbum and //aurum only.
  429. #
  430. if [ $host = plumbum -o $host = aurum ]; then
  431.    if [ "$clean" = "clean" ]; then
  432.       rm -f /tftp/cisco.confg ; echo "/tftp/cisco.confg removed."
  433.       rm -f /tftp/ventus.confg ; echo "/tftp/ventus.confg removed."
  434.    fi
  435.    if [ -f /tftp/cisco.confg ]; then
  436.       echo "/tftp/cisco.confg already exists - do nothing."
  437.    else
  438.       ln -s ../usr/local/cisco.confg /tftp/cisco.confg
  439.       echo "/tftp/cisco.confg linked to ../usr/local/cisco.confg"
  440.    fi
  441.    if [ -f /tftp/ventus.confg ]; then
  442.       echo "/tftp/ventus.confg already exists - do nothing."
  443.    else
  444.       ln -s ../usr/local/ventus.confg /tftp/ventus.confg
  445.       echo "/tftp/ventus.confg linked to ../usr/local/ventus.confg"
  446.    fi
  447. fi
  448. #
  449. # Make link between /usr/spool/rwho and //plumbum/usr/spool/rwho
  450. # on //aqua.
  451. #
  452. if [ $host = aqua ]; then
  453.    if [ "$clean" = "clean" ]; then
  454.       rm -fr /usr/spool/rwho ; echo "/usr/spool/rwho removed."
  455.    fi
  456.    if [ -d /usr/spool/rwho ]; then
  457.       echo "/usr/spool/rwho already exists - do nothing."
  458.    else
  459.       ln -s //plumbum/usr/spool/rwho /usr/spool/rwho
  460.       echo "/usr/spool/rwho linked to //plumbum/usr/spool/rwho"
  461.    fi
  462. fi
  463. #
  464. # Make link between /usr/spool/mail and //plumbum/usr/spool/mail
  465. # on all nodes except //plumbum.
  466. #
  467. if [ $host != plumbum ]; then
  468.    if [ "$clean" = "clean" ]; then
  469.       rm -fr /usr/spool/mail ; echo "/usr/spool/mail removed."
  470.    fi
  471.    if [ -d /usr/spool/mail ]; then
  472.       echo "/usr/spool/mail already exists - do nothing."
  473.    else
  474.       ln -s //plumbum/usr/spool/mail /usr/spool/mail
  475.       echo "/usr/spool/mail linked to //plumbum/usr/spool/mail"
  476.    fi
  477. fi
  478. #
  479. # Make links for emacs between /usr/local/bin/emacs and 
  480. # /usr/local/src/gnuemacs/emacs on //plumbum.
  481. # Make links for emacs between /usr/local/bin/emacs and 
  482. # /usr/local/src/gnuemacs/emacs on //todah and //flatland,
  483. # plus make local copies of critical files.
  484. # Make links for emacs for /usr/local/bin/emacs and
  485. # /usr/local/src/gnuemacs/emacs to //plumbum/... on //aurum and //aqua.
  486. #
  487. if [ $host = plumbum ]; then
  488.    if [ "$clean" = "clean" ]; then
  489.       rm -f /usr/local/bin/emacs ; echo "/usr/local/bin/emacs removed."
  490.    fi
  491.    if [ -f /usr/local/bin/emacs ]; then
  492.       echo "/usr/local/bin/emacs already exists - do nothing."
  493.    else
  494.       ln -s /usr/local/src/gnuemacs/emacs /usr/local/bin/emacs
  495.       echo "/usr/local/bin/emacs linked to /usr/local/src/gnuemacs/emacs."
  496.    fi
  497. fi
  498. if [ $host = todah -o $host = flatland ]; then
  499.    d1=//plumbum/usr/local/src/gnuemacs
  500.    d2=/usr/local/src/gnuemacs
  501.    if [ "$clean" = "clean" ]; then
  502.       rm -fr /usr/local/src/gnuemacs ; echo "/usr/local/src/gnuemacs removed."
  503.       rm -f /usr/local/bin/emacs ; echo "/usr/local/bin/emacs removed."
  504.    fi
  505.    if [ ! -d /usr/local/src/gnuemacs ]; then
  506.       mkdir /usr/local/src/gnuemacs /usr/local/src/gnuemacs/etc
  507.       echo "Copy minimum set of emacs support routines:"
  508.       cp -ov $d1/{APOLLO.README,emacs} $d2
  509.       cp -ov $d1/etc/apollo.{elc,icons} $d2/etc
  510.       cp -ov $d1/etc/{env,etags,loadst,movemail,emacsclient,server} $d2/etc
  511.       cp -ov $d1/etc/{COPYING,DISTRIB,DOC-18.54.0,GNU,NEWS,TUTORIAL} $d2/etc
  512.    fi
  513.    if [ -f /usr/local/bin/emacs ]; then
  514.       echo "/usr/local/bin/emacs already exists - do nothing."
  515.    else
  516.       ln -s /usr/local/src/gnuemacs/emacs /usr/local/bin/emacs
  517.       echo "/usr/local/bin/emacs linked to /usr/local/src/gnuemacs/emacs."
  518.    fi
  519.    if [ -d /usr/local/src/gnuemacs/info ]; then
  520.       echo "/usr/local/src/gnuemacs/info already exists - do nothing."
  521.    else
  522.       ln -s //plumbum/usr/local/src/gnuemacs/info /usr/local/src/gnuemacs/info
  523.       echo "/usr/local/src/gnuemacs/info linked to //plumbum/usr/local/src/gnuemacs/info."
  524.    fi
  525.    if [ -d /usr/local/src/gnuemacs/lisp ]; then
  526.       echo "/usr/local/src/gnuemacs/lisp already exists - do nothing."
  527.    else
  528.       ln -s //plumbum/usr/local/src/gnuemacs/lisp /usr/local/src/gnuemacs/lisp
  529.       echo "/usr/local/src/gnuemacs/lisp linked to //plumbum/usr/local/src/gnuemacs/lisp."
  530.    fi
  531. fi
  532. if [ $host = aurum -o $host = aqua ]; then
  533.    if [ "$clean" = "clean" ]; then
  534.       rm -f /usr/local/bin/emacs ; echo "/usr/local/bin/emacs removed."
  535.       rm -f /usr/local/src/gnuemacs; echo "/usr/local/src/gnuemacs removed."
  536.    fi
  537.    if [ -f /usr/local/bin/emacs ]; then
  538.       echo "/usr/local/bin/emacs already exists - do nothing."
  539.    else
  540.       ln -s //plumbum/usr/local/src/gnuemacs/emacs /usr/local/bin/emacs
  541.       echo "/usr/local/bin/emacs linked to //plumbum/usr/local/src/gnuemacs/emacs."
  542.    fi
  543.    if [ -d /usr/local/src/gnuemacs ]; then
  544.       echo "/usr/local/src/gnuemacs already exists - do nothing."
  545.    else
  546.       ln -s //plumbum/usr/local/src/gnuemacs /usr/local/src/gnuemacs
  547.       echo "/usr/local/src/gnuemacs linked to //plumbum/usr/local/src/gnuemacs."
  548.    fi
  549. fi
  550. #
  551. # Make links for mg between /usr/local/bin/mg and 
  552. # //plumbum/usr/local/bin/mg on //aqua.
  553. #
  554. if [ $host = todah -o $host = aurum -o $host = flatland ]; then
  555.    f1=//plumbum/usr/local/bin/mg
  556.    f2=/usr/local/bin/mg
  557.    if [ "$clean" = "clean" ]; then
  558.       rm -f $f2 ; echo "$f2 removed."
  559.    fi
  560.    if [ -f $f2 ]; then
  561.       echo "$f2 already exists - do nothing."
  562.    else
  563.       cp -o $f1 $f2
  564.       echo "$f1 copied to $f2."
  565.    fi
  566. fi
  567. if [ $host = aqua ]; then
  568.    f1=//plumbum/usr/local/bin/mg
  569.    f2=/usr/local/bin/mg
  570.    if [ "$clean" = "clean" ]; then
  571.       rm -f $f2 ; echo "$f2 removed."
  572.    fi
  573.    if [ -f $f2 ]; then
  574.       echo "$f2 already exists - do nothing."
  575.    else
  576.       ln -s $f1 $f2
  577.       echo "$f2 linked to $f1."
  578.    fi
  579. fi
  580. #
  581. # Make links for /sys/ins to //plumbum/sys/ins on all other systems.
  582. #
  583. if [ $host != plumbum ]; then
  584.    d1=//plumbum/sys/ins
  585.    d2=/sys/ins
  586.    if [ "$clean" = "clean" ]; then
  587.       rm -f $d2 ; echo "$d2 removed."
  588.    fi
  589.    if [ -d $d2 ]; then
  590.       echo "$d2 already exists - do nothing."
  591.    else
  592.       ln -s $d1 $d2
  593.       echo "$d2 linked to $d1."
  594.    fi
  595. fi
  596. #
  597. # Make links for /usr/X11/lib to /usr/local on all systems.
  598. #
  599. f1=/usr/local/Master.uwmrc
  600. f2=/usr/X11/lib/uwm/system.uwmrc
  601. if [ "$clean" = "clean" ]; then
  602.    rm -f $f2 ; echo "$f2 removed."
  603. fi
  604. test -L $f2
  605. if [ "$?" = 0 ]; then
  606.    echo "$f2 already is a link - do nothing."
  607. else
  608.    rm -f $f2 ; echo "$f2 removed."
  609.    ln -s $f1 $f2
  610.    echo "$f2 linked to $f1."
  611. fi
  612. #
  613. # Make links for /usr/X11/include/bitmaps/*.xbm to ~system/xbm on all systems.
  614. #
  615. if [ -d ~system/xbm ]; then
  616.    f1=~system/xbm
  617.    f2=/usr/X11/include/bitmaps
  618.    cwd=`pwd`
  619.    cd $f1
  620.    for i in *.xbm
  621.    do
  622.       if [ "$clean" = "clean" ]; then
  623.          rm -f $f2/$i
  624.          echo "$f2/$i removed."
  625.       fi
  626.       if [ -f $f2/$i ]; then
  627.          echo "$f2/$i already exists - do nothing."
  628.       else
  629.          ln -s $f1/$i $f2/$i
  630.          echo "$f2/$i linked to $f1/$i."
  631.       fi
  632.    done
  633.    cd $cwd
  634. fi
  635. #
  636. # Make /usr/spool/news directory structure on all systems.
  637. # On all nodes it is a link to /$masternews/news.
  638. #
  639. f1=/$masternews/news
  640. f2=/usr/spool/news
  641. if [ "$clean" = "clean" ]; then
  642.    if [ -f $f2 ]; then
  643.       rm -f $f2 ; echo "File $f2 removed."
  644.    else
  645.       rmdir $f2 ; echo "Directory $f2 removed."
  646.    fi
  647. fi
  648. test -L $f2
  649. if [ "$?" = 0 ]; then
  650.    echo "$f2 already is a link - do nothing."
  651. else
  652.    if [ -f $f2 ]; then
  653.       rm -f $f2 ; echo "File $f2 removed."
  654.    else
  655.       rmdir $f2 ; echo "Directory $f2 removed."
  656.    fi
  657.    ln -s $f1 $f2
  658.    echo "$f2 linked to $f1."
  659. fi
  660. #
  661. # Make link between /g88 and //plumbum/u0/mgauss/g88 on //plumbum only.
  662. # Create the Gaussian88 scratch directory (/tmp/g88scratch)
  663. # if it doesn't already exist.
  664. #
  665. if [ $host = plumbum ]; then
  666.    if [ "$clean" = "clean" ]; then
  667.       rm -f /g88 ; echo "/g88 removed."
  668.       rm -r /tmp/g88scratch ; echo "/tmp/g88scratch removed."
  669.    fi
  670.    if [ -d /g88 ]; then
  671.       echo "/g88 already exists - do nothing."
  672.    else
  673.       ln -s //plumbum/u0/mgauss/g88 /g88
  674.       echo "/g88 linked to //plumbum/u0/mgauss/g88."
  675.    fi
  676.    if [ -d /tmp/g88scratch ]; then
  677.       echo "/tmp/g88scratch already exists - do nothing."
  678.    else
  679.       mkdir /tmp/g88scratch
  680.       chmod 777 /tmp/g88scratch
  681.       chacl -df ug=PU,z=PI,o=U /tmp/g88scratch
  682.       echo "/tmp/g88scratch re-created."
  683.    fi
  684. fi
  685. #
  686. # Make link between /usr/games/tetris_scores and /usr/local/lib/tetris_scores,
  687. # except on plumbum.
  688. #
  689. if [ $host != plumbum ]; then
  690.    if [ "$clean" = "clean" ]; then
  691.       rm -f /usr/games/tetris_scores ; echo "/usr/games/tetris_scores removed."
  692.    fi
  693.    if [ -f /usr/games/tetris_scores ]; then
  694.       echo "/usr/games/tetris_scores already exists - do nothing."
  695.    else
  696.       ln -s /usr/local/lib/tetris_scores /usr/games/tetris_scores
  697.       echo "/usr/games/tetris_scores linked to /usr/local/lib/tetris_scores."
  698.    fi
  699. fi
  700. #
  701. # Make /etc/tftpd setuid user.none.
  702. #
  703. if [ -f /etc/tftpd ]; then
  704.    echo "Making /etc/tftpd setuid user.none."
  705.    /etc/chown user.none /etc/tftpd
  706.    /bin/chmod 4755 /etc/tftpd
  707. fi
  708. #
  709. # Replace /bin/sh with /bin/ksh.
  710. #
  711. diff /bin/sh /bin/ksh >/dev/null 2>&1
  712. if [ "$?" = "0" ]; then
  713.    echo "/bin/sh and /bin/ksh already identical - do nothing."
  714. else
  715.    echo "/bin/sh and /bin/ksh are different - replacing /bin/sh."
  716.    rm -f /bin/sh
  717.    cp -p /bin/ksh /bin/sh
  718. fi
  719. #
  720. # Disable /usr/ucb/compress since it doesn't work over NFS.
  721. #
  722. for f in /usr/ucb/compress
  723. do
  724.    if [ -f $f ]; then
  725.       mv $f $f.bad
  726.       echo "$f disabled."
  727.    else
  728.       echo "$f already disabled - do nothing."
  729.    fi
  730. done
  731. #
  732. exit 0
  733. -- 
  734. What are the chances that any computer system will ever "work" properly?
  735. ... and Slim just left town. -*- Mike Peterson, SysAdmin, U/Toronto Chemistry
  736.