271 # Default settings for system log file management.
272 # The -w option to logadm(1M) is the preferred way to write to this file,
273 # but if you do edit it by hand, use "logadm -V" to check it for errors.
274 #
275 # The format of lines in this file is:
276 # <logname> <options>
277 # For each logname listed here, the default options to logadm
278 # are given. Options given on the logadm command line override
279 # the defaults contained in this file.
280 #
281 # logadm typically runs early every morning via an entry in
282 # root's crontab (see crontab(1)).
283 #
284 /var/adm/messages -C 4 -P 'Thu Nov 1 16:56:42 2001' -a 'kill -HUP `cat /var/run/syslog.pid`'
285 /var/cron/log -s 512k -t /var/cron/olog
286 /var/lp/logs/lpsched -C 2 -N -t '$file.$N'
287 #
288 # The entry below is used by turnacct(1M)
289 #
290 /var/adm/pacct -C 0 -a '/usr/lib/acct/accton pacct' -g adm -m 664 -o adm -p never
291 apache -C 24 -a '/usr/apache/bin/apachectl graceful' -p 1m -t '/var/apache/old-logs/$basename.%Y-%m' '/var/apache/logs/*{access,error}_log'
292 /var/log/syslog -C 8 -P 'Thu Nov 1 09:16:38 2001' -a 'kill -HUP `cat /var/run/syslog.pid`'
293 /var/apache/logs/access_log -P 'Thu Nov 1 08:27:56 2001'
294 /var/apache/logs/error_log -P 'Thu Nov 1 08:27:56 2001'
295 /var/apache/logs/suexec_log -P 'Thu Nov 1 08:27:56 2001'
296 /var/apache/logs/mod_jserv.log -P 'Thu Nov 1 08:27:56 2001'
297 /var/apache/logs/jserv.log -P 'Thu Nov 1 08:27:56 2001'
298 EOF
299 }
300
301
302 ###########################################################################
303 #
304 # conftest1 -- minimal basic test of the conf.c code
305 #
306 ###########################################################################
307 sub conftest1 {
308 set_testconffile;
309
310 set_file('checktest', <<'EOF');
311 [ -s std.err ] && { cat std.err; exit 1; }
312 /bin/sed '/^conffile <testfile.conf>:$/d' <std.out >sed.out
313 exec /bin/diff testfile.conf sed.out
314 EOF
315
316 set_file('runtest', <<"EOF");
317 # test "conftest1"
805 # test "optstest2"
806 $envsetup
807 $bindir/optstest $options >std.out 2>std.err || exit 0
808 exit 1
809 EOF
810 }
811
812 ###########################################################################
813 #
814 # logadmV1 -- test of "logadm -V"
815 #
816 ###########################################################################
817 sub logadmV1 {
818 set_testconffile;
819
820 set_file('std.out.expect', <<'EOF');
821 /var/adm/messages -C 4 -P 'Thu Nov 1 16:56:42 2001' -a 'kill -HUP `cat /var/run/syslog.pid`'
822 /var/cron/log -s 512k -t /var/cron/olog
823 /var/lp/logs/lpsched -C 2 -N -t '$file.$N'
824 /var/adm/pacct -C 0 -a '/usr/lib/acct/accton pacct' -g adm -m 664 -o adm -p never
825 apache -C 24 -a '/usr/apache/bin/apachectl graceful' -p 1m -t '/var/apache/old-logs/$basename.%Y-%m' '/var/apache/logs/*{access,error}_log'
826 /var/log/syslog -C 8 -P 'Thu Nov 1 09:16:38 2001' -a 'kill -HUP `cat /var/run/syslog.pid`'
827 /var/apache/logs/access_log -P 'Thu Nov 1 08:27:56 2001'
828 /var/apache/logs/error_log -P 'Thu Nov 1 08:27:56 2001'
829 /var/apache/logs/suexec_log -P 'Thu Nov 1 08:27:56 2001'
830 /var/apache/logs/mod_jserv.log -P 'Thu Nov 1 08:27:56 2001'
831 /var/apache/logs/jserv.log -P 'Thu Nov 1 08:27:56 2001'
832 EOF
833
834 set_file('checktest', <<'EOF');
835 [ -s std.err ] && { cat std.err; exit 1; }
836 exec /bin/diff std.out.expect std.out
837 EOF
838
839 set_file('runtest', <<"EOF");
840 # test "logadmV1"
841 $envsetup
842 exec $bindir/logadm -f testfile.conf -F testfile.conf -V >std.out 2>std.err
843 EOF
844 }
845
846 ###########################################################################
847 #
848 # logadmV2 -- test of "logadm -V <entry>"
849 #
850 ###########################################################################
851 sub logadmV2 {
|
271 # Default settings for system log file management.
272 # The -w option to logadm(1M) is the preferred way to write to this file,
273 # but if you do edit it by hand, use "logadm -V" to check it for errors.
274 #
275 # The format of lines in this file is:
276 # <logname> <options>
277 # For each logname listed here, the default options to logadm
278 # are given. Options given on the logadm command line override
279 # the defaults contained in this file.
280 #
281 # logadm typically runs early every morning via an entry in
282 # root's crontab (see crontab(1)).
283 #
284 /var/adm/messages -C 4 -P 'Thu Nov 1 16:56:42 2001' -a 'kill -HUP `cat /var/run/syslog.pid`'
285 /var/cron/log -s 512k -t /var/cron/olog
286 /var/lp/logs/lpsched -C 2 -N -t '$file.$N'
287 #
288 # The entry below is used by turnacct(1M)
289 #
290 /var/adm/pacct -C 0 -a '/usr/lib/acct/accton pacct' -g adm -m 664 -o adm -p never
291 apache -C 24 -a '/usr/apache2/2.2/bin/apachectl graceful' -p 1m -t '/var/apache2/2.2/old-logs/$basename.%Y-%m' '/var/apache2/2.2/logs/*{access,error}_log'
292 /var/log/syslog -C 8 -P 'Thu Nov 1 09:16:38 2001' -a 'kill -HUP `cat /var/run/syslog.pid`'
293 /var/apache2/2.2/logs/access_log -P 'Thu Nov 1 08:27:56 2001'
294 /var/apache2/2.2/logs/error_log -P 'Thu Nov 1 08:27:56 2001'
295 /var/apache2/2.2/logs/suexec_log -P 'Thu Nov 1 08:27:56 2001'
296 /var/apache2/2.2/logs/mod_jserv.log -P 'Thu Nov 1 08:27:56 2001'
297 /var/apache2/2.2/logs/jserv.log -P 'Thu Nov 1 08:27:56 2001'
298 EOF
299 }
300
301
302 ###########################################################################
303 #
304 # conftest1 -- minimal basic test of the conf.c code
305 #
306 ###########################################################################
307 sub conftest1 {
308 set_testconffile;
309
310 set_file('checktest', <<'EOF');
311 [ -s std.err ] && { cat std.err; exit 1; }
312 /bin/sed '/^conffile <testfile.conf>:$/d' <std.out >sed.out
313 exec /bin/diff testfile.conf sed.out
314 EOF
315
316 set_file('runtest', <<"EOF");
317 # test "conftest1"
805 # test "optstest2"
806 $envsetup
807 $bindir/optstest $options >std.out 2>std.err || exit 0
808 exit 1
809 EOF
810 }
811
812 ###########################################################################
813 #
814 # logadmV1 -- test of "logadm -V"
815 #
816 ###########################################################################
817 sub logadmV1 {
818 set_testconffile;
819
820 set_file('std.out.expect', <<'EOF');
821 /var/adm/messages -C 4 -P 'Thu Nov 1 16:56:42 2001' -a 'kill -HUP `cat /var/run/syslog.pid`'
822 /var/cron/log -s 512k -t /var/cron/olog
823 /var/lp/logs/lpsched -C 2 -N -t '$file.$N'
824 /var/adm/pacct -C 0 -a '/usr/lib/acct/accton pacct' -g adm -m 664 -o adm -p never
825 apache -C 24 -a '/usr/apache2/2.2/bin/apachectl graceful' -p 1m -t '/var/apache2/2.2/old-logs/$basename.%Y-%m' '/var/apache2/2.2/logs/*{access,error}_log'
826 /var/log/syslog -C 8 -P 'Thu Nov 1 09:16:38 2001' -a 'kill -HUP `cat /var/run/syslog.pid`'
827 /var/apache2/2.2/logs/access_log -P 'Thu Nov 1 08:27:56 2001'
828 /var/apache2/2.2/logs/error_log -P 'Thu Nov 1 08:27:56 2001'
829 /var/apache2/2.2/logs/suexec_log -P 'Thu Nov 1 08:27:56 2001'
830 /var/apache2/2.2/logs/mod_jserv.log -P 'Thu Nov 1 08:27:56 2001'
831 /var/apache2/2.2/logs/jserv.log -P 'Thu Nov 1 08:27:56 2001'
832 EOF
833
834 set_file('checktest', <<'EOF');
835 [ -s std.err ] && { cat std.err; exit 1; }
836 exec /bin/diff std.out.expect std.out
837 EOF
838
839 set_file('runtest', <<"EOF");
840 # test "logadmV1"
841 $envsetup
842 exec $bindir/logadm -f testfile.conf -F testfile.conf -V >std.out 2>std.err
843 EOF
844 }
845
846 ###########################################################################
847 #
848 # logadmV2 -- test of "logadm -V <entry>"
849 #
850 ###########################################################################
851 sub logadmV2 {
|