From a06ea57c08ec1bbd267c3be823d2575300371b3f Mon Sep 17 00:00:00 2001 From: jvdias Date: Fri, 28 Oct 2005 20:12:12 +0000 Subject: check for -D option properly --- named.init | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'named.init') diff --git a/named.init b/named.init index ffe8260..a5a2a79 100755 --- a/named.init +++ b/named.init @@ -67,14 +67,19 @@ start() { if ! egrep -q "/proc ${ROOTDIR}/proc" /proc/mounts; then mount --bind /proc ${ROOTDIR}/proc >/dev/null 2>&1 fi - if echo "$OPTIONS" | egrep -q '(\<|['"'"'"\ ])-D(\>|['"'"'"\ ])'; then + dbus=0; + for a in $OPTIONS; do + if [ $a = "-D" ]; then + dbus=1; + fi; + done + if [ $dbus -eq 1 ]; then if ! /bin/mount | egrep -q "^/var/run/dbus/system_bus_socket on ${ROOTDIR}/var/run/dbus/system_bus_socket"; then mkdir -p ${ROOTDIR}/var/run/dbus touch ${ROOTDIR}/var/run/dbus/system_bus_socket; mount --bind /var/run/dbus/system_bus_socket ${ROOTDIR}/var/run/dbus/system_bus_socket > /dev/null 2>&1; fi; - fi; - + fi; fi no_write_master_zones=0 if [ -e /etc/selinux/config ]; then -- cgit