SOURCES: auditd.init (NEW), auditd.sysconfig (NEW) - PLDified from...

qboosh qboosh at pld-linux.org
Sun Aug 28 17:20:03 CEST 2005


Author: qboosh                       Date: Sun Aug 28 15:20:02 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- PLDified from files included in package

---- Files affected:
SOURCES:
   auditd.init (NONE -> 1.1)  (NEW), auditd.sysconfig (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/auditd.init
diff -u /dev/null SOURCES/auditd.init:1.1
--- /dev/null	Sun Aug 28 17:20:03 2005
+++ SOURCES/auditd.init	Sun Aug 28 17:19:57 2005
@@ -0,0 +1,86 @@
+#!/bin/sh
+#
+# auditd        This starts and stops auditd
+#
+# chkconfig: 2345 18 87
+# description: This starts the Linux Auditing System Daemon
+#
+# processname: /sbin/auditd
+# config: /etc/sysconfig/auditd
+# config: /etc/auditd.conf
+# pidfile: /var/run/auditd.pid
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+AUDITD_CLEAN_STOP=yes
+EXTRAOPTIONS=
+
+# Get service config - may override defaults
+[ -f /etc/sysconfig/auditd ] && . /etc/sysconfig/auditd
+
+RETVAL=0
+
+# See how we were called.
+case "$1" in
+  start)
+    	if [ ! -f /var/lock/subsys/auditd ]; then
+		# show "Starting %s service" auditd
+		msg_starting auditd
+		unset HOME MAIL USER USERNAME
+		daemon auditd "$EXTRAOPTIONS"
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/auditd
+		# Load the default rules
+		[ -f /etc/audit.rules ] && /sbin/auditctl -R /etc/audit.rules >/dev/null
+	else
+		# show "%s service is already running." auditd
+		msg_already_running auditd
+	fi
+	;;
+  stop)
+	if [ -f /var/lock/subsys/auditd ]; then
+		# Stop daemons.
+		# show "Stopping %s service" auditd
+		msg_stopping auditd
+		killproc auditd
+		rm -f /var/lock/subsys/auditd
+		# Remove watches so shutdown works cleanly
+		if ! is_no "$AUDITD_CLEAN_STOP"; then
+			/sbin/auditctl -D >/dev/null
+		fi
+	else
+		# show "%s service is not running." auditd
+		msg_not_running auditd
+	fi
+	;;
+  restart)
+	$0 stop
+	$0 start
+	exit $?
+	;;
+  reload|force-reload)
+	if [ -f /var/lock/subsys/auditd ]; then
+		# show "Reload %s service" auditd
+		msg_reloading auditd
+		killproc auditd -HUP
+		RETVAL=$?
+	else
+		# show "%s service is not running." auditd
+		msg_not_running auditd >&2
+		RETVAL=7
+	fi
+	;;
+  status)
+	status auditd
+	RETVAL=$?
+	;;
+  *)
+	# show "Usage: %s {start|stop|restart|reload|force-reload|status}"
+	msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+	RETVAL=3
+esac
+
+exit $RETVAL

================================================================
Index: SOURCES/auditd.sysconfig
diff -u /dev/null SOURCES/auditd.sysconfig:1.1
--- /dev/null	Sun Aug 28 17:20:03 2005
+++ SOURCES/auditd.sysconfig	Sun Aug 28 17:19:57 2005
@@ -0,0 +1,15 @@
+# Customized settings for auditd
+
+# Nice level for auditd
+# SERVICE_RUN_NICE_LEVEL=0
+
+# Extra options for auditd
+# EXTRAOPTIONS=
+
+# You can set audit locale here
+# LC_ALL=C
+
+# This option is used to determine if rules & watches should be deleted on
+# shutdown. This is beneficial in most cases so that a watch doesn't linger
+# on a drive that is being unmounted. If set to no, it will NOT be cleaned up.
+AUDITD_CLEAN_STOP=yes
================================================================



More information about the pld-cvs-commit mailing list