SUMMARY: Printer setup with JumpStart

From: Andrew Watkins (andrew@dcs.bbk.ac.uk)
Date: Wed Jul 19 1995 - 09:22:11 CDT


----------
X-Sun-Data-Type: text
X-Sun-Data-Description: text
X-Sun-Data-Name: text
X-Sun-Charset: us-ascii
X-Sun-Content-Lines: 51

Thanks for all the replies:

I wrote:
>
> I have not cracked the timezone problem yet, but I will have
> another bash at that today.
>
> Question: What I am after is any good ways of setting up the
> printers on the new machine. At the moment the only way I can see
> is to modify the "/etc/lp/*" files manually.
>
> This should work but it a shame you can't use the correct lp commands.

Well the answer is to place a script in /etc/init.d which
is executed first time the New Machine is booted:

1) Make sure JumpStart puts a script in right location:
                /a/etc/init.d/buildprinters
2) link this in /a/etc/rc2.d/S99buildprinters

What then happens is this file is executed the first time the machine
is booted and then it deletes itself.

I have inclosed the following scripts:
i) printer install
ii) patch install

Thanks to the following:
David Lee <T.D.Lee@durham.ac.uk>
leclerc@austin.asc.slb.com
Michael.Bennett@mail.esrin.esa.it
aclarke@mpc-uk.com (Anthony Clarke)
checkedg@eee.bham.ac.uk (Dr. Dave Checketts)
root@wisdom.maf.nasa.gov (Mark Hargrave)
cbabcock@rsa.hisd.harris.com (Cary Babcock)
Al.Venz@seag.fingerhut.com (Al Venz)

Cheers

Andrew

PS.
I solved the timezone problem:
Setup NIS 4.1.3 Server
#cat > /etc/timezone
GB <nis-domain>
^D

# make -n timezone
----------
X-Sun-Data-Type: text
X-Sun-Data-Name: S99patches
X-Sun-Charset: us-ascii
X-Sun-Content-Lines: 35

#!/bin/sh
###################################################################
# Program : S99patches
# Version : 1.0 Dated 3/23/95
# Purpose : install patches on client machines
# Author : Al Venz - Euler Solutions
#################################################################
PATH=/usr/bin:/usr/sbin:/etc
OS=`uname -r`

#################################################################
# Figure out which server to mount
#################################################################
PATCHSERVER="IP_OF_JUMPSTART_SERVER"

#################################################################
# Mount the patch server
#################################################################
mkdir -p /patch
mount $PATCHSERVER:/export1/patch /patch

#################################################################
# Run the installpatch program
#################################################################
/patch/install_patch

#################################################################
# Remove myself
#################################################################
rm $0

#################################################################
# Reboot with "-r" option for good measure
#################################################################
reboot -- -r
----------
X-Sun-Data-Type: default
X-Sun-Data-Name: buildprinters
X-Sun-Charset: us-ascii
X-Sun-Content-Lines: 54

#!/bin/sh

case "$1" in

'start')

        #
        # add all the commands to create the printers
        #
        #
        #
         lpsystem -t bsd <server>
         lpadmin -p <printer> -s <server>!<printer>
         lpadmin -p <printer> -T unknown -I any
         accept <printer>
         enable <printer>
        #
         cd /etc/lp/fd
         lpfilter -f download -F download.fd
         lpfilter -f dpost -F dpost.fd
         lpfilter -f postdaisy -F postdaisy.fd
         lpfilter -f postdmd -F postdmd.fd
         lpfilter -f postio -F postio.fd
         lpfilter -f postior -F postior.fd
         lpfilter -f postmd -F postmd.fd
         lpfilter -f postpages -F postpages.fd
         lpfilter -f postplot -F postplot.fd
         lpfilter -f postprint -F postprint.fd
         lpfilter -f postreverse -F postreverse.fd
         lpfilter -f posttek -F posttek.fd
         lpfilter -f pr -F pr.fd
        # start the printers
        /etc/init.d/lp start

        # this script is meant to be executed once for configuring the printers
        # remove the startup link after the first execution
        rm -f /etc/rc2.d/S99buildprinters
        ;;

'stop')
        #
        # add all the commands to stop the printers
        #
        #
         lpadmin -x <printer>
        ;;
*)
        echo "Usage: /etc/init.d/buildprinters.default { start | stop }"
        ;;
esac



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:29 CDT