Hello everyone, it's the first time I post here and I'm not subscriber to the list ... so if you answer, please CC me !

I join a script for pdq to handle netware printers. I took it from debian distribution and I tested it on Mandrake 9.0 and 9.1 : it works if you put it in the interfaces directory of pdq (I don't remember where it is on Mandrake linux). As we need this configuration script and that most of the users here have Mandrake Linux, I hope you'll include this in your next versions of the packages.

Thanks !

--
Pierre Barbier de Reuille

INRA - UMR Cirad/Inra/Cnrs/Univ.MontpellierII AMAP
Botanique et Bio-informatique de l'Architecture des Plantes
TA40/PSII, Boulevard de la Lironde
34398 MONTPELLIER CEDEX 5, France

tel : (33) 4 67 61 65 77 fax : (33) 4 67 61 56 68

interface ncp {

   help "Use this interface to print to queues on NetWare servers using NCP
         (the NetWare Core Protocol).
         For this to work, the user must have the right to print on this
         printer using the nprint command.  You may need to create a
         ~/.nwclient file; see the nprint man page for more information."

   required_args "PRINT_QUEUE NWCLIENT_DIR"

   argument {
      var = "NWCLIENT_DIR"
      def_value = "/home/$USER"
      desc = "Directory of .nwclient file"
      help = "Enter the directory path of the .nwclient file.
              Environment variables may be used, as in '/home/$USER'.
              See the nprint man page for more information about the
              .nwclient file."
   }

   argument {
      var = "SERVER"
      desc = "NetWare server name"
      help = "Enter the name of the NetWare server with the queue.
              You can leave this blank if the queue name is in NDS."
   }

   argument { 
      var = "PRINT_QUEUE"
      desc = "Print queue name"
      help = "Enter the name of the NetWare print queue."
   }

   requires "nprint"  # From the ncpfs package

   send_exec {
      # "eval" in the next line deferences env. variables names in the arg
      NWCLIENT_DIR=`eval echo $NWCLIENT_DIR`
      FLNM=${FILENAME//*\/}   # filename without path
      FLNM=${FLNM:0:12}  # truncate to twelve characters
      HOME=$NWCLIENT_DIR nprint ${SERVER:+-S $SERVER }-q $PRINT_QUEUE \
         ${FILENAME:+-d $FILENAME }${FLNM:+-f $FLNM }-p $NWCLIENT_DIR $INPUT
   }

#   status_exec { }

#   cancel_exec { }
 
}

Reply via email to