From: Michael Tremer Date: Mon, 30 Jan 2023 04:05:07 +0000 (+0000) Subject: networkd: Install a dbus service file X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=063eb4d841e8fc4625d889a9d5f8ac832bd60f0d;p=people%2Fms%2Fnetwork.git networkd: Install a dbus service file Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index 5bb9c4d0..5cfeefab 100644 --- a/Makefile.am +++ b/Makefile.am @@ -62,6 +62,7 @@ INSTALL_EXEC_HOOKS = UNINSTALL_EXEC_HOOKS = noinst_DATA = sbin_PROGRAMS = +dist_dbussystembusdir_DATA = AM_CPPFLAGS = \ $(OUR_CPPFLAGS) \ @@ -330,6 +331,9 @@ networkd_LDFLAGS = \ networkd_LDADD = \ $(SYSTEMD_LIBS) +dist_dbussystembusdir_DATA += \ + src/networkd/org.ipfire.network1.service + # ------------------------------------------------------------------------------ util_PROGRAMS = \ diff --git a/configure.ac b/configure.ac index b8207945..8634a396 100644 --- a/configure.ac +++ b/configure.ac @@ -133,6 +133,20 @@ AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-man-pages], AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes]) AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"]) +# ------------------------------------------------------------------------------ + +AC_ARG_WITH([dbussystembusdir], AS_HELP_STRING([--with-dbussystembusdir=DIR], + [path to D-Bus system bus services directory]), [with_dbussystembusdir=${withval}]) +if test -z "${with_dbussystembusdir}"; then + AC_MSG_CHECKING([D-Bus system bus services dir]) + with_dbussystembusdir="$($PKG_CONFIG --variable=system_bus_services_dir dbus-1)" + if test -z "${with_dbussystembusdir}"; then + AC_MSG_ERROR([D-Bus system bus services directory is required]) + fi + AC_MSG_RESULT([${with_dbussystembusdir}]) +fi +AC_SUBST(dbussystembusdir, [${with_dbussystembusdir}]) + # ------------------------------------------------------------------------------ AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), @@ -176,6 +190,7 @@ AC_MSG_RESULT([ prefix: $prefix + dbussystembusdir: ${dbussystembusdir} systemdsystemunitdir: $systemdsystemunitdir udevdir: $udevdir diff --git a/src/networkd/org.ipfire.network1.service b/src/networkd/org.ipfire.network1.service new file mode 100644 index 00000000..fdeda666 --- /dev/null +++ b/src/networkd/org.ipfire.network1.service @@ -0,0 +1,5 @@ +[D-BUS Service] +Name=org.ipfire.network1 +Exec=/bin/false +User=root +SystemdService=dbus-org.ipfire.network1.service