/[check-dmesg]/trunk/check-dmesg.sh
ViewVC logotype

Annotation of /trunk/check-dmesg.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (hide annotations) (download)
2011-03-18T12:55:48Z (13 years, 7 months ago) by trond
Content type: text/plain
File size: 457 byte(s)
Førstegangsregistrering.

1 trond 1 #!/bin/sh
2    
3     # $Ximalas$
4    
5     PATH=/bin:/sbin:/usr/bin
6    
7     DMESG_BASE=/tmp
8     DMESG_OLD=${DMESG_BASE}/dmesg.old
9     DMESG_NEW=${DMESG_BASE}/dmesg.new
10     DMESG_DIFF=${DMESG_BASE}/dmesg.diff
11    
12     DIFF_PARAM="-u"
13    
14     RCPT=trond@localhost
15    
16     if [ ! -f ${DMESG_OLD} ]; then
17     dmesg > ${DMESG_OLD};
18     fi
19    
20     dmesg > ${DMESG_NEW}
21    
22     if ! diff ${DIFF_PARAM} ${DMESG_OLD} ${DMESG_NEW} > ${DMESG_DIFF}; then
23     mail -s "dmesg changed" ${RCPT} < ${DMESG_DIFF};
24     mv ${DMESG_NEW} ${DMESG_OLD};
25     fi
26    
27     exit 0

Properties

Name Value
svn:eol-style native
svn:executable *
svn:keywords Ximalas=%H
svn:mime-type text/plain

svn@ximalas.info
ViewVC Help
Powered by ViewVC 1.3.0-dev