: /bin/sh # dopak: see usage bellow #/* #************************************************************************* #** * #** Copyright (C) 1997 Trans-Mit Pty. Ltd. Melbourne Australia * #** This software may not be loaned, resold, changed or copied * #** in any way without the express written permission of author * #** and Trans-Mit Pty. Ltd., Australia. * #** * #************************************************************************* #** #** $Header: /u/catcom/AccTraf/src/pcclu/RCS/dopak,v 1.3 2004/06/16 03:56:42 catcom Exp $ #** $Author: catcom $ #** $Date: 2004/06/16 03:56:42 $ #** $Locker: $ #** #************************************************************************* #*/ umask 002 PATH=$PATH:/u/catcom/bin export PATH # so packer logs localtime file="/etc/TIMEZONE" if test -f $file; then . $file fi # make this the work dir cd /u/catcom/clp set -- `getopt i:p:o:l: $*` if [ $? != 0 ] then echo "usage: $0 -i -p -o -l " exit 2 fi for i in $* do case $i in -i) inport=$2; shift; shift;; -p) packer=$2; shift; shift;; -o) outdir=$2; shift; shift;; -l) logfile=$2; shift; shift;; --) shift; break;; esac done exec 1>>$logfile 2>&1 echo "dopak: Starting: $packer" echo "dopak: Input: $inport" echo "dopak: Output: $outdir" date "+dopak: Date: %c" chown catcom $inport chgrp catcom $inport chmod 664 $inport stty 9600 raw cs8 -cstopb -parenb clocal cread -isig -icanon -echo \ -ignpar -inlcr -igncr -icrnl -ixon -crtscts -brkint ignbrk <$inport stty -a <$inport | \ while read aline do echo "dopak: $aline" done exec su catcom -c "/u/catcom/bin/$packer -r -M -i $inport -o $outdir" 2>>$logfile 1>&2 #/* #** $Log: dopak,v $ #** Revision 1.3 2004/06/16 03:56:42 catcom #** NCR818 - pcclu for slackware 9.1 (kernel 2.4.22) #** - incl. raw data logging and archiving (re: BOM) #** # Revision 1.2 97/12/23 11:36:38 catcom # added line markers for error log # # Revision 1.1 97/05/27 14:00:42 catcom # Initial revision # #** $Revision: 1.3 $ #** $Source: /u/catcom/AccTraf/src/pcclu/RCS/dopak,v $ #** $State: Exp $ #*/