summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--avahi-daemon/dbus-protocol.c5
-rw-r--r--configure.ac4
-rw-r--r--initscript/Gentoo/Makefile.am4
-rw-r--r--initscript/Gentoo/avahi.in20
4 files changed, 31 insertions, 2 deletions
diff --git a/avahi-daemon/dbus-protocol.c b/avahi-daemon/dbus-protocol.c
index 242ad59..2d1db32 100644
--- a/avahi-daemon/dbus-protocol.c
+++ b/avahi-daemon/dbus-protocol.c
@@ -53,7 +53,7 @@ do_register (DBusConnection *conn, DBusMessage *message)
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
- g_message ("Register received from: %s", s);
+ g_message ("Register received from: %s (dbus:% s)", s, dbus_message_get_sender (message));
return DBUS_HANDLER_RESULT_HANDLED;
}
@@ -92,10 +92,11 @@ signal_filter (DBusConnection *conn, DBusMessage *message, void *user_data)
} else if (dbus_message_is_signal (message,
#ifdef DBUS_USE_NEW_API
DBUS_INTERFACE_DBUS,
+ "NameAcquired"))
#else
DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS,
-#endif
"ServiceAcquired"))
+#endif
{
char *name;
diff --git a/configure.ac b/configure.ac
index 2bbea03..a141ad6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -186,6 +186,8 @@ else
case $with_distro in
debian)
;;
+ gentoo)
+ ;;
*)
echo "Your distribution (${with_distro}) is not yet supported! (patches welcome)"
exit 1
@@ -234,6 +236,8 @@ avahi-client/Makefile
initscript/Makefile
initscript/Debian/Makefile
initscript/Debian/75avahi
+initscript/Gentoo/Makefile
+initscript/Gentoo/avahi
avahi-dnsconfd/Makefile
])
AC_OUTPUT
diff --git a/initscript/Gentoo/Makefile.am b/initscript/Gentoo/Makefile.am
new file mode 100644
index 0000000..9d95673
--- /dev/null
+++ b/initscript/Gentoo/Makefile.am
@@ -0,0 +1,4 @@
+dbusinitddir = $(sysconfdir)/dbus-1/system.d
+dbusinitd_SCRIPTS = avahi
+
+EXTRA_DIST = $(dbusinitd_SCRIPTS)
diff --git a/initscript/Gentoo/avahi.in b/initscript/Gentoo/avahi.in
new file mode 100644
index 0000000..af26512
--- /dev/null
+++ b/initscript/Gentoo/avahi.in
@@ -0,0 +1,20 @@
+DAEMON=/usr/bin/avahi
+
+start() {
+ ebegin "Starting avahi"
+ start-stop-daemon --start --quiet --exec $DAEMON
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping avahi"
+ start-stop-daemon --stop --quiet --exec $DAEMON
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading avahi configuration"
+ start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
+ eend $?
+}
+