aboutsummaryrefslogtreecommitdiffstats
path: root/get-free-syslog-facility
blob: 4bbdba109a850166404d4295be3c2bd3fe97c6b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
# $Id$
# helper script for rpm scriptlets to get a free syslog local facility

if [ -f /etc/syslog.conf ]; then
    for (( i=0; i <= 7; i++ )); do
	if ! grep -q "^local$i" /etc/syslog.conf; then
	    echo "local$i"
	    break
	fi
    done
fi