dev_down.sh - SAM-QFS device down notification script
/etc/opt/SUNWsamfs/scripts/dev_down.sh prg_name pid
log_level msg_no eq
The /etc/opt/SUNWsamfs/scripts/dev_down.sh script can be
executed by the sam-robotsd(1M) daemon when a device is
marked down or off.
To enable this feature, copy
/etc/opt/SUNWsamfs/scripts/dev_down.sh and modify it to take
the desired action for your installation.
As released, the /opt/SUNWsamfs/examples/dev_down.sh script
sends email to root with the relevant information.
This script accepts the following arguments:
prg_name The name of the program that is calling this
pid The process ID of the program that is calling this
log_level Log priority level. An integer number such that
0 < log_level < 7. 0 is highest priority, and 7
is lowest priority.
msg_no The message number as found in the message
eq The Equipment Number of the device.
The following is an example
# /etc/opt/SUNWsamfs/scripts/dev_down.sh - Take action in the
# event a device is marked down by the SAM-QFS software.
# arguments: $1: caller
# $2: caller's pid
# $3: logging level
# $4: message catalog number
# $5: device identifier
# Change the email address on the following line to send
# email to the appropriate recipient.
/usr/ucb/mail -s "SAM-QFS Device downed" root <<EOF
SAM-QFS has marked the device $5,
as down or off. Check device log.
The example sends email to root to report that a device has
been marked down or off.