[Pkg-ossec-devel] [SCM] Git repository for pkg-ossec branch, debian, updated. f89fb2c00b1a2606035e5cd0e35b4ebe99f049ac
Javier Fernandez-Sanguino
jfs at debian.org
Wed Aug 29 12:57:47 UTC 2012
The following commit has been merged in the debian branch:
commit ecfe082b21b83d024b99891f10307113007afa98
Author: Javier Fernandez-Sanguino <jfs at debian.org>
Date: Wed Aug 29 01:05:54 2012 +0200
Fix the logic, send to logfile when not debugging. Do not
ask admins to review the logfile if debugging (since output is shown on
screen)
diff --git a/debian/ossec-hids-agent.init b/debian/ossec-hids-agent.init
index e649bec..66b4cf1 100755
--- a/debian/ossec-hids-agent.init
+++ b/debian/ossec-hids-agent.init
@@ -77,7 +77,7 @@ do_test_rules()
#
do_start()
{
- [ -n "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
+ [ -z "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
${DIRECTORY}/bin/ossec-control start $OUT
return $?
# TODO REVIEW - Return
@@ -87,7 +87,7 @@ do_start()
}
do_stop() {
- [ -n "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
+ [ -z "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
${DIRECTORY}/bin/ossec-control stop $OUT
return $?
# TODO REVIEW - Return
@@ -98,7 +98,7 @@ do_stop() {
}
do_status() {
- [ -n "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
+ [ -z "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
${DIRECTORY}/bin/ossec-control status $OUT
return $?
}
@@ -112,7 +112,7 @@ case "$1" in
if [ $myret -eq 0 ] ; then
log_end_msg 0
else
- log_failure_msg "review the logfile $LOGFILE"
+ [ -z "$DEBIAN_SCRIPT_DEBUG" ] && log_failure_msg "review the logfile $LOGFILE"
log_end_msg 1
fi
exit $myret
@@ -124,7 +124,7 @@ case "$1" in
if [ $myret -eq 0 ] ; then
log_end_msg 0
else
- log_failure_msg "review the logfile $LOGFILE"
+ [ -z "$DEBIAN_SCRIPT_DEBUG" ] && log_failure_msg "review the logfile $LOGFILE"
log_end_msg 1
fi
exit $myret
@@ -143,7 +143,7 @@ case "$1" in
;;
*)
# Failed to stop
- log_failure_msg "review the logfile $LOGFILE"
+ [ -z "$DEBIAN_SCRIPT_DEBUG" ] && log_failure_msg "review the logfile $LOGFILE"
log_end_msg 1
;;
esac
diff --git a/debian/ossec-hids-local.init b/debian/ossec-hids-local.init
index 2b369c9..966735e 100755
--- a/debian/ossec-hids-local.init
+++ b/debian/ossec-hids-local.init
@@ -77,7 +77,7 @@ do_test_rules()
#
do_start()
{
- [ -n "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
+ [ -z "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
${DIRECTORY}/bin/ossec-control start $OUT
return $?
# TODO REVIEW - Return
@@ -87,7 +87,7 @@ do_start()
}
do_stop() {
- [ -n "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
+ [ -z "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
${DIRECTORY}/bin/ossec-control stop $OUT
return $?
# TODO REVIEW - Return
@@ -98,7 +98,7 @@ do_stop() {
}
do_status() {
- [ -n "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
+ [ -z "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
${DIRECTORY}/bin/ossec-control status $OUT
return $?
}
@@ -112,7 +112,7 @@ case "$1" in
if [ $myret -eq 0 ] ; then
log_end_msg 0
else
- log_failure_msg "review the logfile $LOGFILE"
+ [ -z "$DEBIAN_SCRIPT_DEBUG" ] && log_failure_msg "review the logfile $LOGFILE"
log_end_msg 1
fi
exit $myret
@@ -124,7 +124,7 @@ case "$1" in
if [ $myret -eq 0 ] ; then
log_end_msg 0
else
- log_failure_msg "review the logfile $LOGFILE"
+ [ -z "$DEBIAN_SCRIPT_DEBUG" ] && log_failure_msg "review the logfile $LOGFILE"
log_end_msg 1
fi
exit $myret
@@ -155,7 +155,7 @@ case "$1" in
if [ $myret -eq 0 ] ; then
log_end_msg 0
else
- log_failure_msg "review the logfile $LOGFILE"
+ [ -z "$DEBIAN_SCRIPT_DEBUG" ] && log_failure_msg "review the logfile $LOGFILE"
log_end_msg 1
fi
exit $myret
diff --git a/debian/ossec-hids-server.init b/debian/ossec-hids-server.init
index 0568fa1..3c804e7 100755
--- a/debian/ossec-hids-server.init
+++ b/debian/ossec-hids-server.init
@@ -77,7 +77,7 @@ do_test_rules()
#
do_start()
{
- [ -n "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
+ [ -z "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
${DIRECTORY}/bin/ossec-control start $OUT
return $?
# TODO REVIEW - Return
@@ -87,7 +87,7 @@ do_start()
}
do_stop() {
- [ -n "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
+ [ -z "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
${DIRECTORY}/bin/ossec-control stop $OUT
return $?
# TODO REVIEW - Return
@@ -98,7 +98,7 @@ do_stop() {
}
do_status() {
- [ -n "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
+ [ -z "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
${DIRECTORY}/bin/ossec-control status $OUT
return $?
}
@@ -112,7 +112,7 @@ case "$1" in
if [ $myret -eq 0 ] ; then
log_end_msg 0
else
- log_failure_msg "review the logfile $LOGFILE"
+ [ -z "$DEBIAN_SCRIPT_DEBUG" ] && log_failure_msg "review the logfile $LOGFILE"
log_end_msg 1
fi
exit $myret
@@ -124,7 +124,7 @@ case "$1" in
if [ $myret -eq 0 ] ; then
log_end_msg 0
else
- log_failure_msg "review the logfile $LOGFILE"
+ [ -z "$DEBIAN_SCRIPT_DEBUG" ] && log_failure_msg "review the logfile $LOGFILE"
log_end_msg 1
fi
exit $myret
@@ -143,7 +143,7 @@ case "$1" in
;;
*)
# Failed to stop
- log_failure_msg "review the logfile $LOGFILE"
+ [ -z "$DEBIAN_SCRIPT_DEBUG" ] && log_failure_msg "review the logfile $LOGFILE"
log_end_msg 1
;;
esac
@@ -155,7 +155,7 @@ case "$1" in
if [ $myret -eq 0 ] ; then
log_end_msg 0
else
- log_failure_msg "review the logfile $LOGFILE"
+ [ -z "$DEBIAN_SCRIPT_DEBUG" ] && log_failure_msg "review the logfile $LOGFILE"
log_end_msg 1
fi
exit $myret
--
Git repository for pkg-ossec
More information about the Pkg-ossec-devel
mailing list