aboutsummaryrefslogtreecommitdiffstats
path: root/get-free-syslog-facility
diff options
context:
space:
mode:
authorGuillaume Rousse <guillomovitch@mandriva.org>2007-02-15 15:26:55 +0000
committerGuillaume Rousse <guillomovitch@mandriva.org>2007-02-15 15:26:55 +0000
commit78f657e1f5910b8778f7d9198e726068139ac928 (patch)
tree0469d74e7c612ccfa541177fcb3bda4f08983b6b /get-free-syslog-facility
parent48cd5ad23955ae2ec25a4d5b9d94f4292ae130bc (diff)
downloadrpm-helper-78f657e1f5910b8778f7d9198e726068139ac928.tar
rpm-helper-78f657e1f5910b8778f7d9198e726068139ac928.tar.gz
rpm-helper-78f657e1f5910b8778f7d9198e726068139ac928.tar.bz2
rpm-helper-78f657e1f5910b8778f7d9198e726068139ac928.tar.xz
rpm-helper-78f657e1f5910b8778f7d9198e726068139ac928.zip
get free syslog facility helper
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