aboutsummaryrefslogtreecommitdiffstats
path: root/get-free-syslog-facility
diff options
context:
space:
mode:
Diffstat (limited to 'get-free-syslog-facility')
-rwxr-xr-xget-free-syslog-facility11
1 files changed, 11 insertions, 0 deletions
diff --git a/get-free-syslog-facility b/get-free-syslog-facility
new file mode 100755
index 0000000..8524844
--- /dev/null
+++ b/get-free-syslog-facility
@@ -0,0 +1,11 @@
+#!/bin/sh
+# $Id$
+# helper script for rpm scriptlets to get a free syslog local facility
+
+if [ -f /etc/syslog.conf ]; then
+ cntlog=0
+ while grep -q local${cntlog} /etc/syslog.conf; do
+ cntlog=$((cntlog+1));
+ done
+ echo local${cntlog}
+fi