#!/usr/bin/sh # (c) Copyright 1993,1994 Hewlett-Packard Company. All Rights Reserved. #@(#) $Header: /users/hpnp/odyssey/repository/sh/net_lj3x.psh,v 1.13 1999/10/12 09:28:42 hpnp Exp $ #---------------------------------------------------------------------- # USER CAUTION: If any changes are desired, you should first make a copy # of this model under a new name. Changes can then be made to the copy #---------------------------------------------------------------------- log=/var/adm/lp/log BANNER="yes" # CHANGE BANNER PAGE PRINTING TMP=/var/tmp # [ Modify by the Amit R. to solve the problem of security on 20th Feb. 1998 HPNP=/opt/hpnp # [ Modified by Suresha on 26th Sep 99 to support JPIU HPNP=/opt/hpnpl ID=/usr/bin/id CUT=/usr/bin/cut AWK=/usr/bin/awk MKDIR=/usr/bin/mkdir USERNAME=`$ID | $CUT -f1 -d" " | $CUT -f2 -d"(" | $CUT -f1 -d")"` # get user name if [ $USERNAME = "root" -o $USERNAME = "lp" ] then TMP=$HPNP/tmp else /usr/bin/sun > /dev/null 2>&1 if [ $? -eq 0 ] then # [ Modified by Amit Raval to fix the defect#57434 on 20th Apr. 1999 # HOME=`$AWK 'BEGIN { FS=":" } # {if ( $1 == UNAME) print $6 ; }' UNAME=$USERNAME /etc/passwd` # get home dir. from /etc/passwd JAHOME=`$AWK 'BEGIN { FS=":" } {if ( $1 == UNAME) { print $6 ; exit } }' UNAME=$USERNAME /etc/passwd` # get home dir. from /etc/passwd # ] else # [ Modified by Amit Raval to fix the defect#57434 on 20th Apr. 1999 # HOME=`$AWK -v UNAME=$USERNAME 'BEGIN { FS=":" } # {if ( $1 == UNAME) print $6 ; }' /etc/passwd` # get home dir. from /etc/passwd JAHOME=`$AWK -v UNAME=$USERNAME 'BEGIN { FS=":" } {if ( $1 == UNAME) { print $6 ; exit } }' /etc/passwd` # get home dir. from /etc/passwd # ] fi if [ -z "$JAHOME" ] # Handle the NIS issue then JAHOME=$HOME # Assign the env veriable HOME if JAHOME is null. fi # [Modified by Kumaresan for JPIU on 26th Sept '99. if [ ! -d $JAHOME/.jpiu ] then $MKDIR $JAHOME/.jpiu > /dev/null 2>&1 if [ $? -eq 0 ] then TMP=$JAHOME/.jpiu fi else TMP=$JAHOME/.jpiu fi fi # ] # --------- Definitions of functions used within this script ------------ # print the option listing with -ooptions while submitting a job all_options() { # map lf->cr+lf; bold echo "\033&k2G\033(s3B\t\t\033&d0D\c" echo "Available Options for Model Script net_lj3x\n" echo "\033&d@SYNOPSIS:\033(s0B\c" echo "\tlp -o