ACC SHELL
Path : /usr/lib/zypp/ |
|
Current File : //usr/lib/zypp/notify-message |
#! /bin/bash
######################################################################
test "$1" = "--help" && {
cat <<EOF
Usage: notify-message [-p PACKAGE]
Per default zypp invokes this command to propagate update
notification messages. The optional -p argument should
denote the packages that causes this message to be sent.
The message text itself is read from stdin.
See update.messages.notify option in /etc/zypp.conf
for details.
EOF
exit 0;
}
######################################################################
MAILCMD="/usr/bin/mail"
test -x "$MAILCMD" || {
echo "notify-message: $MAILCMD: command not found" >&2
exit 1;
}
MAILTAG="[zypp-notify-message]"
MAIL_TO="root"
# curently just '-p packageident'
test "$1" = "-p" && {
MAILTAG="$MAILTAG $2"
}
exec $MAILCMD -s "$MAILTAG" $MAIL_TO
ACC SHELL 2018