[SPAM] - Re: [ale] Cron scripts and ttys - Email found in subject

Yu, Jerry Jerry.Yu at Voicecom.com
Thu Mar 3 13:24:21 EST 2005


Unless you want to do the tty IO attach/redirect/detach/reattach yourself,  use Expect. 
Here is one way to do it:
<all inside expect>
define a marker file & rm -f marker
spawn the backup routine (expect  does it magic of  attatch/redirect tty IO)
send email/page/beep alert  to operators to change the tape and ask them to remove a marker file when done
make a marker file
loop to check whether the marker is gone before responding to backup routine's prompt  (with timeout to alert to remove the marker )
</all inside expect>

# -----Original Message-----
# From: ale-bounces at ale.org [mailto:ale-bounces at ale.org]
# Sent: Thursday, March 03, 2005 1:44 PM
# To: Atlanta Linux Enthusiasts
# Cc: Atlanta Linux Enthusiasts
# Subject: [SPAM] - Re: [ale] Cron scripts and ttys - Email 
# found in subject
# 
# 
# Geoffrey said:
# > How would you handle this anyway?  I mean, if you want to 
# be prompted to
# > swap tapes, someone will have to be there to swap the 
# tapes, so why not
# > simply have them run the job at the right time.
# >
# > I'm not sure what this would gain you if you sent a message to the
# > console that needed to be responded to anyway.
# 
# A number of reasons. The backup routine will not always 
# require two tapes,
# depending on what day of the billing cycle it is.  The backup 
# must take
# advantage of a late night down period when a small amount of 
# users are in
# the system, hence the cron job.  The backup routine is also consistent
# across 5 different locations, and subset of which will not require two
# tapes on any day for some time....but when they do we'd like 
# to be able to
# regain control of the script to interact.
# 
# Most important reason....to satisfy my curiosity :).  It was 
# a question I
# honestly couldn't answer.
# 
# Thanks,
# John
# 
# _______________________________________________
# Ale mailing list
# Ale at ale.org
# http://www.ale.org/mailman/listinfo/ale
# 

This email and any attached files herein contain information that is intended only for the use of the individual or entity to whom it is addressed and may contain information that is legally privileged, confidential or otherwise exempt from disclosure under applicable laws. If the reader of this message is not the recipient, any disclosure, dissemination, distribution, copying or other use or retention of this communication or its substance is prohibited.




More information about the Ale mailing list