From: kremlin Date: Mon, 2 Jun 2014 22:38:44 +0000 (-0500) Subject: added scripts to place config files, added a note in source about that X-Git-Tag: hostnamed-copyable~41 X-Git-Url: https://uglyman.kremlin.cc/gitweb/gitweb.cgi?a=commitdiff_plain;h=2efa5c70150e34f66c12a494c3c003f56976c1c7;p=systembsd.git added scripts to place config files, added a note in source about that --- diff --git a/hacks/hostnamed-dbus.conf b/hacks/hostnamed-dbus.conf new file mode 100644 index 0000000..c84c0f3 --- /dev/null +++ b/hacks/hostnamed-dbus.conf @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/hacks/punch_config.sh b/hacks/punch_config.sh new file mode 100755 index 0000000..611250d --- /dev/null +++ b/hacks/punch_config.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# sticks our config for hostnamed (which needs to use the system bus) +# in place. and restarts dbus-daemon will be replaced by a more elegant, +# not-hack in the future + +cp $(dirname "$(readlink -f "$0")")/hostnamed-dbus.conf /etc/dbus-1/system.d/hostnamed-dbus.conf +/etc/rc.d/dbus_daemon reload >> /dev/null diff --git a/hacks/unpunch_config.sh b/hacks/unpunch_config.sh new file mode 100755 index 0000000..076c353 --- /dev/null +++ b/hacks/unpunch_config.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +# unsticks our config for hostnamed (which needs to use the system bus) +# and restarts dbus + +rm /etc/dbus-1/system.d/hostnamed-dbus.conf +/etc/rc.d/dbus_daemon reload >> /dev/null diff --git a/src/interfaces/hostnamed/hostnamed.c b/src/interfaces/hostnamed/hostnamed.c index 114ad10..4b326a1 100644 --- a/src/interfaces/hostnamed/hostnamed.c +++ b/src/interfaces/hostnamed/hostnamed.c @@ -84,7 +84,6 @@ static void on_bus_acquired(GDBusConnection *conn, NULL, NULL, NULL); - g_assert(reg_id > 0); } static void on_name_acquired(GDBusConnection *conn, @@ -99,6 +98,7 @@ static void on_name_lost(GDBusConnection *conn, gpointer user_data) { g_print("lost name %s, exiting...\n", name); + g_print("you might need to run hacks/punch_config.sh\n"); g_main_loop_quit(loop); }