2012-11-26 19:58:02 +01:00
|
|
|
Index: systemd-195/src/core/service.c
|
Accepting request 101505 from Base:System
- Update to version 39:
+ New systemd-cgtop tool to show control groups by their resource
usage.
+ Linking against libacl for ACLs is optional again.
+ If a group "adm" exists, journal files are automatically owned
by them, thus allow members of this group full access to the
system journal as well as all user journals.
+ The journal now stores the SELinux context of the logging
client for all entries.
+ Add C++ inclusion guards to all public headers.
+ New output mode "cat" in the journal to print only text
messages, without any meta data like date or time.
+ Include tiny X server wrapper as a temporary stop-gap to teach
XOrg udev display enumeration (until XOrg supports udev
hotplugging for display devices).
+ Add new systemd-cat tool for executing arbitrary programs with
STDERR/STDOUT connected to the journal. Can also act as BSD
logger replacement, and does so by default.
+ Optionally store all locally generated coredumps in the journal
along with meta data.
+ systemd-tmpfiles learnt four new commands: n, L, c, b, for
writing short strings to files (for usage for /sys), and for
creating symlinks, character and block device nodes.
+ New unit file option ControlGroupPersistent= to make cgroups
persistent.
+ Support multiple local RTCs in a sane way.
+ No longer monopolize IO when replaying readahead data on
rotating disks.
+ Don't show kernel threads in systemd-cgls anymore, unless
requested with new -k switch. (forwarded request 101496 from fcrozat)
OBS-URL: https://build.opensuse.org/request/show/101505
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=85
2012-01-26 16:00:42 +01:00
|
|
|
===================================================================
|
2012-11-26 19:58:02 +01:00
|
|
|
--- systemd-195.orig/src/core/service.c
|
|
|
|
+++ systemd-195/src/core/service.c
|
|
|
|
@@ -3391,12 +3391,13 @@ static void service_notify_message(Unit
|
|
|
|
|
|
|
|
#ifdef HAVE_SYSV_COMPAT
|
|
|
|
|
|
|
|
-#ifdef TARGET_SUSE
|
|
|
|
-static void sysv_facility_in_insserv_conf(Manager *mgr) {
|
|
|
|
- FILE *f=NULL;
|
|
|
|
+#if defined(TARGET_SUSE) || defined(TARGET_DEBIAN)
|
|
|
|
+static void sysv_parse_insserv_conf(Manager *mgr, const char* filename) {
|
|
|
|
+ FILE *f = NULL;
|
|
|
|
int r;
|
|
|
|
|
|
|
|
- if (!(f = fopen("/etc/insserv.conf", "re"))) {
|
|
|
|
+ if (!(f = fopen(filename, "re"))) {
|
|
|
|
+ log_error("Failed to open file %s", filename);
|
|
|
|
r = errno == ENOENT ? 0 : -errno;
|
|
|
|
goto finish;
|
|
|
|
}
|
|
|
|
@@ -3410,7 +3411,7 @@ static void sysv_facility_in_insserv_con
|
|
|
|
break;
|
|
|
|
|
|
|
|
r = -errno;
|
|
|
|
- log_error("Failed to read configuration file '/etc/insserv.conf': %s", strerror(-r));
|
|
|
|
+ log_error("Failed to read configuration file '%s': %s", filename, strerror(-r));
|
|
|
|
goto finish;
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -3425,23 +3426,30 @@ static void sysv_facility_in_insserv_con
|
2012-02-10 17:20:20 +01:00
|
|
|
Unit *u;
|
Accepting request 101505 from Base:System
- Update to version 39:
+ New systemd-cgtop tool to show control groups by their resource
usage.
+ Linking against libacl for ACLs is optional again.
+ If a group "adm" exists, journal files are automatically owned
by them, thus allow members of this group full access to the
system journal as well as all user journals.
+ The journal now stores the SELinux context of the logging
client for all entries.
+ Add C++ inclusion guards to all public headers.
+ New output mode "cat" in the journal to print only text
messages, without any meta data like date or time.
+ Include tiny X server wrapper as a temporary stop-gap to teach
XOrg udev display enumeration (until XOrg supports udev
hotplugging for display devices).
+ Add new systemd-cat tool for executing arbitrary programs with
STDERR/STDOUT connected to the journal. Can also act as BSD
logger replacement, and does so by default.
+ Optionally store all locally generated coredumps in the journal
along with meta data.
+ systemd-tmpfiles learnt four new commands: n, L, c, b, for
writing short strings to files (for usage for /sys), and for
creating symlinks, character and block device nodes.
+ New unit file option ControlGroupPersistent= to make cgroups
persistent.
+ Support multiple local RTCs in a sane way.
+ No longer monopolize IO when replaying readahead data on
rotating disks.
+ Don't show kernel threads in systemd-cgls anymore, unless
requested with new -k switch. (forwarded request 101496 from fcrozat)
OBS-URL: https://build.opensuse.org/request/show/101505
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=85
2012-01-26 16:00:42 +01:00
|
|
|
if (sysv_translate_facility(parsed[0], NULL, &facility) < 0)
|
|
|
|
continue;
|
2012-02-10 17:20:20 +01:00
|
|
|
+ if (streq(facility, SPECIAL_REMOTE_FS_TARGET)) {
|
|
|
|
+ /* insert also a Wants dependency from remote-fs-pre on remote-fs */
|
|
|
|
+ u = manager_get_unit(mgr, SPECIAL_REMOTE_FS_TARGET);
|
2012-02-16 16:24:03 +01:00
|
|
|
+ unit_add_dependency_by_name(u, UNIT_WANTS, SPECIAL_REMOTE_FS_PRE_TARGET, NULL, true);
|
2012-02-10 17:20:20 +01:00
|
|
|
+ free (facility);
|
|
|
|
+ facility=strdup(SPECIAL_REMOTE_FS_PRE_TARGET);
|
|
|
|
+ }
|
Accepting request 101505 from Base:System
- Update to version 39:
+ New systemd-cgtop tool to show control groups by their resource
usage.
+ Linking against libacl for ACLs is optional again.
+ If a group "adm" exists, journal files are automatically owned
by them, thus allow members of this group full access to the
system journal as well as all user journals.
+ The journal now stores the SELinux context of the logging
client for all entries.
+ Add C++ inclusion guards to all public headers.
+ New output mode "cat" in the journal to print only text
messages, without any meta data like date or time.
+ Include tiny X server wrapper as a temporary stop-gap to teach
XOrg udev display enumeration (until XOrg supports udev
hotplugging for display devices).
+ Add new systemd-cat tool for executing arbitrary programs with
STDERR/STDOUT connected to the journal. Can also act as BSD
logger replacement, and does so by default.
+ Optionally store all locally generated coredumps in the journal
along with meta data.
+ systemd-tmpfiles learnt four new commands: n, L, c, b, for
writing short strings to files (for usage for /sys), and for
creating symlinks, character and block device nodes.
+ New unit file option ControlGroupPersistent= to make cgroups
persistent.
+ Support multiple local RTCs in a sane way.
+ No longer monopolize IO when replaying readahead data on
rotating disks.
+ Don't show kernel threads in systemd-cgls anymore, unless
requested with new -k switch. (forwarded request 101496 from fcrozat)
OBS-URL: https://build.opensuse.org/request/show/101505
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=85
2012-01-26 16:00:42 +01:00
|
|
|
if ((u = manager_get_unit(mgr, facility)) && (u->type == UNIT_TARGET)) {
|
|
|
|
- UnitDependency e;
|
2011-10-08 11:44:34 +02:00
|
|
|
char *dep = NULL, *name, **j;
|
|
|
|
|
|
|
|
STRV_FOREACH (j, parsed+1) {
|
|
|
|
- if (*j[0]=='+') {
|
|
|
|
- e = UNIT_WANTS;
|
2012-11-26 19:58:02 +01:00
|
|
|
+ if (*j[0] == '+')
|
2011-10-08 11:44:34 +02:00
|
|
|
name = *j+1;
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- e = UNIT_REQUIRES;
|
2012-11-26 19:58:02 +01:00
|
|
|
+ else
|
2011-10-08 11:44:34 +02:00
|
|
|
name = *j;
|
|
|
|
- }
|
|
|
|
+ if (streq(name, "boot.localfs") ||
|
|
|
|
+ streq(name, "boot.crypto"))
|
|
|
|
+ continue;
|
|
|
|
if (sysv_translate_facility(name, NULL, &dep) < 0)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
- r = unit_add_two_dependencies_by_name(u, UNIT_BEFORE, e, dep, NULL, true);
|
2012-11-26 19:58:02 +01:00
|
|
|
+ r = unit_add_two_dependencies_by_name_inverse(u, UNIT_WANTS, UNIT_BEFORE, dep, NULL, true);
|
|
|
|
+ if (*j[0] != '+')
|
2011-10-08 11:44:34 +02:00
|
|
|
+ r = unit_add_dependency_by_name(u, UNIT_REQUIRES, dep, NULL, true);
|
|
|
|
free(dep);
|
|
|
|
}
|
|
|
|
}
|
2012-11-26 19:58:02 +01:00
|
|
|
@@ -3454,6 +3462,35 @@ finish:
|
|
|
|
fclose(f);
|
|
|
|
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+static void sysv_facility_in_insserv_conf(Manager *mgr) {
|
|
|
|
+ DIR *d =NULL;
|
|
|
|
+ struct dirent *de;
|
|
|
|
+
|
|
|
|
+#ifdef TARGET_DEBIAN
|
|
|
|
+ if (!(d = opendir("/etc/insserv.conf.d/")))
|
|
|
|
+ if (errno != ENOENT) {
|
|
|
|
+ log_warning("opendir() failed on /etc/insserv.conf.d/ %s", strerror(errno));
|
|
|
|
+ goto finish;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ while ((de = readdir(d))) {
|
|
|
|
+ char *path = NULL;
|
|
|
|
+ if (ignore_file(de->d_name))
|
|
|
|
+ continue;
|
|
|
|
+
|
|
|
|
+ path = join("/etc/insserv.conf.d/", de->d_name, NULL);
|
|
|
|
+ sysv_parse_insserv_conf(mgr, path);
|
|
|
|
+ free(path);
|
|
|
|
+ }
|
|
|
|
+finish:
|
|
|
|
+ if (d)
|
|
|
|
+ closedir(d);
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+ sysv_parse_insserv_conf(mgr, "/etc/insserv.conf");
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static int service_enumerate(Manager *m) {
|
|
|
|
@@ -3604,7 +3641,7 @@ static int service_enumerate(Manager *m)
|
|
|
|
|
|
|
|
r = 0;
|
|
|
|
|
|
|
|
-#ifdef TARGET_SUSE
|
|
|
|
+#if defined(TARGET_SUSE) || defined(TARGET_DEBIAN)
|
|
|
|
sysv_facility_in_insserv_conf (m);
|
|
|
|
#endif
|
|
|
|
|