dev_down.sh - Oracle HSM device down notification script
∕etc∕opt∕SUNWsamfs∕scripts∕dev_down.sh
prg_name
pid
log_level
msg_no
eq
SUNWsamfs
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 ∕opt∕SUNWsamfs∕examples∕dev_down.sh
to ∕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:
The name of the program that is calling this script.
The process ID of the program that is calling this script.
Log priority level.
An integer number such
that 0
≤ log_level ≤ 7
.
0
is highest priority, and 7
is lowest priority.
The message number as found in the message catalog.
The Equipment Number of the device.
The following is an example ∕etc∕opt∕SUNWsamfs∕scripts∕dev_down.sh
file:
#!∕bin∕sh # # ∕etc∕opt∕SUNWsamfs∕scripts∕dev_down.sh - Take action in the # event a device is marked down by the Oracle HSM 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 "Oracle HSM Device downed" root EOF `date` Oracle HSM has marked the device $5, as down or off. Check device log. EOF
The example sends email to root to report that a device has been
marked down
or off
.