home *** CD-ROM | disk | FTP | other *** search
/ Ultra Pack / UltraComputing Partner Applications.iso / Faximum / FAXclient / lp / model
Encoding:
Text File  |  1994-11-16  |  3.0 KB  |  86 lines

  1. #
  2. #  Line printer intercept for SunFax 
  3. #
  4. #  SCCS: model  1.2  94/10/31
  5. #
  6. # ****************************************************************************
  7. # *                                                                          *
  8. # *                                                                          *
  9. # *                   Copyright Faximum Software Inc. 1994                   *
  10. # *                                                                          *
  11. # *       All Rights Reserved. An unpublished and CONFIDENTIAL work.         *
  12. # *     Reproduction, adaptation, or translation without prior written       *
  13. # *   permission is prohibited except as allowed under the copyright laws.   *
  14. # *                                                                          *
  15. # *                                                                          *
  16. # *                        RESTRICTED RIGHTS LEGEND                          *
  17. # *                                                                          *
  18. # *   Use, duplication, or disclosure by the U.S. Government is subject to   *
  19. # *   restrictions as set forth in subparagraph (c) (1) (ii) of the Rights   *
  20. # *   in Technical Data and Computer Software clause in DFARS 252.227-7013.  *
  21. # *   Rights for non-DOD U.S. Government Departments and Agencies are as set *
  22. # *   forth in FAR 52.227-19(c) (1,2).                                       *
  23. # *                                                                          *
  24. # *                          Faximum Software Inc.                           *
  25. # *                      1497 Marine Drive, Suite 300                        *
  26. # *                   West Vancouver, BC, Canada, V7T 1B8                    *
  27. # *                                                                          *
  28. # ****************************************************************************
  29. #
  30. trap "rm -rf /tmp/fxm.$$*" 1 2 15
  31. FAXHOME=`pkginfo -r FAXclient`
  32.  
  33. #
  34. #  These are the default parameters for style, account, and class.
  35. #  Change as appropriate
  36. #
  37.  
  38. STYLE="No Cover Sheet (Fine)"
  39. ACCOUNT="Default"
  40. CLASS="Default"
  41.  
  42. #
  43. #  The following ought to point to the name of the system which is
  44. #  running the fax server.  On SunFax installations, this is the localhost,
  45. #  on fully networked client/server installations this is usually the
  46. #  alias faxhost although any valid hostname may be used.
  47.  
  48. FAXHOST=localhost
  49. export FAXHOST
  50.  
  51. #
  52. #  A place to put things...
  53. #
  54. TF=/tmp/fxm.$$
  55.  
  56. #
  57. #  Check that the fax number has been provided in a -o option of the form
  58. #  "fax=112344556" and extract the number itself...
  59. #
  60.  
  61. num=`expr "$5" : "fax=\(.*\)"`
  62. if [ -z "$num" ]
  63. then
  64.     echo "Invalid fax number option specified. ($5)" 1>&2
  65.     echo 'Usage: lp -d fax -o "fax=1 234 567"' 1>&2
  66.     exit 1
  67. fi
  68.  
  69. #
  70. #  Put all of the parameters into our temp file...
  71. #
  72.  
  73. cat >> ${TF}.c <<- EOF
  74.     dest_fax1 = "$num"
  75.     class = "$CLASS"
  76.     style = "$STYLE"
  77.     account = "$ACCOUNT"
  78.     file_name1 = $6
  79. EOF
  80.  
  81. #
  82. #  And send the command file off to submitfax...
  83. #
  84. ${FAXHOME}/FAXclient/lib/submitfax ${TF}.c 1>&2
  85. rm -f ${TF}.c
  86.