| mar95.tar |
Listing 3: install_lpd, replacing the System V spooler system with the SunOS 4.1.2 BSD spooler under Solaris 2.3
#!/bin/sh # # Example 3 (install_lpd), John Lees # # Under Solaris 2.3 replace the System V spooler # system with the SunOS 4.1.2 BSD spooler system. # #--- Make the spool directories. # Yours will of course have different names. You # also need an appropriate /etc/printcap file with # entries for these printers. # cd /usr/spool for DIR in "lw1 lw2 lw3 tekPXi" do mkdir $DIR chmod 775 $DIR chown daemon $DIR chgrp daemon $DIR done # #--- Disable the System V spooler stuff. # You need do this only if you installed the # spooler when you installed Solaris. lpshut /usr/sbin/pmadm -r -p tcp -s lp /usr/sbin/pmadm -r -p tcp -s lpd chmod 0 /usr/bin/cancel chmod 0 /usr/bin/lp chmod 0 /usr/bin/lpstat chmod 0 /usr/ucb/lpc chmod 0 /usr/ucb/lpr chmod 0 /usr/ucb/lprm chmod 0 /usr/ucb/lptest chmod 0 /usr/ucb/lpq mv /etc/rc0.d/K20lp /etc/rc0.d/__K20lp mv /etc/rc2.d/K20lp /etc/rc2.d/__K20lp mv /etc/rc2.d/S80lp /etc/rc2.d/__S80lp # #--- Install the BSD stuff. # /opt/lib/lpd is a path to the package where the BSD # spooler stuff is installed. See my article in the # July/August 1994 Sys Admin about our method of sharing # local software using the "setup" perl script. cp /opt/lib/lpd/S80lpd /etc/rc2.d/S80lpd cp /opt/lib/lpd/S80lpd /etc/rc2.d/K20lpd chmod 755 /etc/rc2.d/S80lpd /etc/rc2.d/K20lpd /bin/rm -f /dev/printer mkdir /dev/lpd chmod 710 /dev/lpd chgrp daemon /dev/lpd chmod g+s /dev/lpd ln -s /dev/lpd/printer /dev/printer # #--- Start it up. /etc/rc2.d/S80lpd start # exit
|