#!/usr/bin/env expect # 20 Dec 2001 (MPM) # This script sends the calling user's username to # the spcd program on grendel so we can have a more # informative message sent to users who are # rejected when someone else is using the cdr program. # # 18 Oct 2002 (MPM) # Modified to use the "env" shell so that we don't need # to worry about cross platform, if the expect program # is in the user's path, it will be used. Otherwise, there # will be a problem, but I think doing things this way is # easier than trying to catch all the crap involved with # cross platform ridiculousness. # set timeout 10 eval spawn rlogin -l cdr grendel expect "gram." exit \ timeout exit \ "name:" {send "[exec whoami]\r"} interact