summaryrefslogtreecommitdiffstats
path: root/initscript
diff options
context:
space:
mode:
Diffstat (limited to 'initscript')
-rw-r--r--initscript/Makefile.am4
-rw-r--r--initscript/archlinux/Makefile.am2
-rw-r--r--initscript/archlinux/avahi-daemon.in2
-rwxr-xr-xinitscript/archlinux/avahi-dnsconfd.in2
-rw-r--r--initscript/darwin/Makefile.am4
-rw-r--r--initscript/debian/Makefile.am2
-rwxr-xr-xinitscript/debian/avahi-daemon.in2
-rwxr-xr-xinitscript/debian/avahi-dnsconfd.in2
-rw-r--r--initscript/fedora/Makefile.am12
-rw-r--r--initscript/fedora/avahi-daemon.in45
-rw-r--r--initscript/fedora/avahi-dnsconfd.in59
-rw-r--r--initscript/freebsd/Makefile.am2
-rw-r--r--initscript/gentoo/Makefile.am4
-rw-r--r--initscript/gentoo/avahi-daemon.in1
-rw-r--r--initscript/gentoo/avahi-dnsconfd.in1
-rw-r--r--initscript/lfs/Makefile.am2
-rw-r--r--initscript/mandriva/Makefile.am2
-rw-r--r--initscript/mandriva/avahi-daemon.in2
-rw-r--r--initscript/slackware/Makefile.am2
-rw-r--r--initscript/slackware/avahi-daemon.in2
-rw-r--r--initscript/slackware/avahi-dnsconfd.in2
-rw-r--r--initscript/suse/Makefile.am2
-rw-r--r--initscript/suse/avahi-daemon.in2
23 files changed, 57 insertions, 103 deletions
diff --git a/initscript/Makefile.am b/initscript/Makefile.am
index d5fadda..e5e1928 100644
--- a/initscript/Makefile.am
+++ b/initscript/Makefile.am
@@ -1,5 +1,3 @@
-# $Id$
-
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
@@ -17,7 +15,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
-SUBDIRS =
+SUBDIRS =
if TARGET_LFS
SUBDIRS += lfs
diff --git a/initscript/archlinux/Makefile.am b/initscript/archlinux/Makefile.am
index 22096b4..2070975 100644
--- a/initscript/archlinux/Makefile.am
+++ b/initscript/archlinux/Makefile.am
@@ -1,5 +1,3 @@
-# $Id: Makefile.am 267 2005-08-08 10:19:22Z lennart $
-
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
diff --git a/initscript/archlinux/avahi-daemon.in b/initscript/archlinux/avahi-daemon.in
index 1050cb0..6ae252d 100644
--- a/initscript/archlinux/avahi-daemon.in
+++ b/initscript/archlinux/avahi-daemon.in
@@ -1,7 +1,5 @@
#!/bin/bash
-# $Id$
-
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
diff --git a/initscript/archlinux/avahi-dnsconfd.in b/initscript/archlinux/avahi-dnsconfd.in
index 667a0f6..c57260e 100755
--- a/initscript/archlinux/avahi-dnsconfd.in
+++ b/initscript/archlinux/avahi-dnsconfd.in
@@ -1,7 +1,5 @@
#!/bin/bash
-# $Id$
-
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
diff --git a/initscript/darwin/Makefile.am b/initscript/darwin/Makefile.am
index 3c5cecc..d01e5a4 100644
--- a/initscript/darwin/Makefile.am
+++ b/initscript/darwin/Makefile.am
@@ -1,5 +1,3 @@
-# $Id$
-
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
@@ -33,8 +31,6 @@ CLEANFILES = \
org.freedesktop.avahi-daemon.plist: org.freedesktop.avahi-daemon.plist.in
sed -e 's,@sbindir\@,$(sbindir),g' $< > $@
- chmod +x $@
org.freedesktop.avahi-dnsconfd.plist: org.freedesktop.avahi-dnsconfd.plist.in
sed -e 's,@sbindir\@,$(sbindir),g' $< > $@
- chmod +x $@
diff --git a/initscript/debian/Makefile.am b/initscript/debian/Makefile.am
index 7991ea6..314983d 100644
--- a/initscript/debian/Makefile.am
+++ b/initscript/debian/Makefile.am
@@ -1,5 +1,3 @@
-# $Id$
-
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
diff --git a/initscript/debian/avahi-daemon.in b/initscript/debian/avahi-daemon.in
index 30a2c2f..97fa157 100755
--- a/initscript/debian/avahi-daemon.in
+++ b/initscript/debian/avahi-daemon.in
@@ -1,7 +1,5 @@
#!/bin/sh
-# $Id$
-
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
diff --git a/initscript/debian/avahi-dnsconfd.in b/initscript/debian/avahi-dnsconfd.in
index ac34804..67c2873 100755
--- a/initscript/debian/avahi-dnsconfd.in
+++ b/initscript/debian/avahi-dnsconfd.in
@@ -1,7 +1,5 @@
#!/bin/sh
-# $Id$
-
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
diff --git a/initscript/fedora/Makefile.am b/initscript/fedora/Makefile.am
index e18f0f6..2e2f017 100644
--- a/initscript/fedora/Makefile.am
+++ b/initscript/fedora/Makefile.am
@@ -1,5 +1,3 @@
-# $Id$
-
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
@@ -26,9 +24,15 @@ initd_SCRIPTS = avahi-daemon avahi-dnsconfd
CLEANFILES = avahi-daemon avahi-dnsconfd
avahi-daemon: avahi-daemon.in
- sed -e 's,@sbindir\@,$(sbindir),g' $< > $@
+ $(AM_V_GEN)sed \
+ -e 's,@sbindir\@,$(sbindir),g' \
+ -e 's,@localstatedir\@,$(localstatedir),g' \
+ $< > $@ && \
chmod +x $@
avahi-dnsconfd: avahi-dnsconfd.in
- sed -e 's,@sbindir\@,$(sbindir),g' $< > $@
+ $(AM_V_GEN)sed \
+ -e 's,@sbindir\@,$(sbindir),g' \
+ -e 's,@localstatedir\@,$(localstatedir),g' \
+ $< > $@ && \
chmod +x $@
diff --git a/initscript/fedora/avahi-daemon.in b/initscript/fedora/avahi-daemon.in
index c5b3230..b1b6124 100644
--- a/initscript/fedora/avahi-daemon.in
+++ b/initscript/fedora/avahi-daemon.in
@@ -1,16 +1,17 @@
-#! /bin/sh
+#!/bin/sh
#
-# avahi-daemon: Starts the Avahi Daemon
+# avahi-daemon: Starts the Avahi Daemon
#
-# chkconfig: 345 24 02
+# chkconfig: 345 24 02
# description: This is a daemon which runs on client machines to perform \
# Zeroconf service discovery on a network. avahi-daemon must be \
# running on systems that use Avahi for service discovery. \
# Avahi-daemon should not be running otherwise.
# processname: avahi-daemon
-# config:
+# pidfile: @localstatedir@/run/avahi-daemon/pid
AVAHI_BIN=@sbindir@/avahi-daemon
+AVAHI_OPTS="-D"
if [ "$1" = 'status' ]; then
test -x $AVAHI_BIN || exit 4
@@ -18,13 +19,13 @@ else
test -x $AVAHI_BIN || exit 5
fi
-OTHER_AVAHI_OPTS=""
-
# Source function library.
. /etc/init.d/functions
. /etc/sysconfig/network
-LOCKFILE=/var/lock/subsys/avahi-daemon
+LOCKFILE=@localstatedir@/lock/subsys/avahi-daemon
+PIDFILE=@localstatedir@/run/avahi-daemon/pid
+RETVAL=0
base=${0##*/}
@@ -36,33 +37,26 @@ start() {
if [ -s /etc/localtime ]; then
cp -fp /etc/localtime /etc/avahi/etc >/dev/null 2>&1
fi;
- $AVAHI_BIN -D
- RETVAL=$?
- if [ $RETVAL = 0 ]; then
- touch $LOCKFILE
- success $"$base startup"
- else
- failure $"$base startup"
- fi
- echo
+ daemon --pidfile=${PIDFILE} $AVAHI_BIN $AVAHI_OPTS
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch ${LOCKFILE}
return $RETVAL
}
stop() {
echo -n $"Shutting down Avahi daemon: "
- $AVAHI_BIN -k
- RETVAL=$?
- [ $RETVAL = 0 ] && success $"$base shutdown" || failure $"$base shutdown"
- rm -f $LOCKFILE
- echo
+ killproc -p ${PIDFILE} $AVAHI_BIN
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && rm -f ${LOCKFILE} ${PIDFILE}
+ echo
return $RETVAL
}
reload() {
echo -n $"Reloading Avahi daemon... "
- $AVAHI_BIN -r
+ killproc -p ${PIDFILE} $AVAHI_BIN -HUP
RETVAL=$?
- [ $RETVAL = 0 ] && success $"$base reload" || failure $"$base reload"
echo
return $RETVAL
}
@@ -83,9 +77,8 @@ case "$1" in
stop
;;
status)
- $AVAHI_BIN -c
- RETVAL=$?
- [ $RETVAL = 0 ] && echo $"Avahi daemon is running" || echo $"Avahi daemon is not running"
+ status -p ${PIDFILE} $AVAHI_BIN
+ RETVAL=$?
;;
restart)
restart
diff --git a/initscript/fedora/avahi-dnsconfd.in b/initscript/fedora/avahi-dnsconfd.in
index de49d7f..df8b964 100644
--- a/initscript/fedora/avahi-dnsconfd.in
+++ b/initscript/fedora/avahi-dnsconfd.in
@@ -1,16 +1,17 @@
-#! /bin/sh
+#!/bin/sh
#
-# avahi-dnsconfd: Starts the Avahi dns configuration daemon
+# avahi-dnsconfd: Starts the Avahi dns configuration daemon
#
-# chkconfig: - 96 02
+# chkconfig: - 96 02
# description: avahi-dnsconfd connects to a running avahi-daemon and runs the script \
-# /etc/avahi/dnsconf.action for each unicast DNS server that is announced \
-# on the local LAN. This is useful for configuring unicast DNS servers in \
-# a DHCP-like fashion with mDNS.
+# /etc/avahi/dnsconf.action for each unicast DNS server that is announced \
+# on the local LAN. This is useful for configuring unicast DNS servers in \
+# a DHCP-like fashion with mDNS.
# processname: avahi-dnsconfd
-# config:
+# pidfile: @localstatedir@/run/avahi-dnsconfd.pid
AVAHI_BIN=@sbindir@/avahi-dnsconfd
+AVAHI_OPTS="-D"
if [ "$1" = 'status' ]; then
test -x $AVAHI_BIN || exit 4
@@ -18,13 +19,13 @@ else
test -x $AVAHI_BIN || exit 5
fi
-OTHER_AVAHI_OPTS=""
-
# Source function library.
. /etc/init.d/functions
. /etc/sysconfig/network
-LOCKFILE=/var/lock/subsys/avahi-dnsconfd
+LOCKFILE=@localstatedir@/lock/subsys/avahi-dnsconfd
+PIDFILE=@localstatedir@/run/avahi-dnsconfd.pid
+RETVAL=0
base=${0##*/}
@@ -33,35 +34,28 @@ start() {
[ ${NETWORKING} = "no" ] && exit 1
echo -n $"Starting Avahi DNS daemon... "
- $AVAHI_BIN -D
- RETVAL=$?
- if [ $RETVAL = 0 ]; then
- touch $LOCKFILE
- success $"$base startup"
- else
- failure $"$base startup"
- fi
- echo
- return $RETVAL
+ daemon --pidfile=${PIDFILE} $AVAHI_BIN $AVAHI_OPTS
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch ${LOCKFILE}
+ return $RETVAL
}
stop() {
echo -n $"Shutting down Avahi DNS daemon: "
- $AVAHI_BIN -k
- RETVAL=$?
- [ $RETVAL = 0 ] && success $"$base shutdown" || failure $"$base shutdown"
- rm -f $LOCKFILE
- echo
- return $RETVAL
+ killproc -p ${PIDFILE} $AVAHI_BIN
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && rm -f ${LOCKFILE} ${PIDFILE}
+ echo
+ return $RETVAL
}
reload() {
echo -n $"Reloading Avahi DNS daemon... "
- $AVAHI_BIN -r
- RETVAL=$?
- [ $RETVAL = 0 ] && success $"$base startup" || failure $"$base startup"
- echo
- return $RETVAL
+ killproc -p ${PIDFILE} $AVAHI_BIN -HUP
+ RETVAL=$?
+ echo
+ return $RETVAL
}
restart() {
@@ -80,9 +74,8 @@ case "$1" in
stop
;;
status)
- $AVAHI_BIN -c
+ status -p ${PIDFILE} $AVAHI_BIN
RETVAL=$?
- [ $RETVAL = 0 ] && echo $"Avahi DNS daemon is running" || echo $"Avahi DNS daemon is not running"
;;
restart)
restart
diff --git a/initscript/freebsd/Makefile.am b/initscript/freebsd/Makefile.am
index 0ee75d5..c32830e 100644
--- a/initscript/freebsd/Makefile.am
+++ b/initscript/freebsd/Makefile.am
@@ -1,5 +1,3 @@
-# $Id$
-
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
diff --git a/initscript/gentoo/Makefile.am b/initscript/gentoo/Makefile.am
index 398e345..0d20ca6 100644
--- a/initscript/gentoo/Makefile.am
+++ b/initscript/gentoo/Makefile.am
@@ -1,5 +1,3 @@
-# $Id$
-
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
@@ -36,7 +34,7 @@ CLEANFILES = \
avahi-dnsconfd
avahi-daemon: avahi-daemon.in
-
+
sed -e 's,@sbindir\@,$(sbindir),g; $(NO_DBUS_DEPENDENCY)' $< > $@
chmod +x $@
diff --git a/initscript/gentoo/avahi-daemon.in b/initscript/gentoo/avahi-daemon.in
index 25edb2a..02eefe6 100644
--- a/initscript/gentoo/avahi-daemon.in
+++ b/initscript/gentoo/avahi-daemon.in
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# $Id$
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/initscript/gentoo/avahi-dnsconfd.in b/initscript/gentoo/avahi-dnsconfd.in
index 18efc05..376067e 100644
--- a/initscript/gentoo/avahi-dnsconfd.in
+++ b/initscript/gentoo/avahi-dnsconfd.in
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# $Id$
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/initscript/lfs/Makefile.am b/initscript/lfs/Makefile.am
index d5e33f8..e8386e8 100644
--- a/initscript/lfs/Makefile.am
+++ b/initscript/lfs/Makefile.am
@@ -1,5 +1,3 @@
-# $Id$
-
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
diff --git a/initscript/mandriva/Makefile.am b/initscript/mandriva/Makefile.am
index 10fd4cf..480426b 100644
--- a/initscript/mandriva/Makefile.am
+++ b/initscript/mandriva/Makefile.am
@@ -1,5 +1,3 @@
-# $Id: Makefile.am 838 2005-10-22 21:23:02Z lennart $
-
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
diff --git a/initscript/mandriva/avahi-daemon.in b/initscript/mandriva/avahi-daemon.in
index f285d3b..d81b9a2 100644
--- a/initscript/mandriva/avahi-daemon.in
+++ b/initscript/mandriva/avahi-daemon.in
@@ -17,7 +17,7 @@ test -x $AVAHI_BIN || exit 5
. /etc/sysconfig/network
# Check that networking is configured.
-[ ${NETWORKING} = "no" ] && exit 0
+[ "${NETWORKING}" = "no" ] && exit 0
start() {
echo -n $"Starting Avahi daemon: "
diff --git a/initscript/slackware/Makefile.am b/initscript/slackware/Makefile.am
index 3175a15..d415387 100644
--- a/initscript/slackware/Makefile.am
+++ b/initscript/slackware/Makefile.am
@@ -1,5 +1,3 @@
-# $Id$
-
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
diff --git a/initscript/slackware/avahi-daemon.in b/initscript/slackware/avahi-daemon.in
index acd377d..76bf2f2 100644
--- a/initscript/slackware/avahi-daemon.in
+++ b/initscript/slackware/avahi-daemon.in
@@ -1,7 +1,5 @@
#!/bin/bash
-# $Id$
-
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
diff --git a/initscript/slackware/avahi-dnsconfd.in b/initscript/slackware/avahi-dnsconfd.in
index 4da14fa..ea1554d 100644
--- a/initscript/slackware/avahi-dnsconfd.in
+++ b/initscript/slackware/avahi-dnsconfd.in
@@ -1,7 +1,5 @@
#!/bin/bash
-# $Id$
-
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
diff --git a/initscript/suse/Makefile.am b/initscript/suse/Makefile.am
index e18f0f6..5624bdc 100644
--- a/initscript/suse/Makefile.am
+++ b/initscript/suse/Makefile.am
@@ -1,5 +1,3 @@
-# $Id$
-
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
diff --git a/initscript/suse/avahi-daemon.in b/initscript/suse/avahi-daemon.in
index e1fd201..851006c 100644
--- a/initscript/suse/avahi-daemon.in
+++ b/initscript/suse/avahi-daemon.in
@@ -37,7 +37,7 @@ case "$1" in
;;
status)
echo -n "Checking for Avahi daemon: "
- $AVAHI_BIN -c
+ $AVAHI_BIN -c || _rc_status=3
rc_status -v
;;
*)