james@dlss2.UUCP (James Cummings) (08/24/90)
Submitted-by: James Cummings <dlss2!james> Posting-number: Volume 11, Issue 21 Archive-name: idle1.2/Patch01 Well, here's a patch for my idle program. I've had several good suggestions and one person (sorry I lost the name) that actually sent context diffs (yea!). Please apply this patch, albeit small. It does fix some goofs that I made in coding the original. Unshar the following patch wherever you have the original source and simply type: patch < Idle.patch1 ... then as root do a "make insta". Everything that needs to be compiled will then be made and installed. I have added a patchlevel.h file for the obvious reasons. Please re-read the README file for some omissions in explaining how to start the program. Sorry there are no real enhacements yet, but I thought these fixes were important enough to warrant the bandwith. The program is now known to run on ESIX 386 and a Sequent 27 with the att and bsd extensions. Anyone else? James #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of archive 1 (of 1)." # Contents: Idle.patch1 patchlevel.h # Wrapped by james@dlss2 on Fri Aug 24 09:50:30 1990 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'Idle.patch1' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Idle.patch1'\" else echo shar: Extracting \"'Idle.patch1'\" \(1741 characters\) sed "s/^X//" >'Idle.patch1' <<'END_OF_FILE' X Prereq: immune.c,v 2.1 X*** immune.c.orig Fri Aug 24 08:49:53 CDT 1990 X--- immune.c Fri Aug 24 08:49:53 CDT 1990 X1c1 X< static char rcsid[] = "@(#)$Id: immune.c,v 2.1 07/23/90 jbc $"; X--- X> static char rcsid[] = "@(#)$Id: immune.c,v 2.2 08/24/90 jbc $"; X16a17 X> char *mailcmd = "echo \"Can't open IMMUNE FILE.\" | mail root"; X19,20c20,21 X< if((imfp = fopen(IMMUNE_FILE,"r")) < 0) { X< perror("immune.file"); X--- X> if((imfp = fopen(IMMUNE_FILE,"r")) == NULL) { X> system(mailcmd); X25c26 X< if(lastc = strchr(name,'\n')); X--- X> if(lastc = strchr(name,'\n')) X32a34 X> (void) fclose(imfp); X34d35 X< (void) fclose(imfp); X36d36 X< X Prereq: mesg.c,v 2.0 X*** mesg.c.orig Fri Aug 24 09:11:37 CDT 1990 X--- mesg.c Fri Aug 24 09:11:37 CDT 1990 X1c1 X< static char rcsid[] = "@(#)$Id: mesg.c,v 2.0 07/18/90 jbc $"; X--- X> static char rcsid[] = "@(#)$Id: mesg.c,v 2.1 08/24/90 jbc $"; X44c44 X< fprintf(mprog, "Subject: Excess Idle Time\n %s,\n\tYou were logged off after %d min idle time at - %s\n",name,idle, ctime(&tvec)); X--- X> fprintf(mprog, "Subject: Excess Idle Time\n %s,\n You were logged off after %d min idle time at - %s\n",name,idle, ctime(&tvec)); X X*** README.orig Fri Aug 24 09:11:37 CDT 1990 X--- README Fri Aug 24 09:11:37 CDT 1990 X29a30,35 X> You should consider starting the program in this manner: X> 1. Login or su to root. X> 2. Perform an "at" command for approx. 2 min to exec idle_demon X> X> Idle_demon calls autologout at the appropriate times. X> X49c55 X< jc@smunews X--- X> jc@smunews.smu.edu X*** Makefile.orig Fri Aug 24 09:35:54 CDT 1990 X--- Makefile Fri Aug 24 09:35:54 CDT 1990 X28c28,30 X< install: all X--- X> install: all insta instd X> X> insta: autologout X31a34,35 X> X> instd: demon END_OF_FILE if test 1741 -ne `wc -c <'Idle.patch1'`; then echo shar: \"'Idle.patch1'\" unpacked with wrong size! fi # end of 'Idle.patch1' fi if test -f 'patchlevel.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'patchlevel.h'\" else echo shar: Extracting \"'patchlevel.h'\" \(22 characters\) sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE' idle 1.2 patchlevel 1 END_OF_FILE if test 22 -ne `wc -c <'patchlevel.h'`; then echo shar: \"'patchlevel.h'\" unpacked with wrong size! fi # end of 'patchlevel.h' fi echo shar: End of archive 1 \(of 1\). cp /dev/null ark1isdone MISSING="" for I in 1 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have the archive. rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0 -- =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ |Disclaimer: | James Cummings | | You can't blame me! | UUCP: | | I'm ignorant! | ..swblat!{texbell!texnet.. | |+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+| swgate!dlss1..}!dlss2!james | |Send flames to: | NET: | | sowc@devnull.com | jc@smunews | | | | =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+