It does this by dropping entries with the user field set to 'auto_*' when
it builds the "All EXCEPT..." index. For example entries with usernames
of:
auto_snap auto_target auto_anythingwill no longer show up in that particular index.
To those who have adapted my autolog script: please update your software to use an appropriate user field. Contact me if you have questions.
The original script was saved as '/adaqfs/home/adaq/halog/src/halogscript_28Jan2009'.
The diff is below:
--- /adaqfs/home/adaq/halog/src/halogscript_28Jan2009 2009-01-28 20:43:38.500181000 -0500 +++ halogscript 2009-01-27 22:05:53.000000000 -0500 @@ -44,9 +44,16 @@ # Changed the 'chmod 755' command in the same section # to 'chmod 644'. There is no reason for the files to # be made executable. +# HA1.43 bds 01/27/2009 Added a regex to strip the auto snapshot, etc files from +# the 'All expect automatic entries page' +# Changed the 'chmod 777' instances to chmod 666. +# They should probably be 644, but I don't want to +# break anything, and don't know if something else +# needs to write to them... (I'm sure they don't +# need the exec bit though). # #------------------------------------------------------------------------- -$SCRIPT_VERSION="HA1.42"; +$SCRIPT_VERSION="HA1.43"; #=================================================================================== # include some of the standard PERL subroutines #=================================================================================== @@ -77,6 +84,7 @@ $auto_regexp3 = "Start_Run"; # Regular expression to find accounting entries $auto_regexp4 = "Start_Parity"; # Regular expression to find parity start-runs $auto_regexp5 = "End_of_Parity"; # Regular expression to find parity end-runs +$auto_regexp6 = qr/auto_/; # Regex used to find auto-logged entries (NOTE: matches on Name) $logbook = "HALOG"; close(STDERR); @@ -408,6 +416,9 @@ print OUTFILE_AUTO2 $entry_line; } elsif($KEYWORD=~/$auto_regexp5/o) { print OUTFILE_AUTO2 $entry_line; + } elsif($NAMWORD=~/$auto_regexp6/o) { + ## no special file + #print OUTFILE_AUTO2 $entry_line; } else { print OUTFILE_NOAUTO2 $entry_line; } @@ -435,6 +446,9 @@ print(OUTFILE_AUTO2 "$followuplist"); } elsif($KEYWORD=~/$auto_regexp5/o) { print(OUTFILE_AUTO2 "$followuplist"); + } elsif($NAMWORD=~/$auto_regexp6/o) { + ## no special log file + #print(OUTFILE_AUTO2 "$followuplist"); } else { print(OUTFILE_NOAUTO2 "$followuplist"); } @@ -451,6 +465,9 @@ print(OUTFILE_AUTO2 "$followuplist"); } elsif($KEYWORD=~/$auto_regexp5/o) { print(OUTFILE_AUTO2 "$followuplist"); + } elsif($NAMWORD=~/$auto_regexp6/o) { + ## no special log file + #print(OUTFILE_AUTO2 "$followuplist"); } else { print(OUTFILE_NOAUTO2 "$followuplist"); } @@ -620,7 +637,7 @@ rename( "logdir_auto2.new.html", "logdir_auto2.html" ); unlink( "logdir_noauto2.html" ); rename( "logdir_noauto2.new.html", "logdir_noauto2.html" ); -system( "/bin/chmod 777 $logdir.html" ); +system( "/bin/chmod 666 $logdir.html" ); system( "/bin/chown adaq $logdir.html" ); #print "dolog is now finished\n"; @@ -873,6 +890,9 @@ print OUTFILE_AUTO2 $entry_line; } elsif($KEYWORD=~/$auto_regexp5/o) { print OUTFILE_AUTO2 $entry_line; + } elsif($NAMWORD=~/$auto_regexp6/o) { + ## no special log file + #print OUTFILE_AUTO2 $entry_line; } else { print OUTFILE_NOAUTO2 $entry_line; } @@ -891,6 +911,9 @@ print(OUTFILE_AUTO2 "$followuplist"); } elsif($KEYWORD=~/$auto_regexp5/o) { print(OUTFILE_AUTO2 "$followuplist"); + } elsif($NAMWORD=~/$auto_regexp6/o) { + ## no special log file + #print(OUTFILE_AUTO2 "$followuplist"); } else { print(OUTFILE_NOAUTO2 "$followuplist"); } @@ -912,7 +935,7 @@ rename( "logdir_auto2.new.html", "logdir_auto2.html" ); unlink( "logdir_noauto2.html" ); rename( "logdir_noauto2.new.html", "logdir_noauto2.html" ); - system( "/bin/chmod 777 $logdir.html" ); + system( "/bin/chmod 666 $logdir.html" ); system( "/bin/chown adaq $logdir.html" ); printf( OUTFILE "\n" ); printf( OUTFILE_AUTO "\n" );