Resend folks:

On 2016-10-19 Wed 14:19 PM |, Craig Skinner wrote:
> Hi,
> 
> With dmesg's new -s flag, append each boot's full log to a new
> /var/log/dmesg semi-private log file.
> 
> Inspired by Alexander Hall's recent post:
> http://marc.info/?l=openbsd-misc&m=147674181621645
> 
> This works for me (on 5.9) & rotates correctly:
> 
> 
> 
> Index: rc
> ===================================================================
> RCS file: /cvs/src/etc/rc,v
> retrieving revision 1.486
> diff -u -p -r1.486 rc
> --- rc        10 Jul 2016 09:08:18 -0000      1.486
> +++ rc        19 Oct 2016 13:04:04 -0000
> @@ -563,4 +563,7 @@ start_daemon apmd sensorsd hotplugd watc
>  echo '.'
>  
>  date
> -exit 0
> +umask 027
> +dmesg >>/var/log/dmesg
> +dmesg -s >>/var/log/dmesg
> +umask 022
> Index: newsyslog.conf
> ===================================================================
> RCS file: /cvs/src/etc/newsyslog.conf,v
> retrieving revision 1.35
> diff -u -p -r1.35 newsyslog.conf
> --- newsyslog.conf    1 Jun 2016 16:57:07 -0000       1.35
> +++ newsyslog.conf    19 Oct 2016 13:04:04 -0000
> @@ -10,6 +10,7 @@
>  /var/log/lpd-errs                    640  7     10   *     Z
>  /var/log/maillog                     640  7     *    24    Z
>  /var/log/messages                    644  5     300  *     Z
> +/var/log/dmesg                               640  3     100  *     Z
>  /var/log/secure                              600  7     *    168   Z
>  /var/log/wtmp                                644  7     *    $W6D4 B
>  /var/log/xferlog                     640  7     250  *     Z
> 

-- 
Craig Skinner | http://linkd.in/yGqkv7

Reply via email to