]> arthur.barton.de Git - netatalk.git/blobdiff - contrib/printing/add_netatalk_printer
Remove bdb env on exit
[netatalk.git] / contrib / printing / add_netatalk_printer
index 67f7e2d508cda705e7ec2d2c5468dd58b3cadbe3..40de1741f45f77b994fd61babe5ff29a4e86e9d4 100644 (file)
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# $Id: add_netatalk_printer,v 1.4 2001-07-27 17:28:03 srittau Exp $
+# $Id: add_netatalk_printer,v 1.7 2003-02-23 03:16:34 srittau Exp $
 #
 # A lovely script to add netatalk printers 
 #
@@ -46,14 +46,14 @@ fi
 NETATALKHOME=${NETATALKHOME:-$RUNHOME}
 export NETATALKHOME
 
-PATH=/bin:${PATH}:${NETATALKHOME}/bin:${NETATALKHOME}/etc:${NETATALKHOME}/etc/filters:/usr/lib:/usr/sbin
+PATH=/bin:${PATH}:${NETATALKHOME}/bin:${NETATALKHOME}/etc:${NETATALKHOME}/libexec:/usr/lib:/usr/sbin
 
 if [ ! -x ${NETATALKHOME}/bin/pap ]; then
-       echo "OPPS:     I don't see ${NETATALKHOME}/bin/pap ,"
+       echo "OOPS:     I don't see ${NETATALKHOME}/bin/pap ,"
        echo '  Check that it is executable or set ${NETATALKHOME}'
        echo '  so i can find pap at ${NETATALKHOME}/bin/pap'
        echo '[We are guessing the location of the binary from the'
-       echo 'path that was used to run this sctipt or $NETATALKHOME]'
+       echo 'path that was used to run this script or $NETATALKHOME]'
        exit 1
 fi
 
@@ -66,7 +66,7 @@ read ZONE
 
 echo ""
 echo "Looking for LaserWriters in Zone ${ZONE} ..."
-$NETATALKHOME/bin/nbplkup ":LaserWriter@${ZONE}"
+${NETATALKHOME}/bin/nbplkup ":LaserWriter@${ZONE}"
 
 echo ""
 echo "Enter AppleTalk printer name: \c"
@@ -74,13 +74,13 @@ echo "Enter AppleTalk printer name: \c"
 read DEST
 
 if [ "$DEST" = "" ]; then
-       echo "OPPS: you need to tell me a printer name"
+       echo "OOPS: you need to tell me a printer name"
        exit 1
 fi
 
 echo "checking nbplkup ${DEST}:LaserWriter@${ZONE}"
 echo ""
-TestDEST=`$NETATALKHOME/bin/nbplkup "${DEST}:LaserWriter@${ZONE}"`
+TestDEST=`${NETATALKHOME}/bin/nbplkup "${DEST}:LaserWriter@${ZONE}"`
 echo "${TestDEST}"
 echo ""
 
@@ -129,12 +129,12 @@ if [ "${UNIXPRINT1}" = "" ]; then
        UNIXPRINT1="${UNIXPRINT}"
 else
 #if [ "${UNIXPRINT1}" != "${UNIXPRINT}" ]; then
-    echo "Opps, that name was too long...  Truncating to 14 chars."
+    echo "Oops, that name was too long...  Truncating to 14 chars."
     echo "setting printer name to '${UNIXPRINT}'"
     UNIXPRINT="${UNIXPRINT1}"
 fi
 
-echo "Enter a Description for this printer.  [The Appletalk name will"
+echo "Enter a description for this printer.  [The Appletalk name will"
 echo "be included by default, and must be included for the printing"
 echo "filters to work.] : \c"
 read DESC
@@ -142,7 +142,7 @@ read DESC
 DESC="${DESC} [${NBPNAME}]"
 
 echo ""
-echo "Do you want all printjobs to print out in reversed page order?"
+echo "Do you want all print jobs to print out in reversed page order?"
 echo "This is usually only desired if this printer stacks jobs"
 echo "face up in the output bin. [N/y] \c"
 read REV
@@ -153,7 +153,7 @@ export REV
 
 if lpstat -p ${UNIXPRINT} >/dev/null 2>&1 ; then
        echo '\a'
-       echo "OPPS:     There already exists a printer named '${UNIXPRINT}'"
+       echo "OOPS:     There already exists a printer named '${UNIXPRINT}'"
        echo "          here are the comments from /etc/lp/printers/${UNIXPRINT}/comment"
        cat /etc/lp/printers/${UNIXPRINT}/comment
        echo ""
@@ -176,7 +176,7 @@ fi
 
 if [ "`uname -r`" -lt "5.6" ]; then
     echo ""
-    echo "Do you want to share this printer w/ other machines [Y/n]?\c"
+    echo "Do you want to share this printer with other machines [Y/n]?\c"
     read SHARE
 else
     echo "You're running SunOS 5.6 or higher... skipping 'sacadm' and 'pmadm'"
@@ -184,7 +184,7 @@ fi
 
 if nistest printers.org_dir; then
     echo "Do you want to add this printer to your NIS printer map? [y/N]"
-    echo "(You will need to share this printer w/ other machines)"
+    echo "(You will need to share this printer with other machines)"
     read NIS
     case ${NIS} in     [Yy]*)    ADD_NIS=1 ;;
                            *)              ;;
@@ -237,7 +237,7 @@ Output types: PS
 Printer types: Netatalk
 Printers: any
 Filter type: fast
-Command: ${NETATALKHOME}/etc/filters/ifpap 2>&1 > /dev/null
+Command: ${NETATALKHOME}/libexec/ifpap 2>&1 > /dev/null
 EOF
        chown lp:lp /etc/lp/fd/netatalk.fd
        chmod 664   /etc/lp/fd/netatalk.fd
@@ -257,7 +257,7 @@ Output types: PS
 Printer types: Netatalk-R
 Printers: any
 Filter type: fast
-Command: "/usr/lib/lp/postscript/postreverse | ${NETATALKHOME}/etc/filters/ifpap 2>&1 >/dev/null"
+Command: "/usr/lib/lp/postscript/postreverse | ${NETATALKHOME}/libexec/ifpap 2>&1 >/dev/null"
 EOF
        chown lp:lp /etc/lp/fd/netatalk-r.fd
        chmod 664   /etc/lp/fd/netatalk-r.fd