From 8feea829a7d522228e2d5c5ebc3e42bb750d5c1d Mon Sep 17 00:00:00 2001 From: Eugeni Dodonov Date: Tue, 24 Mar 2009 13:34:07 +0000 Subject: Sending correct notify messages. --- cron-sh/diff_check.sh | 5 +++-- cron-sh/security.sh | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'cron-sh') diff --git a/cron-sh/diff_check.sh b/cron-sh/diff_check.sh index 772edb3..5f020cc 100755 --- a/cron-sh/diff_check.sh +++ b/cron-sh/diff_check.sh @@ -209,11 +209,12 @@ if [[ -s ${TMP} ]]; then echo -e "\n\n*** Diff Check, ${date} ***\n" >> ${SECURITY_LOG} cat ${TMP} >> ${SECURITY_LOG} - Notifylog "MSEC has performed Diff Check on ${hostname} on ${date}\nChanges in system security were detected and are available in ${SECURITY_LOG}." + Notifylog "MSEC has performed Diff Check on ${hostname} on ${date}. Changes in system security were detected and are available in ${SECURITY_LOG}." +else + Notifylog "MSEC has performed Diff Check on ${hostname} on ${date}. No changes were detected in system security." fi Maillog "[msec] *** Diff Check on ${hostname}, ${date} ***" "${TMP}" -Notifylog "MSEC has performed Diff Check on ${hostname} on ${date}\nNo changes were detected in system security." if [[ -f ${TMP} ]]; then rm -f ${TMP} diff --git a/cron-sh/security.sh b/cron-sh/security.sh index 19f6d8e..7b26119 100755 --- a/cron-sh/security.sh +++ b/cron-sh/security.sh @@ -243,8 +243,8 @@ EOF Notifylog() { if [ ${NOTIFY_WARN} == yes ]; then message=${1} - DBUS_SEND=`which DBUS_SEND 2>/dev/null` - if [ -x "$DBUS_SEND" -a -s ${message} ]; then + DBUS_SEND=`which dbus-send 2>/dev/null` + if [ -x "$DBUS_SEND" ]; then $DBUS_SEND --system --type=signal /com/mandriva/user com.mandriva.user.security_notification string:"$message" fi fi -- cgit v1.2.1