ITEM: BE9741L

Queue with custom backend works locally but not remotely


ENV:
        AIX 3.2.5
        SUN system
DESC:
        I have a queue on my AIX machine which has a custom
        backend program.  This backend is a Bourne shell script
        that prepends and appends files to the job and then
        requeues the job to another queue.  This queue works fine
        when used locally, but when I print to it remotely from
        a client machine such as my Sun system - the jobs do not
        print.
ACT:
        In your /etc/qconfig you have:

        myqueue:
                device = myqueued
        myqueued:
                file = FALSE
                backend = /my/path/mybackend arg1 arg2

        Your shell script is:

        \#!/bin/sh
        ARG1=$1
        ARG2=$2
        shift 2
        cat /tmp/prepend_data $1 /tmp/append_data |enq -Panotherqueue

        Asked you to change this script to read:

        \#!/bin/sh
        echo $* > /tmp/flags
        ARG1=$1
        ARG2=$2
        shift 2
        cat /tmp/prepend_data $1 /tmp/append_data |enq -Panotherqueue

        When you send this job locally the file /tmp/flags contains:

        arg1 arg2 /your/file

        When you print to this queue remotely from the Sun client,
        an extra flag is sent across.  The /tmp/flags file looks
        like:

        arg1 arg2 -hsunhostname /var/spool/lpd/sometempfile

        If you change your script to shift3 it will work from remote
        systems.  To be more robust, you could always use the last
        command line argument as the filename since the last argument
        will always be the filename.
NEXT:
        CWCA


Response:

Closing with Customer Approval


Support Line: Queue with custom backend works locally but not remotely ITEM: BE9741L
Dated: February 1996 Category: N/A
This HTML file was generated 99/06/24~13:30:22
Comments or suggestions? Contact us