~ubuntu-branches/ubuntu/dapper/mdadm/dapper

« back to all changes in this revision

Viewing changes to {arch}/++pristine-trees/unlocked/mdadm/mdadm--debian/mdadm--debian--1.12.0/pkg-mdadm-devel@lists.alioth.debian.org--2005/mdadm--debian--1.12.0--patch-2/misc/syslog-events

  • Committer: Package Import Robot
  • Author(s): Fabio M. Di Nitto
  • Date: 2005-11-28 07:35:36 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20051128073536-ph8pstb6ams9huk4
Tags: 1.12.0-1ubuntu1
Resyncronize with Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
# sample event handling script for mdadm
 
4
# e.g. mdadm --follow --program=/sbin/syslog-events --scan
 
5
#
 
6
# License: GPL ver.2
 
7
# Copyright (C) 2004 SEKINE Tatsuo <tsekine@sdri.co.jp>
 
8
 
 
9
event="$1"
 
10
dev="$2"
 
11
disc="$3"
 
12
 
 
13
facility="kern"
 
14
tag="mdmonitor"
 
15
 
 
16
case x"${event}" in
 
17
    xFail*) priority="error" ;;
 
18
    xTest*) priority="debug" ;;
 
19
    x*)     priority="info"  ;;
 
20
esac
 
21
 
 
22
msg="${event} event on ${dev}"
 
23
if [ x"${disc}" != x ]; then
 
24
     msg="${msg}, related to disc ${disc}"
 
25
fi
 
26
 
 
27
exec logger -t "${tag}" -p "${facility}.${priority}" -- "${msg}"