[systemd-commits] 4 commits - configure.ac Makefile.am src/service.c TODO
Lennart Poettering
lennart at kemper.freedesktop.org
Mon Aug 1 16:41:43 PDT 2011
Makefile.am | 50 +++++++++++++++++++++++++++++++++--------
TODO | 6 ++++
configure.ac | 8 ++++++
src/service.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 125 insertions(+), 9 deletions(-)
New commits:
commit 72b9ed828bd22f3ddd74b6853c183eebf006d6d8
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Aug 2 01:41:36 2011 +0200
update TODO
diff --git a/TODO b/TODO
index da6cce1..eb3f6b8 100644
--- a/TODO
+++ b/TODO
@@ -19,6 +19,10 @@ Bugfixes:
Features:
+* make arbitrary cgroups attributes settable
+
+* when we automatically restart a service, ensure we retsart its rdeps, too.
+
* allow Type=simple with PIDFile=
https://bugzilla.redhat.com/show_bug.cgi?id=723942
commit b2e9fb99ab288e8817302851743ed1a3cddd384b
Author: Miklos Vajna <vmiklos at frugalware.org>
Date: Tue Aug 2 01:09:13 2011 +0200
build-sys: Add --disable-hostnamed configure switch
diff --git a/Makefile.am b/Makefile.am
index 54e389d..7971b6b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -171,7 +171,6 @@ rootlibexec_PROGRAMS = \
systemd-ac-power \
systemd-detect-virt \
systemd-sysctl \
- systemd-hostnamed \
systemd-localed \
systemd-timedated \
systemd-logind \
@@ -182,6 +181,11 @@ rootlibexec_PROGRAMS += \
systemd-binfmt
endif
+if ENABLE_HOSTNAMED
+rootlibexec_PROGRAMS += \
+ systemd-hostnamed
+endif
+
systemgenerator_PROGRAMS = \
systemd-getty-generator
@@ -226,18 +230,26 @@ dist_pkgsysconf_DATA = \
dist_dbuspolicy_DATA = \
src/org.freedesktop.systemd1.conf \
- src/org.freedesktop.hostname1.conf \
src/org.freedesktop.locale1.conf \
src/org.freedesktop.timedate1.conf \
src/org.freedesktop.login1.conf
+if ENABLE_HOSTNAMED
+dist_dbuspolicy_DATA += \
+ src/org.freedesktop.hostname1.conf
+endif
+
dist_dbussystemservice_DATA = \
src/org.freedesktop.systemd1.service \
- src/org.freedesktop.hostname1.service \
src/org.freedesktop.locale1.service \
src/org.freedesktop.timedate1.service \
src/org.freedesktop.login1.service
+if ENABLE_HOSTNAMED
+dist_dbussystemservice_DATA += \
+ src/org.freedesktop.hostname1.service
+endif
+
dist_udevrules_DATA = \
src/70-uaccess.rules \
src/71-seat.rules
@@ -260,10 +272,14 @@ dbusinterface_DATA = \
org.freedesktop.systemd1.Snapshot.xml \
org.freedesktop.systemd1.Swap.xml \
org.freedesktop.systemd1.Path.xml \
- org.freedesktop.hostname1.xml \
org.freedesktop.locale1.xml \
org.freedesktop.timedate1.xml
+if ENABLE_HOSTNAMED
+dbusinterface_DATA += \
+ org.freedesktop.hostname1.xml
+endif
+
dist_bashcompletion_DATA = \
src/systemctl-bash-completion.sh
@@ -348,7 +364,6 @@ nodist_systemunit_DATA = \
units/systemd-initctl.service \
units/systemd-logger.service \
units/systemd-shutdownd.service \
- units/systemd-hostnamed.service \
units/systemd-localed.service \
units/systemd-timedated.service \
units/systemd-logind.service \
@@ -384,6 +399,11 @@ nodist_systemunit_DATA += \
units/systemd-binfmt.service
endif
+if ENABLE_HOSTNAMED
+nodist_systemunit_DATA += \
+ units/systemd-hostnamed.service
+endif
+
dist_userunit_DATA = \
units/user/default.target \
units/user/exit.target
@@ -399,7 +419,6 @@ EXTRA_DIST = \
units/systemd-initctl.service.in \
units/systemd-logger.service.in \
units/systemd-shutdownd.service.in \
- units/systemd-hostnamed.service.in \
units/systemd-localed.service.in \
units/systemd-timedated.service.in \
units/systemd-logind.service.in \
@@ -443,6 +462,11 @@ EXTRA_DIST += \
units/systemd-binfmt.service.in
endif
+if ENABLE_HOSTNAMED
+EXTRA_DIST += \
+ units/systemd-hostnamed.service.in
+endif
+
if TARGET_FEDORA
dist_systemunit_DATA += \
units/fedora/prefdm.service \
@@ -505,11 +529,15 @@ pkgconfiglib_DATA = \
# Passed through intltool only
polkitpolicy_in_files = \
- src/org.freedesktop.hostname1.policy.in \
src/org.freedesktop.locale1.policy.in \
src/org.freedesktop.timedate1.policy.in \
src/org.freedesktop.login1.policy.in
+if ENABLE_HOSTNAMED
+polkitpolicy_in_files += \
+ src/org.freedesktop.hostname1.policy.in
+endif
+
# First passed through sed, followed by intltool
polkitpolicy_in_in_files = \
src/org.freedesktop.systemd1.policy.in.in
@@ -1732,10 +1760,9 @@ endif
$(LN_S) graphical.target runlevel5.target && \
$(LN_S) reboot.target runlevel6.target )
( cd $(DESTDIR)$(systemunitdir) && \
- rm -f default.target ctrl-alt-del.target dbus-org.freedesktop.hostname1.service dbus-org.freedesktop.locale1.service dbus-org.freedesktop.timedate1.service dbus-org.freedesktop.login1.service autovt at .service && \
+ rm -f default.target ctrl-alt-del.target dbus-org.freedesktop.locale1.service dbus-org.freedesktop.timedate1.service dbus-org.freedesktop.login1.service autovt at .service && \
$(LN_S) graphical.target default.target && \
$(LN_S) reboot.target ctrl-alt-del.target && \
- $(LN_S) systemd-hostnamed.service dbus-org.freedesktop.hostname1.service && \
$(LN_S) systemd-localed.service dbus-org.freedesktop.locale1.service && \
$(LN_S) systemd-timedated.service dbus-org.freedesktop.timedate1.service && \
$(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service && \
@@ -1784,6 +1811,11 @@ if ENABLE_BINFMT
$(LN_S) ../systemd-binfmt.service systemd-binfmt.service && \
$(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount )
endif
+if ENABLE_HOSTNAMED
+ ( cd $(DESTDIR)$(systemunitdir) && \
+ rm -f dbus-org.freedesktop.hostname1.service && \
+ $(LN_S) systemd-hostnamed.service dbus-org.freedesktop.hostname1.service )
+endif
( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
rm -f systemd-tmpfiles-clean.timer && \
$(LN_S) ../systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.timer )
diff --git a/configure.ac b/configure.ac
index 74fb061..6b33018 100644
--- a/configure.ac
+++ b/configure.ac
@@ -300,6 +300,13 @@ if test "x$enable_binfmt" != "xno"; then
fi
AM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
+have_hostnamed=no
+AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
+if test "x$enable_hostnamed" != "xno"; then
+ have_hostnamed=yes
+fi
+AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
+
have_gtk=no
AC_ARG_ENABLE(gtk, AS_HELP_STRING([--disable-gtk], [disable GTK tools]))
if test "x$enable_gtk" != "xno"; then
@@ -561,6 +568,7 @@ AC_MSG_RESULT([
SELinux: ${have_selinux}
ACL: ${have_acl}
binfmt: ${have_binfmt}
+ hostnamed: ${have_hostnamed}
plymouth: ${have_plymouth}
prefix: ${prefix}
root dir: ${with_rootdir}
commit de3910a324aefcb15c26be27033d6917494e5946
Author: Frederic Crozat <fcrozat at suse.com>
Date: Wed Jun 29 13:59:34 2011 +0200
service: parse insserv.conf and plugs its system facilities into systemd.
diff --git a/src/service.c b/src/service.c
index 4e3b6e7..0464d1e 100644
--- a/src/service.c
+++ b/src/service.c
@@ -2968,6 +2968,72 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) {
}
#ifdef HAVE_SYSV_COMPAT
+
+#ifdef TARGET_SUSE
+static void sysv_facility_in_insserv_conf(Manager *mgr) {
+ FILE *f=NULL;
+ int r;
+
+ if (!(f = fopen("/etc/insserv.conf", "re"))) {
+ r = errno == ENOENT ? 0 : -errno;
+ goto finish;
+ }
+
+ while (!feof(f)) {
+ char l[LINE_MAX], *t;
+ char **parsed = NULL;
+
+ if (!fgets(l, sizeof(l), f)) {
+ if (feof(f))
+ break;
+
+ r = -errno;
+ log_error("Failed to read configuration file '/etc/insserv.conf': %s", strerror(-r));
+ goto finish;
+ }
+
+ t = strstrip(l);
+ if (*t != '$' && *t != '<')
+ continue;
+
+ parsed = strv_split(t,WHITESPACE);
+ /* we ignore <interactive>, not used, equivalent to X-Interactive */
+ if (parsed && !startswith_no_case (parsed[0], "<interactive>")) {
+ char *facility;
+ Unit *u;
+ if (sysv_translate_facility(parsed[0], NULL, &facility) < 0)
+ continue;
+ if ((u = manager_get_unit(mgr, facility)) && (u->meta.type == UNIT_TARGET)) {
+ UnitDependency e;
+ char *dep = NULL, *name, **j;
+
+ STRV_FOREACH (j, parsed+1) {
+ if (*j[0]=='+') {
+ e = UNIT_WANTS;
+ name = *j+1;
+ }
+ else {
+ e = UNIT_REQUIRES;
+ name = *j;
+ }
+ if (sysv_translate_facility(name, NULL, &dep) < 0)
+ continue;
+
+ r = unit_add_two_dependencies_by_name(u, UNIT_BEFORE, e, dep, NULL, true);
+ free(dep);
+ }
+ }
+ free(facility);
+ }
+ strv_free(parsed);
+ }
+finish:
+ if (f)
+ fclose(f);
+
+}
+#endif
+
static int service_enumerate(Manager *m) {
char **p;
unsigned i;
@@ -3116,6 +3182,10 @@ static int service_enumerate(Manager *m) {
r = 0;
+#ifdef TARGET_SUSE
+ sysv_facility_in_insserv_conf (m);
+#endif
+
finish:
free(path);
free(fpath);
commit 8112e84f657839a056afb411249a627956518b24
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Aug 2 00:34:13 2011 +0200
update TODO
diff --git a/TODO b/TODO
index 0212446..da6cce1 100644
--- a/TODO
+++ b/TODO
@@ -37,6 +37,8 @@ Features:
* logind: use sysfs path in device hash table instead of sysname, as soon as fb driver is fixed
+* timedated: implement NTP calls
+
* implement Register= switch in .socket units to enable registration
in Avahi, RPC and other socket registration services.
More information about the systemd-commits
mailing list