home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume37 / ixobeepr / part02 < prev    next >
Encoding:
Text File  |  1993-05-17  |  22.6 KB  |  675 lines

  1. Newsgroups: comp.sources.misc
  2. From: tal@Warren.MENTORG.COM (Tom Limoncelli)
  3. Subject: v37i069:  ixobeeper - Talk to alpha-numeric pager from Unix, Part02/02
  4. Message-ID: <1993May18.033033.17534@sparky.imd.sterling.com>
  5. X-Md4-Signature: be4ffe7e22b4074db957b3a8fb679fc2
  6. Date: Tue, 18 May 1993 03:30:33 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: tal@Warren.MENTORG.COM (Tom Limoncelli)
  10. Posting-number: Volume 37, Issue 69
  11. Archive-name: ixobeeper/part02
  12. Environment: UNIX, Sun, HPUX
  13. Supersedes: ixobeeper: Volume 25, Issue 43
  14.  
  15. ---- Cut Here and unpack ----
  16. #! /bin/sh
  17. # This is a shell archive.  Remove anything before this line, then feed it
  18. # into a shell via "sh file" or similar.  To overwrite existing files,
  19. # type "sh file -c".
  20. # Contents:  INSTALL LEGALSTUFF MAILINGLIST depend schedule startdaemon
  21. #   table tpage.l
  22. # Wrapped by kent@sparky on Mon May 17 22:12:19 1993
  23. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  24. echo If this archive is complete, you will see the following message:
  25. echo '          "shar: End of archive 2 (of 2)."'
  26. if test -f 'INSTALL' -a "${1}" != "-c" ; then 
  27.   echo shar: Will not clobber existing file \"'INSTALL'\"
  28. else
  29.   echo shar: Extracting \"'INSTALL'\" \(5454 characters\)
  30.   sed "s/^X//" >'INSTALL' <<'END_OF_FILE'
  31. XINSTALL -- How to install the Tom Page set of programs.
  32. X  by Tom Limoncelli, tal@warren.mentorg.com 
  33. X  Copyright (c) 1992, Tom Limoncelli 
  34. X  The sources can be freely copied for non-commercial use only
  35. X  and only if the source is unmodified.
  36. X
  37. XFor program history, read HISTORY.
  38. XFor general program information, read README. 
  39. X
  40. X
  41. XTHEORY OF OPERATION: (this assumes you've read README already)
  42. X--------------------
  43. X
  44. Xtpage.pl (which is often renamed to "beep" or "page") takes a number of
  45. Xoptions, figures out who and how to send to a person, figures
  46. Xout the message, and stuffs the info into a file for the daemon
  47. Xto read.
  48. X
  49. Xtpage.pl refers to /home/adm/lib/tpage/table to find out the phone
  50. Xnumber and other information that must be given to the daemon.  You
  51. Xcan also specify a different file name with the "-T" option.
  52. X
  53. Xtpaged.pl wakes up every couple minutes to see if there
  54. Xis anything new in the queue.  If there is, it takes the information,
  55. Xdials out to your paging company, and transmits the message.
  56. X
  57. XRather than page a particular person, tpage.pl can be given a schedule
  58. Xand be told, "page whoever is on duty right now".  This is done
  59. Xby giving it "-" as the "who" parameter.  The schedule is stored
  60. Xin /home/adm/lib/tpage/schedule, or by specifying a file name with
  61. Xthe "-S" option.
  62. X
  63. Xtpage can take the message from the command line, or from stdin.  If
  64. Xit is coming from stdin, it can parse it as email and do various
  65. Xthings with it (see the man page).
  66. X
  67. X
  68. XINSTALLATION:
  69. X-------------
  70. X
  71. X1.  Install the Perl programming language.  The front-end to tpaged
  72. Xis written in Perl.  Any version should do, but it was developed with
  73. Xversion 4.019.  Hopefully, this program already exists on your system.
  74. XIf not, I highly recommend that you get it from ftp.uu.net:/pub/gnu
  75. Xand install it.
  76. X
  77. XFor the rest of this document, $TPAGE will refer to the directory
  78. Xthat you wish to keep the files associated with the tpage system.
  79. X
  80. XALL FILES SHOULD BE COPIED to $TPAGE except tpage (belongs in
  81. X/usr/local/bin/tpage).  The queue directory should be $TPAGE/pqueue but
  82. Xnothing will break if you put it someplace else.
  83. X"chmod 1777 $TPAGE/pqueue" so that people can write to it but only
  84. Xdelete their own files.
  85. X
  86. X2.  Edit tpage.pl and copy it to "/usr/local/bin/tpage".  The first
  87. Xsection explains what variables need to be edited and why.  You might
  88. Xwant to call it "page" or "beep" instead.
  89. X
  90. XEdit tpaged.pl and copy it to "$TPAGE/tpage".  The first
  91. Xsection of each file explains what variables need to be edited and why.
  92. X
  93. XEdit tpage.l and copy it to "/usr/local/man/manl" or wherever local
  94. Xmanpages are kept.  The first section of each file explains what
  95. Xvariables need to be edited and why.
  96. X
  97. XIf you run SunOS you won't have to edit ixocico.c.  If you don't run SunOS
  98. Xyou're going to have the fun of porting this program.  I put in a couple
  99. Xof #defines to get you started.  Anyway, compile it with a simple
  100. X"make ixocico" and you're done with it.  ixocico doesn't require many
  101. Xedits because tpaged gives it everything it needs to know.  ixocico
  102. Xalso belongs in $TPAGE/ixocico
  103. X
  104. XCopy the sample "table" file and copy it to $DEFAULT_T (which should
  105. Xbe $TPAGE/table if you're smart).  Read it.  Then edit it to your
  106. Xrequirements.
  107. X
  108. XCopy the sample "schedule" file and copy it to $DEFAULT_S (which should
  109. Xbe $TPAGE/schedule if you're smart).  Read it.  Then edit it to your
  110. Xrequirements.  You can edit this later or even skip this step if you
  111. Xdon't care about the schedule feature.
  112. X
  113. X3.  Read the man page ("nroff -man tpage.l | more").
  114. X
  115. X4.  Create the $QUEUE_DIR directory (as defined in $TPAGE/tpage.pl and
  116. X$TPAGE/tpaged.pl) and do a chmod 0777 on it.  Make sure that users on any
  117. Xmachine that should be able to run "tpage" can create files there and
  118. Xdelete at least their own files.  If you use NFS you'll have to export
  119. Xthat directory.  If you don't use NFS, you're smart.
  120. X
  121. X5.  Set up a cron job that runs "startdaemon" every 20 minutes on the
  122. Xmachine with the modems.  You might want to run it as root, you might
  123. Xwant to run it as any user that can access those modems.
  124. X
  125. X6.  Read the man page ("nroff -man tpage.l | more").
  126. X
  127. XTest it and you're done.  Try:
  128. X
  129. Xtpage -d 1xxxyyyzzzz -p 123456 "this is a test"
  130. X(substitute your phone number and pin)
  131. X
  132. Xtpage alias "this is a second test"
  133. X(replace "alias" with a name from the "table" file)
  134. X
  135. Xtpage - -
  136. Xthis is a test using the schedule and stdin.
  137. X^D
  138. X
  139. X(this should page the "person on duty")
  140. X
  141. XBUGS:
  142. X
  143. X-------------------------- INSTALL PROBLEM --------------------------
  144. XSome people have reported that in ixocico.c in the "main()" function
  145. Xneeds "sleep(2); send(modem, "\r"); sleep(2); send(modem, "\r");" added
  146. Xor their paging service doesn't respond.  Here's where to add it:
  147. X
  148. X-------------
  149. Xthis code segment is from main()
  150. X   need to send a few \r's to wake-up some paging terminals
  151. X------------   
  152. X
  153. Xprintf("Waiting for ID=\n");
  154. X
  155. X        /* send a CR every second until "ID=" comes back */
  156. X        failcnt = 10;
  157. X
  158. X/*  CRs needed by PacTel Paging   DJ  */
  159. X
  160. X----->  sleep(2);
  161. X----->  send(modem, "\r");
  162. X----->  sleep(2);
  163. X----->  send(modem, "\r");
  164. X
  165. X        while (failcnt--) {
  166. X                if (match(modem, "ID=", 5)){
  167. X
  168. XSpecial thanks to  Daryl Jones <daryl@tcomeng.com> for reporting this.
  169. X
  170. X-------------------------- INSTALL PROBLEM --------------------------
  171. XDo you run SCO Unix?  Have you gotten ixocico to compile?  Nobody
  172. Xelse has!  Please join the ixo mailing list (ixo-request@warren.mentorg.com)
  173. Xand tell us what you did!
  174. X
  175. END_OF_FILE
  176.   if test 5454 -ne `wc -c <'INSTALL'`; then
  177.     echo shar: \"'INSTALL'\" unpacked with wrong size!
  178.   fi
  179.   # end of 'INSTALL'
  180. fi
  181. if test -f 'LEGALSTUFF' -a "${1}" != "-c" ; then 
  182.   echo shar: Will not clobber existing file \"'LEGALSTUFF'\"
  183. else
  184.   echo shar: Extracting \"'LEGALSTUFF'\" \(1756 characters\)
  185.   sed "s/^X//" >'LEGALSTUFF' <<'END_OF_FILE'
  186. X
  187. XCopyright (c) 1992 Thomas A. Limoncelli, tom_limoncelli@warren.mentorg.com
  188. X
  189. XPermission to use, copy, modify, distribute, and sell this software and
  190. Xits documentation for any purpose is hereby granted without fee,
  191. Xprovided that (i) the above copyright notices and this permission
  192. Xnotice appear in all copies of the software and related documentation,
  193. Xand (ii) the name of Mentor Graphics Corp or any company or
  194. Xorganization that I am associated with may not be used in any
  195. Xadvertising or publicity relating to the software without the specific,
  196. Xprior written permission of that company or orgaization
  197. X
  198. XTHE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
  199. XEXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
  200. XWARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  201. X
  202. XIN NO EVENT SHALL THOMAS A. LIMONCELLI OR MENTOR GRAPHICS CORP BE
  203. XLIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES
  204. XOF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
  205. XOR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON
  206. XANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE
  207. XOR PERFORMANCE OF THIS SOFTWARE.
  208. X
  209. XUse this software at your own risk.  Think before using.  Do not use
  210. Xthis software for mission-critical applications without careful backup
  211. Xprocedures.  Though every effort has been made to make the software bug
  212. Xfree, some bugs are sure to still exist.  More importantly, many paging
  213. Xservices are known to drop some pages when under heavy load, when
  214. Xupgrading their equipment, or at other times.  The author and the
  215. Xauthor's employer are not responsible for problems with the software,
  216. Xthe paging service, or malfunctions of your pager.  Dead batteries are
  217. Xyour problem.
  218. X
  219. END_OF_FILE
  220.   if test 1756 -ne `wc -c <'LEGALSTUFF'`; then
  221.     echo shar: \"'LEGALSTUFF'\" unpacked with wrong size!
  222.   fi
  223.   # end of 'LEGALSTUFF'
  224. fi
  225. if test -f 'MAILINGLIST' -a "${1}" != "-c" ; then 
  226.   echo shar: Will not clobber existing file \"'MAILINGLIST'\"
  227. else
  228.   echo shar: Extracting \"'MAILINGLIST'\" \(539 characters\)
  229.   sed "s/^X//" >'MAILINGLIST' <<'END_OF_FILE'
  230. XUPDATES:  If you have source code changes please send them into the
  231. Xauthor at "tal@warren.mentorg.com".  He does make an effort to
  232. Xintegrate them into the source code, or at least make them available to
  233. Xothers.  He is currently compiling a list of modifications required to
  234. Xuse this software with the various paging services that aren't 100%
  235. Xcompliant.
  236. X
  237. XMAILING LIST:  There is a mailng list for talking about this software
  238. X(and other ixo topics) called ixo@warren.mentorg.com.  To subscribe,
  239. Xsend email to ixo-request@warren.mentorg.com.
  240. END_OF_FILE
  241.   if test 539 -ne `wc -c <'MAILINGLIST'`; then
  242.     echo shar: \"'MAILINGLIST'\" unpacked with wrong size!
  243.   fi
  244.   # end of 'MAILINGLIST'
  245. fi
  246. if test -f 'depend' -a "${1}" != "-c" ; then 
  247.   echo shar: Will not clobber existing file \"'depend'\"
  248. else
  249.   echo shar: Extracting \"'depend'\" \(390 characters\)
  250.   sed "s/^X//" >'depend' <<'END_OF_FILE'
  251. XWhat routines use on what routines
  252. X----------------------------------
  253. X
  254. Xsafeprint: 
  255. X
  256. Xchecksum: safeprint
  257. X
  258. Xgrabmodem:
  259. X
  260. Xsend: safeprint
  261. X
  262. Xmatch: safeprint
  263. X
  264. Xhangup_modem: send
  265. X
  266. Xunlockmodem:
  267. X
  268. Xbail_out: hangup_modem unlockmodem
  269. X
  270. Xlockmodem: bail_out
  271. X
  272. Xgetline: bailout safe_print
  273. X
  274. Xgetpacket: bail_out safeprint
  275. X
  276. Xmain: lockmodem grabmodem bail_out send match hangup_modem getpacket getline checksum
  277. X
  278. END_OF_FILE
  279.   if test 390 -ne `wc -c <'depend'`; then
  280.     echo shar: \"'depend'\" unpacked with wrong size!
  281.   fi
  282.   # end of 'depend'
  283. fi
  284. if test -f 'schedule' -a "${1}" != "-c" ; then 
  285.   echo shar: Will not clobber existing file \"'schedule'\"
  286. else
  287.   echo shar: Extracting \"'schedule'\" \(2140 characters\)
  288.   sed "s/^X//" >'schedule' <<'END_OF_FILE'
  289. X# beepersched -- the schedule of who's on-call at what times.
  290. X# [For use with tpage.pl -- By Tom Limoncelli (tal@warren.mentorg.com)]
  291. X#
  292. X# This file is only used if "who" is "-"
  293. X#
  294. X# The lines that begin with 0-6 refer to the days Sun-Sat.  The 48
  295. X# bytes after refer to who's on duty each half-hour.
  296. X#
  297. X# This schedule shows tal, ingo, and greg as
  298. X# having different hours.  On Monday night, all three are paged.
  299. X# 
  300. X# A "-" in this list (not to be confused with "-" on the command
  301. X# line) means "no body is on duty".  If the "-U" (urgent) is used,
  302. X# beep2.pl keeps looking for another schedule to see if maybe it
  303. X# can find someone else scheduled for that time.  The way I manage
  304. X# things is to have lower-case letters mean individual people and
  305. X# capitol letters meaning the fall-back "urgent" people (usually a list
  306. X# of the person and their fallback).  For example, "g" is for greg,
  307. X# and "G" is for greg and the person that backs him up.
  308. X# Of course, you can use any system you wish.
  309. X#
  310. X#                        N
  311. X#                        O
  312. X#                    1 1 O                   1 1
  313. X#0 1 2 3 4 5 6 7 8 9 0 1 N 1 2 3 4 5 6 7 8 9 0 1
  314. X0--------------------ttttttttttttttttAAAAAAAAAAAA
  315. X1------------ttttgggttttttggggiiiiiiitt----------
  316. X2------------ttttgggttttttggggiiiiiiitttttttttttt
  317. X3------------ttttgggttttttggggiiiiiiitt----------
  318. X4------------ttttgggttttttggggiiiiiiitttttttttttt
  319. X5------------ttttgggttttttggggiiiiiiitt----------
  320. X6-------------------tttttttttttttttttttttttttt---
  321. X#
  322. X# these will only be accessed if -U is used.
  323. X# A "-" in this list means "don't call anyone"
  324. X#
  325. X#                    1 1 O                   1 1
  326. X#0 1 2 3 4 5 6 7 8 9 0 1 N 1 2 3 4 5 6 7 8 9 0 1
  327. X0TTTTTTTTTTTTTTTTTTT--------------TTTTTTTTTTTTTTT
  328. X1TTTTTTTTTTTTTTTTTTT--------------TTTTTTTTTTTTTTT
  329. X2TTTTTTTTTTTTTTTTTTT--------------TTTTT----------
  330. X3TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
  331. X4TTTTTTTTTTTTTTTTTTT--------------TTTTT----------
  332. X5TTTTTTTTTTTTTTTTTTT--------------TTTTTTTTTTTTTTT
  333. X6TTTTTTTTTTTTTTTTTTT--------------TTTTTTTTTTTTTTT
  334. X#
  335. X#
  336. Xg=greg
  337. Xi=ingo
  338. Xt=tal
  339. X#
  340. X# a person and their backup
  341. XG=greg,tal
  342. XI=ingo,greg
  343. XT=tal,greg
  344. X#
  345. XA=greg,tal,ingo
  346. END_OF_FILE
  347.   if test 2140 -ne `wc -c <'schedule'`; then
  348.     echo shar: \"'schedule'\" unpacked with wrong size!
  349.   fi
  350.   # end of 'schedule'
  351. fi
  352. if test -f 'startdaemon' -a "${1}" != "-c" ; then 
  353.   echo shar: Will not clobber existing file \"'startdaemon'\"
  354. else
  355.   echo shar: Extracting \"'startdaemon'\" \(595 characters\)
  356.   sed "s/^X//" >'startdaemon' <<'END_OF_FILE'
  357. X#! /usr/local/bin/perl4.019
  358. X
  359. X# "start daemon" -- Start the tpaged daemon if it isn't running.
  360. X#   by Tom Limoncelli, tal@warren.mentorg.com
  361. X#   Copyright (c) 1992, Tom Limoncelli
  362. X
  363. X
  364. X$BSD = -f '/vmunix';
  365. X$pscmd = $BSD ? "ps -auxww" : "ps -ef";
  366. X
  367. Xopen(PS, "$pscmd|") || die "Can't run ps: !$";
  368. X$title = <PS>;
  369. X$found = 0;
  370. Xwhile (<PS>) {
  371. X    chop;
  372. X    $found = 1 if /tpaged/;
  373. X}
  374. X
  375. Xif (!$found) {
  376. X    unless (fork) {    #    this is the child
  377. X        unless (fork) {    #    this is the child's child
  378. X            sleep 1 until getppid == 1;
  379. X            system "/home/adm/lib/tpage/tpaged &";
  380. X            exit 0;
  381. X        }
  382. X        exit 0;
  383. X    }
  384. X    print "Started tpaged\n";
  385. X}
  386. END_OF_FILE
  387.   if test 595 -ne `wc -c <'startdaemon'`; then
  388.     echo shar: \"'startdaemon'\" unpacked with wrong size!
  389.   fi
  390.   chmod +x 'startdaemon'
  391.   # end of 'startdaemon'
  392. fi
  393. if test -f 'table' -a "${1}" != "-c" ; then 
  394.   echo shar: Will not clobber existing file \"'table'\"
  395. else
  396.   echo shar: Extracting \"'table'\" \(623 characters\)
  397.   sed "s/^X//" >'table' <<'END_OF_FILE'
  398. X# beepertab -- table of information about people's beepers.
  399. X# [ For use with tpage.pl by Tom Limoncelli (tal@warren.mentorg.com)]
  400. X#
  401. X# Comment lines begin with "#".
  402. X#
  403. X# The columns are name, numeric pager phone # (currently unused), IXO
  404. X# protocol number to dial, and the person's pagerid.
  405. X#
  406. X# Aliases are implemented by repeating data.  (ooo, fancy!)
  407. X#
  408. Xgreg     5551212    18006789012     1234567
  409. Xgregt    5551212    18006789012     1234567
  410. X#
  411. Xingo     5551213    18006789012     7654321
  412. Xidean    5551213    18006789012     7654321
  413. X#
  414. Xtom      5551214    18006789012     1122334 
  415. Xtal      5551214    18006789012     1122334 
  416. END_OF_FILE
  417.   if test 623 -ne `wc -c <'table'`; then
  418.     echo shar: \"'table'\" unpacked with wrong size!
  419.   fi
  420.   # end of 'table'
  421. fi
  422. if test -f 'tpage.l' -a "${1}" != "-c" ; then 
  423.   echo shar: Will not clobber existing file \"'tpage.l'\"
  424. else
  425.   echo shar: Extracting \"'tpage.l'\" \(6781 characters\)
  426.   sed "s/^X//" >'tpage.l' <<'END_OF_FILE'
  427. X.ds l local
  428. X.TH TPAGE N "05 May 1992"
  429. X.BY "Tom Limoncelli, tal@warren.mentorg.com"
  430. X.SH NAME
  431. Xtpage \- front-end to Tom's Pager System
  432. X.br
  433. Xtpaged \- daemon that manages paging queue
  434. X.br
  435. Xixocico \- program that executes the IXO protocol
  436. X.SH SYNOPSIS
  437. X.B /usr/local/bin/tpage
  438. X[
  439. X.B \-T
  440. Xtable file
  441. X] [
  442. X.B \-S
  443. Xschedule file
  444. X] [
  445. X.B \-U
  446. X] [
  447. X.B \-d
  448. Xphone num
  449. X] [
  450. X.B \-p
  451. Xpin
  452. X] [
  453. X.B \-t
  454. X] [
  455. X.B \-v
  456. X] [
  457. X.B \-m
  458. X] [
  459. X.B \-M
  460. X] [
  461. X.B \-e
  462. X]
  463. X.B who
  464. X[
  465. X.B message
  466. Xor
  467. X.B \-
  468. X]
  469. X.br
  470. X.B /home/adm/lib/tpage/tpaged
  471. X.br
  472. X.B /home/adm/lib/tpage/ixocico
  473. Xdev phonenum
  474. X.br
  475. X.SH DESCRIPTION
  476. X.I tpage
  477. Xis the front-end to the system.  A user can run this program to
  478. Xsubmit a message to someone's pager.
  479. X.PP
  480. XThe program wants 4
  481. Xthings:  (1) the phone number to dial, (2) the person's PIN
  482. Xpin (Personal Identification Number), (3) who to email if the
  483. Xpage isn't accepted, and (4) the message.
  484. X.PP
  485. XOnce it has all that information, it dumps it into a file
  486. Xwhich is read by 
  487. X.B tpaged
  488. Xwhich delivers the message to the paging service using
  489. Xthe appropriate protocol.  tpaged selects the correct
  490. Xprogram for you.  Each protocol is implemented as
  491. Xa separate program.  Currently \fBixocico\fR
  492. Xis the only program to choose from, and it implements 
  493. Xthe IXO protocol.
  494. X.PP
  495. XThe phone 
  496. Xnumber (1) and PIN (2) can be specified with the 
  497. X.B \-d
  498. Xand
  499. X.B \-p
  500. Xoptions, OR by specifying a name (which instructs tpage
  501. Xto look up the information in the pager table file), OR by 
  502. Xspecifying the name ``\-'' which
  503. Xmeans ``whoever is on duty'' (which instructs tpage to find
  504. Xout who is on duty from the schedule file, and then look up
  505. Xtheir phone number and PIN in the pager table file).
  506. X.PP
  507. XSpecifying a phone number without a PIN (or vice-versa) results
  508. Xin the missing data being looked up in the pager table file.
  509. X.PP
  510. XA comma-separated list of names may be given.  It is much more
  511. Xefficient to use a list of names than to do single pages.
  512. X.PP
  513. XNOTE: A name must always be specified, so if you use the
  514. X.B \-d
  515. Xand
  516. X.B \-p
  517. Xoptions you must also specify a name (such as ``foo'') which will
  518. Xbe ignored.  Combining a list of names with the
  519. X.B \-d
  520. Xand/or
  521. X.B \-p
  522. Xoptions works in a logical but undefined manner.
  523. X.PP
  524. XTo specify who to email if there is a problem (3) use the
  525. X.B \-e
  526. Xoption.  The default for this is to not send email to anyone.
  527. X.PP
  528. XThe message (4) can be specified on the command line or if ``-'' is
  529. Xgiven, stdin is read for the message.  No matter how many
  530. Xbytes you give it, the high-bit is stripped, RETURNs and TABs are
  531. Xturned into spaces, and groups of spaces are turned into single
  532. Xspaces.  The first 160 bytes (configurable in the program) is
  533. Xall that's sent, since that's all that the pager will display.
  534. X.PP
  535. XCommand-line options are:
  536. X.TP 10
  537. X.BR \-T " table file"
  538. X\fItable file\fR is the file that has the
  539. Xtable of people and the info needed to communicate
  540. Xwith their pager.  The default is /home/adm/lib/tpage/table.
  541. X.TP
  542. X.BR \-S " schedule file"
  543. X\fIschedule file\fR is the file that has the
  544. Xis the file that is used
  545. Xto find out who's on duty at this moment.  This file is only
  546. Xconsulted if ``who'' is ``\-''.  The default is
  547. X/home/adm/lib/tpage/schedule.
  548. X.TP
  549. X.B \-U
  550. XThis option marks the message as \fIurgent\fR.  If the schedule
  551. Xlists that no one is on duty at that time but the message is
  552. Xmarked \fIurgent\fR, a secondary schedule is consulted.
  553. X.TP
  554. X.BR \-d " phone num"
  555. XIgnore what the table file says, use this phone number when
  556. Xdialing.  If a list of people is specified, this phone number
  557. Xis used for the first person, the others will be looked
  558. Xup in the \-T file.
  559. X.TP
  560. X.BR \-p " pin"
  561. XIgnore what the table file says, use this PIN when transmitting
  562. Xthe message.
  563. XIf a list of people is specified, this phone number
  564. Xis used for the first person, the others will be looked
  565. Xup in the \-T file.
  566. X.TP
  567. X.B \-t
  568. XAct as a ``tee''.  Copy stdin to stdout.  If you give this
  569. Xoption and the message is not coming from 
  570. X.TP
  571. X.B \-v
  572. XVerbose mode.  Currently useless since there isn't anything
  573. Xextra worth printing.
  574. X.TP
  575. X.B \-m
  576. XParse the input as mail.  Skip all the headers but extract the ``From'',
  577. X``Subject'', and ``Priority'' lines.  If they exist, append to the
  578. Xbeginning of the message ``F: frominfo'', ``S: subject line'',
  579. X``P: priority''.  ``F:'' and ``P:'' are clipped to be one screenful
  580. Xin length.  They are all padded out to the end of the screen.
  581. X.TP
  582. X.B \-M
  583. XSkip ``mail quoted'' lines.  Netnews and Mail often have other messages
  584. Xquoted by prefixing each line with greater than symbol.  This option
  585. Xskips any input line that begins with zero or more whitespace charactors,
  586. Xfollowed by zero or more letters or numbers, followed by zero or more
  587. Xof \<, \>, {, or }.  This should catch the normal quoting methods
  588. Xas well as anything the perverse superquote.el package 
  589. Xfor GNU Emacs
  590. Xmight come up with.
  591. X.TP
  592. X.B \-e
  593. XOn error, send email to this person.  If any errors happen when
  594. Xthe tpage command is beign run, the user is notified.  This
  595. Xis for sending email when the page is being processed.  In
  596. Xother words, if the PIN is incorrect.  If the phone number is
  597. Xincorrect the tpaged daemon will keep redialing and redialing it
  598. Xtrying to figure out why it can't get through.
  599. X.PP
  600. X.IR tpaged
  601. Xtpage is a program that you don't need to know about.  Your
  602. Xsysadmin should have installed it for you.  It wakes up about
  603. Xevery 20 seconds, sees if there are any new messages to send
  604. Xout and tries to send them.  It can understand multiple paging
  605. Xprotocols (tpage picks the best one for you) though it
  606. Xcurrently only knows about the IXO protocol.  tpage can run
  607. Xas ``root'' but is often just run as ``daemon''.
  608. X.PP
  609. X.IR ixocico
  610. Xis the message transport program for the tpage system.  It is called
  611. Xby
  612. X.B tpaged
  613. Xand told what device to use and what phone number to dial on
  614. Xthe command line.  It
  615. Xgets the PINs and messages to send from stdin.
  616. X.PP
  617. XIt co-exists with the uucp programs fine as it uses the
  618. Xsame methods to lock the modems.  It notices stale locks
  619. Xand blows them away.  Not all locking features have been
  620. Xproven to work on HPUX, only SunOS.
  621. XIt will not wait for a modem to be unlocked.
  622. X.PP
  623. X.B tpaged
  624. Xwatches the output of
  625. X.B ixocico
  626. Xfor lines beginning with # to know success
  627. Xor failure of particular messages and of the entire batch.
  628. X.PP
  629. X.SH FILES
  630. X.ta 6c
  631. X.nf
  632. X/home/adm/lib/tpage/schedule    schedule of who's on duty
  633. X/home/adm/lib/tpage/table    table of people and their pager info
  634. X.SH SEE ALSO
  635. Xuucico(1), xkill(l)
  636. X.SH HISTORY
  637. XWritten by Tom Limoncelli (tal@Warren.MENTORG.COM)
  638. Xat Mentor Graphics Corporation, Silicon Design Division,
  639. XWarren, New Jersey.  May be re-distributed only in it's unmodified
  640. Xform.
  641. X.SH BUGS
  642. XIf
  643. X.B \-d
  644. Xand
  645. X.B \-p
  646. Xare specified, a name still must be specified.
  647. X.PP
  648. XIt currently only compiles under SunOS even though some
  649. Xdefines are inserted so that it doesn't fail all over the
  650. Xplace on silly operating systems like HPUX.
  651. END_OF_FILE
  652.   if test 6781 -ne `wc -c <'tpage.l'`; then
  653.     echo shar: \"'tpage.l'\" unpacked with wrong size!
  654.   fi
  655.   chmod +x 'tpage.l'
  656.   # end of 'tpage.l'
  657. fi
  658. echo shar: End of archive 2 \(of 2\).
  659. cp /dev/null ark2isdone
  660. MISSING=""
  661. for I in 1 2 ; do
  662.     if test ! -f ark${I}isdone ; then
  663.     MISSING="${MISSING} ${I}"
  664.     fi
  665. done
  666. if test "${MISSING}" = "" ; then
  667.     echo You have unpacked both archives.
  668.     rm -f ark[1-9]isdone
  669. else
  670.     echo You still must unpack the following archives:
  671.     echo "        " ${MISSING}
  672. fi
  673. exit 0
  674. exit 0 # Just in case...
  675.