#!/usr/local/bin/tops -p -s /usr/local/tops/sys -u /opt/mytops/usr/
#!../src/tops -s ../sys -u ../usr

{ File tops_rootmount

  September 2011

  Copyright (c) 2011   D. R. Williamson

  For non-root to run this script, link it as follows:

     > cd /opt/mytops/usr
     > ln -sf tops_rootmount rootrun_script

  and run the program compiled from rootrun.c: 

     > /opt/mytops/usr/rootrun
}
\-----------------------------------------------------------------------

\  Mount NFS file systems on diego and plunger.

   getuid 0= not IF " tops_rootmount: must be root" . nl exit THEN

   " -o rw,hard,intr,rsize=8192,wsize=8192" "options" book

   host "diego" = 
   IF plunger PING \ server plunger, client diego is this host
      IF "mount -t nfs SERVER:/nfs/diego /mnt/nfs/plunger" options +
         "SERVER" plunger strp (qS) shell 
      ELSE " tops_rootmount: diego cannot ping plunger" . nl
      THEN
   THEN

   host "plunger" = 
   IF diego PING \ server diego, client plunger is this host
      IF "mount -t nfs SERVER:/nfs/plunger /mnt/nfs/diego" options +
         "SERVER" diego strp (qS) shell 
      ELSE " tops_rootmount: plunger cannot ping diego" . nl
      THEN
   THEN




