Drop all cherry-picked patches and port the Debian specific ones.
+systemd (218-1) UNRELEASED; urgency=medium
+
+ * New upstream release. Drop all cherry-picked patches and port the Debian
+ specific ones.
+ - Create /etc/machine-id on boot if missing. (LP: #1387090)
+
+ -- Martin Pitt <mpitt@debian.org> Fri, 12 Dec 2014 20:32:32 +0200
+
systemd (217-4) experimental; urgency=medium
[ Martin Pitt ]
2 files changed, 38 insertions(+)
diff --git a/src/core/locale-setup.c b/src/core/locale-setup.c
-index 5177dbf..92ad47c 100644
+index e993c57..480aa7c 100644
--- a/src/core/locale-setup.c
+++ b/src/core/locale-setup.c
@@ -83,6 +83,28 @@ int locale_setup(char ***environment) {
- log_warning("Failed to read /etc/locale.conf: %s", strerror(-r));
+ log_warning_errno(r, "Failed to read /etc/locale.conf: %m");
}
+ if (r <= 0) {
for (i = 0; i < _VARIABLE_LC_MAX; i++) {
char *s;
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
-index 8880812..3a55d65 100644
+index bf567a1..84b5259 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
-@@ -89,6 +89,12 @@ static int context_read_data(Context *c) {
+@@ -95,6 +95,12 @@ static int context_read_data(Context *c) {
}
}
have_timezone:
if (isempty(c->zone)) {
free(c->zone);
-@@ -103,6 +109,7 @@ have_timezone:
+@@ -109,6 +115,7 @@ have_timezone:
static int context_write_data_timezone(Context *c) {
_cleanup_free_ char *p = NULL;
int r = 0;
assert(c);
-@@ -110,6 +117,9 @@ static int context_write_data_timezone(Context *c) {
+@@ -116,6 +123,9 @@ static int context_write_data_timezone(Context *c) {
if (unlink("/etc/localtime") < 0 && errno != ENOENT)
r = -errno;
return r;
}
-@@ -121,6 +131,12 @@ static int context_write_data_timezone(Context *c) {
+@@ -127,6 +137,12 @@ static int context_write_data_timezone(Context *c) {
if (r < 0)
return r;
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
-index e55d65e..be2eee2 100644
+index 98be4d0..dba9e91 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
-@@ -6717,19 +6717,24 @@ static int talk_initctl(void) {
+@@ -7261,18 +7261,23 @@ static int talk_initctl(void) {
request.runlevel = rl;
+ if (errno == ENOENT)
+ return 0;
-- log_error("Failed to open "INIT_FIFO": %m");
+- log_error_errno(errno, "Failed to open "INIT_FIFO": %m");
- return -errno;
-+ log_error("Failed to open initctl FIFO: %m");
++ log_error_errno(errno, "Failed to open "INIT_FIFO": %m");
+ return -errno;
+ }
}
- errno = 0;
- r = loop_write(fd, &request, sizeof(request), false) != sizeof(request);
- if (r) {
-- log_error("Failed to write to "INIT_FIFO": %m");
-+ log_error("Failed to write to initctl FIFO: %m");
- return errno > 0 ? -errno : -EIO;
- }
+ r = loop_write(fd, &request, sizeof(request), false);
+ if (r < 0)
+- return log_error_errno(r, "Failed to write to "INIT_FIFO": %m");
++ return log_error_errno(r, "Failed to write to initctl FIFO: %m");
+ return 1;
+ }
1 file changed, 6 insertions(+)
diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c
-index d8de644..1b99fa4 100644
+index ae14c6b..9b82c9e 100644
--- a/src/shared/sleep-config.c
+++ b/src/shared/sleep-config.c
-@@ -221,6 +221,12 @@ static bool enough_memory_for_hibernation(void) {
+@@ -222,6 +222,12 @@ static bool enough_memory_for_hibernation(void) {
size_t size = 0, used = 0;
int r;
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
-index 6e4cdd6..96ee15d 100644
+index 45c8b4e..2e01aba 100644
--- a/src/sysv-generator/sysv-generator.c
+++ b/src/sysv-generator/sysv-generator.c
@@ -41,6 +41,7 @@
int sysv_start_priority;
char *pid_file;
char **before;
-@@ -155,6 +163,8 @@ static int generate_unit_file(SysvStub *s) {
+@@ -154,6 +162,8 @@ static int generate_unit_file(SysvStub *s) {
"Description=%s\n",
s->path, s->description);
if (!isempty(before))
fprintf(f, "Before=%s\n", before);
if (!isempty(after))
-@@ -168,11 +178,12 @@ static int generate_unit_file(SysvStub *s) {
+@@ -167,11 +177,12 @@ static int generate_unit_file(SysvStub *s) {
"\n[Service]\n"
"Type=forking\n"
"Restart=no\n"
+ s->sysinit ? "0" : "5min",
yes_no(!s->pid_file));
- if (s->sysv_start_priority > 0)
-@@ -669,6 +680,11 @@ static int fix_order(SysvStub *s, Hashmap *all_services) {
+ if (s->pid_file)
+@@ -665,6 +676,11 @@ static int fix_order(SysvStub *s, Hashmap *all_services) {
if (s->has_lsb && other->has_lsb)
continue;
if (other->sysv_start_priority < s->sysv_start_priority) {
r = strv_extend(&s->after, other->name);
if (r < 0)
-@@ -816,8 +832,12 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
+@@ -812,8 +828,12 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
}
if (de->d_name[0] == 'S') {
create mode 100644 units/x-display-manager.target
diff --git a/Makefile.am b/Makefile.am
-index ed038fc..28370df 100644
+index 1ccee3f..be921b0 100644
--- a/Makefile.am
+++ b/Makefile.am
-@@ -555,6 +555,12 @@ nodist_systemunit_DATA += \
+@@ -557,6 +557,12 @@ nodist_systemunit_DATA += \
units/systemd-update-utmp-runlevel.service
endif
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
-index 6a8b644..939ea81 100644
+index ed25f9a..0e7e5e9 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
-@@ -5129,9 +5129,6 @@ static int enable_sysv_units(const char *verb, char **args) {
+@@ -5176,9 +5176,6 @@ static int enable_sysv_units(const char *verb, char **args) {
- name = args[f];
+ name = args[f++];
- if (!endswith(name, ".service"))
- continue;
if (path_is_absolute(name))
continue;
-@@ -5154,7 +5151,8 @@ static int enable_sysv_units(const char *verb, char **args) {
+@@ -5201,7 +5198,8 @@ static int enable_sysv_units(const char *verb, char **args) {
if (!p)
return log_oom();
1 file changed, 15 insertions(+)
diff --git a/src/core/manager.c b/src/core/manager.c
-index 929c07a..951cd3e 100644
+index acef626..fe8c339 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
-@@ -1220,6 +1220,21 @@ int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool ove
+@@ -1178,6 +1178,21 @@ int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool ove
sd_bus_error_setf(e, BUS_ERROR_SHUTTING_DOWN, "final.target is queued, ignoring %s request for unit %s", job_type_to_string(type), unit->id);
return -EINVAL;
}
1 file changed, 25 insertions(+)
diff --git a/src/core/manager.c b/src/core/manager.c
-index 47e23ba..929c07a 100644
+index 6382400..acef626 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
-@@ -1187,6 +1187,8 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
+@@ -1147,6 +1147,8 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool override, sd_bus_error *e, Job **_ret) {
int r;
Transaction *tr;
assert(m);
assert(type < _JOB_TYPE_MAX);
-@@ -1198,6 +1200,29 @@ int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool ove
- return -EINVAL;
- }
+@@ -1156,6 +1158,29 @@ int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool ove
+ if (mode == JOB_ISOLATE && type != JOB_START)
+ return sd_bus_error_setf(e, SD_BUS_ERROR_INVALID_ARGS, "Isolate is only valid for start.");
+ if (type == JOB_RELOAD || type == JOB_RELOAD_OR_START || type == JOB_RESTART || type == JOB_TRY_RESTART) {
+ HASHMAP_FOREACH(j, m->jobs, i) {
+ }
+ }
+
- if (mode == JOB_ISOLATE && !unit->allow_isolate) {
- sd_bus_error_setf(e, BUS_ERROR_NO_ISOLATION, "Operation refused, unit may not be isolated.");
- return -EPERM;
+ if (mode == JOB_ISOLATE && !unit->allow_isolate)
+ return sd_bus_error_setf(e, BUS_ERROR_NO_ISOLATION, "Operation refused, unit may not be isolated.");
+
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
-index 96ee15d..7e71713 100644
+index 2e01aba..8f1de66 100644
--- a/src/sysv-generator/sysv-generator.c
+++ b/src/sysv-generator/sysv-generator.c
-@@ -704,6 +704,25 @@ static int fix_order(SysvStub *s, Hashmap *all_services) {
+@@ -700,6 +700,25 @@ static int fix_order(SysvStub *s, Hashmap *all_services) {
return 0;
}
static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
char **path;
-@@ -744,6 +763,12 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
+@@ -740,6 +759,12 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
if (hashmap_contains(all_services, name))
continue;
service = new0(SysvStub, 1);
if (!service)
return log_oom();
-@@ -827,7 +852,8 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
+@@ -823,7 +848,8 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
service = hashmap_get(all_services, name);
if (!service){
#define SPECIAL_INITRD_FS_TARGET "initrd-fs.target"
#define SPECIAL_INITRD_ROOT_FS_TARGET "initrd-root-fs.target"
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
-index 7e71713..ebd8076 100644
+index 8f1de66..ad7db47 100644
--- a/src/sysv-generator/sysv-generator.c
+++ b/src/sysv-generator/sysv-generator.c
@@ -72,9 +72,6 @@ static const struct {
typedef struct SysvStub {
char *name;
char *path;
-@@ -164,7 +161,7 @@ static int generate_unit_file(SysvStub *s) {
+@@ -163,7 +160,7 @@ static int generate_unit_file(SysvStub *s) {
s->path, s->description);
if (s->sysinit)
if (!isempty(before))
fprintf(f, "Before=%s\n", before);
if (!isempty(after))
-@@ -245,7 +242,7 @@ static int sysv_translate_facility(const char *name, const char *filename, char
+@@ -241,7 +238,7 @@ static int sysv_translate_facility(const char *name, const char *filename, char
static const char * const table[] = {
/* LSB defined facilities */
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
-index 22fd306..34d6e7b 100644
+index ac7924e..7648572 100644
--- a/Makefile.am
+++ b/Makefile.am
-@@ -5945,8 +5945,7 @@ SYSINIT_TARGET_WANTS += \
+@@ -6074,8 +6074,7 @@ SYSINIT_TARGET_WANTS += \
systemd-update-done.service
LOCAL_FS_TARGET_WANTS += \
man/systemd-update-utmp.service.xml | 2 +-
man/systemd-user-sessions.service.xml | 2 +-
man/systemd-vconsole-setup.service.xml | 2 +-
- man/systemd.directives.xml | 118 +++++++++++++--------------
+ man/systemd.directives.xml | 138 +++++++++++++--------------
man/systemd.link.xml | 6 +-
man/systemd.netdev.xml | 6 +-
man/systemd.network.xml | 6 +-
- man/systemd.preset.xml | 14 ++--
+ man/systemd.preset.xml | 14 +--
man/systemd.unit.xml | 12 +--
man/systemd.xml | 2 +-
man/timedatectl.xml | 2 +-
man/udev.xml | 16 ++--
- 56 files changed, 147 insertions(+), 147 deletions(-)
+ 56 files changed, 157 insertions(+), 157 deletions(-)
diff --git a/man/bootchart.conf.xml b/man/bootchart.conf.xml
-index 68834c7..25d5bdb 100644
+index a364826..f385e47 100644
--- a/man/bootchart.conf.xml
+++ b/man/bootchart.conf.xml
-@@ -118,7 +118,7 @@
+@@ -127,7 +127,7 @@
binary instead of <filename>/sbin/init</filename>. This
option is only relevant if bootchart was invoked from the
kernel command line with
<varlistentry>
diff --git a/man/sysctl.d.xml b/man/sysctl.d.xml
-index 7b51b68..c3e580e 100644
+index c67a199..8b7851f 100644
--- a/man/sysctl.d.xml
+++ b/man/sysctl.d.xml
-@@ -158,7 +158,7 @@
+@@ -132,7 +132,7 @@
<para><filename>/etc/udev/rules.d/99-bridge.rules</filename>:
</para>
<para><filename>/etc/sysctl.d/bridge.conf</filename>:
diff --git a/man/systemctl.xml b/man/systemctl.xml
-index 7cbaa6c..63d32e6 100644
+index d1991e0..b288d58 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
-@@ -403,8 +403,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+@@ -420,8 +420,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
processes. Not all unit types manage processes of these
types however. For example, for mount units, control processes
are defined (which are the invocations of
<option>all</option>.</para>
</listitem>
diff --git a/man/systemd-activate.xml b/man/systemd-activate.xml
-index cde4263..ecadeea 100644
+index 3793331..d282f03 100644
--- a/man/systemd-activate.xml
+++ b/man/systemd-activate.xml
@@ -50,7 +50,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
<refsect1>
diff --git a/man/systemd-bootchart.xml b/man/systemd-bootchart.xml
-index 150ca48..63a6429 100644
+index 0068e92..4759f3f 100644
--- a/man/systemd-bootchart.xml
+++ b/man/systemd-bootchart.xml
@@ -63,7 +63,7 @@
is invoked by the kernel by passing
- <option>init=<filename>/usr/lib/systemd/systemd-bootchart</filename></option>
+ <option>init=<filename>/lib/systemd/systemd-bootchart</filename></option>
- on the kernel commandline. systemd-bootchart will then
+ on the kernel command line. systemd-bootchart will then
fork the real init off to resume normal system
startup, while monitoring and logging startup
diff --git a/man/systemd-bus-proxyd.xml b/man/systemd-bus-proxyd.xml
-index f9400f0..9b74c3b 100644
+index 2c77640..63cef4f 100644
--- a/man/systemd-bus-proxyd.xml
+++ b/man/systemd-bus-proxyd.xml
@@ -50,7 +50,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
<arg choice="opt"><replaceable>PLACEHOLDER</replaceable></arg>
</cmdsynopsis>
diff --git a/man/systemd-coredump.xml b/man/systemd-coredump.xml
-index b83b278..eeb02af 100644
+index 6a7ced1..e8d156c 100644
--- a/man/systemd-coredump.xml
+++ b/man/systemd-coredump.xml
@@ -49,7 +49,7 @@
<refsect1>
diff --git a/man/systemd-cryptsetup-generator.xml b/man/systemd-cryptsetup-generator.xml
-index 3abb39d..9e36213 100644
+index c8753ce..4e780fd 100644
--- a/man/systemd-cryptsetup-generator.xml
+++ b/man/systemd-cryptsetup-generator.xml
@@ -46,7 +46,7 @@
<refsect1>
diff --git a/man/systemd-hostnamed.service.xml b/man/systemd-hostnamed.service.xml
-index bdd3a51..b715331 100644
+index 7952d8a..9af288b 100644
--- a/man/systemd-hostnamed.service.xml
+++ b/man/systemd-hostnamed.service.xml
@@ -50,7 +50,7 @@
<refsect1>
diff --git a/man/systemd-journal-gatewayd.service.xml b/man/systemd-journal-gatewayd.service.xml
-index 01b2552..9d5dc67 100644
+index 7420b59..e80c978 100644
--- a/man/systemd-journal-gatewayd.service.xml
+++ b/man/systemd-journal-gatewayd.service.xml
@@ -54,7 +54,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
</cmdsynopsis>
</refsynopsisdiv>
diff --git a/man/systemd-journald.service.xml b/man/systemd-journald.service.xml
-index 1f1a7f1..e6ad0c9 100644
+index fa6e97e..1eaad99 100644
--- a/man/systemd-journald.service.xml
+++ b/man/systemd-journald.service.xml
@@ -54,7 +54,7 @@
<refsect1>
diff --git a/man/systemd-modules-load.service.xml b/man/systemd-modules-load.service.xml
-index 28dd8ec..e978d46 100644
+index 7b99be6..5958ec0 100644
--- a/man/systemd-modules-load.service.xml
+++ b/man/systemd-modules-load.service.xml
@@ -48,7 +48,7 @@
<refsect1>
diff --git a/man/systemd-networkd.service.xml b/man/systemd-networkd.service.xml
-index 0570798..f164f0a 100644
+index 7c20fa4..3d56662 100644
--- a/man/systemd-networkd.service.xml
+++ b/man/systemd-networkd.service.xml
@@ -50,7 +50,7 @@
PrivateNetwork=yes]]></programlisting>
</example>
diff --git a/man/systemd-suspend.service.xml b/man/systemd-suspend.service.xml
-index 9a3ae1b..e4372c2 100644
+index 375c255..2eef15f 100644
--- a/man/systemd-suspend.service.xml
+++ b/man/systemd-suspend.service.xml
@@ -56,7 +56,7 @@
<refsect1>
diff --git a/man/systemd-timedated.service.xml b/man/systemd-timedated.service.xml
-index 143d340..a1e985c 100644
+index aee37db..ea5e087 100644
--- a/man/systemd-timedated.service.xml
+++ b/man/systemd-timedated.service.xml
@@ -50,7 +50,7 @@
<refsect1>
diff --git a/man/systemd-udevd.service.xml b/man/systemd-udevd.service.xml
-index ab5c163..26cb228 100644
+index f467cd2..cf06d3b 100644
--- a/man/systemd-udevd.service.xml
+++ b/man/systemd-udevd.service.xml
@@ -38,7 +38,7 @@
<refsect1>
diff --git a/man/systemd.directives.xml b/man/systemd.directives.xml
-index c7750bb..1a64ad4 100644
+index aa7167b..23bd578 100644
--- a/man/systemd.directives.xml
+++ b/man/systemd.directives.xml
-@@ -2874,7 +2874,7 @@
+@@ -2974,7 +2974,7 @@
<varlistentry><term><filename>/etc/tmpfiles.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
<varlistentry><term><filename>/etc/udev/hwdb.d</filename></term><listitem><para><citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
-@@ -3014,9 +3014,9 @@
+@@ -3128,9 +3128,9 @@
<varlistentry><term><filename>/usr/bin</filename></term><listitem><para><citerefentry><refentrytitle>file-hierarchy</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
<varlistentry><term><filename>/usr/include</filename></term><listitem><para><citerefentry><refentrytitle>file-hierarchy</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
-@@ -3036,109 +3036,109 @@
+@@ -3150,129 +3150,129 @@
<varlistentry><term><filename>/usr/lib/sysctl.d/50-coredump.conf</filename></term><listitem><para><citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+-<varlistentry><term><filename>/usr/lib/systemd/bootchart.conf.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>bootchart.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
++<varlistentry><term><filename>/lib/systemd/bootchart.conf.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>bootchart.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
+-<varlistentry><term><filename>/usr/lib/systemd/coredump.conf.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
++<varlistentry><term><filename>/lib/systemd/coredump.conf.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
+-<varlistentry><term><filename>/usr/lib/systemd/journald.conf.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
++<varlistentry><term><filename>/lib/systemd/journald.conf.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
+-<varlistentry><term><filename>/usr/lib/systemd/logind.conf.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
++<varlistentry><term><filename>/lib/systemd/logind.conf.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
-<varlistentry><term><filename>/usr/lib/systemd/network</filename></term><listitem><para><citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/lib/systemd/network</filename></term><listitem><para><citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+-<varlistentry><term><filename>/usr/lib/systemd/resolved.conf.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
++<varlistentry><term><filename>/lib/systemd/resolved.conf.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
+-<varlistentry><term><filename>/usr/lib/systemd/sleep.conf.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>systemd-sleep.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
++<varlistentry><term><filename>/lib/systemd/sleep.conf.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>systemd-sleep.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
-<varlistentry><term><filename>/usr/lib/systemd/system</filename></term><listitem><para><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/lib/systemd/system</filename></term><listitem><para><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
-<varlistentry><term><filename>/usr/lib/systemd/system-generators/systemd-system-update-generator</filename></term><listitem><para><citerefentry><refentrytitle>systemd-system-update-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/lib/systemd/system-generators/systemd-system-update-generator</filename></term><listitem><para><citerefentry><refentrytitle>systemd-system-update-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+-<varlistentry><term><filename>/usr/lib/systemd/system-generators/systemd-sysv-generator</filename></term><listitem><para><citerefentry><refentrytitle>systemd-sysv-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
++<varlistentry><term><filename>/lib/systemd/system-generators/systemd-sysv-generator</filename></term><listitem><para><citerefentry><refentrytitle>systemd-sysv-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
-<varlistentry><term><filename>/usr/lib/systemd/system-preset/*.preset</filename></term><listitem><para><citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/lib/systemd/system-preset/*.preset</filename></term><listitem><para><citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
-<varlistentry><term><filename>/usr/lib/systemd/system-sleep</filename></term><listitem><para><citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/lib/systemd/system-sleep</filename></term><listitem><para><citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+-<varlistentry><term><filename>/usr/lib/systemd/system.conf.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
++<varlistentry><term><filename>/lib/systemd/system.conf.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
-<varlistentry><term><command>/usr/lib/systemd/systemd-activate</command></term><listitem><para><citerefentry><refentrytitle>systemd-activate</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><command>/lib/systemd/systemd-activate</command></term><listitem><para><citerefentry><refentrytitle>systemd-activate</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
-<varlistentry><term><filename>/usr/lib/systemd/systemd-logind</filename></term><listitem><para><citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/lib/systemd/systemd-logind</filename></term><listitem><para><citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+-<varlistentry><term><filename>/usr/lib/systemd/systemd-machine-id-commit</filename></term><listitem><para><citerefentry><refentrytitle>systemd-machine-id-commit.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
++<varlistentry><term><filename>/lib/systemd/systemd-machine-id-commit</filename></term><listitem><para><citerefentry><refentrytitle>systemd-machine-id-commit.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
-<varlistentry><term><filename>/usr/lib/systemd/systemd-machined</filename></term><listitem><para><citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/lib/systemd/systemd-machined</filename></term><listitem><para><citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
-<varlistentry><term><filename>/usr/lib/systemd/systemd-vconsole-setup</filename></term><listitem><para><citerefentry><refentrytitle>systemd-vconsole-setup.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/lib/systemd/systemd-vconsole-setup</filename></term><listitem><para><citerefentry><refentrytitle>systemd-vconsole-setup.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+-<varlistentry><term><filename>/usr/lib/systemd/timesyncd.conf.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>timesyncd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
++<varlistentry><term><filename>/lib/systemd/timesyncd.conf.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>timesyncd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
-<varlistentry><term><filename>/usr/lib/systemd/user/</filename></term><listitem><para><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/lib/systemd/user/</filename></term><listitem><para><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
-<varlistentry><term><filename>/usr/lib/systemd/user-preset/*.preset</filename></term><listitem><para><citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/lib/systemd/user-preset/*.preset</filename></term><listitem><para><citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
--<varlistentry><term><filename>/usr/lib/sysusers.d</filename></term><listitem><para><citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
-+<varlistentry><term><filename>/lib/sysusers.d</filename></term><listitem><para><citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+-<varlistentry><term><filename>/usr/lib/systemd/user.conf.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
++<varlistentry><term><filename>/lib/systemd/user.conf.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
<varlistentry><term><filename>/usr/lib/sysusers.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
-@@ -3146,13 +3146,13 @@
+@@ -3280,13 +3280,13 @@
<varlistentry><term><filename>/usr/lib/tmpfiles.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
<varlistentry><term><filename>/usr/lib64</filename></term><listitem><para><citerefentry><refentrytitle>file-hierarchy</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
diff --git a/man/systemd.link.xml b/man/systemd.link.xml
-index 6075b39..d3b808a 100644
+index 0eb3950..7c22d6e 100644
--- a/man/systemd.link.xml
+++ b/man/systemd.link.xml
@@ -57,7 +57,7 @@
<para>The link file contains a <literal>[Match]</literal> section, which
diff --git a/man/systemd.netdev.xml b/man/systemd.netdev.xml
-index 275ee52..210f6da 100644
+index 45934f2..b236c92 100644
--- a/man/systemd.netdev.xml
+++ b/man/systemd.netdev.xml
@@ -66,7 +66,7 @@
</refsect1>
diff --git a/man/systemd.network.xml b/man/systemd.network.xml
-index 4cc13b2..1d053e4 100644
+index 79c7a23..f9a266f 100644
--- a/man/systemd.network.xml
+++ b/man/systemd.network.xml
@@ -63,7 +63,7 @@
<programlisting>enable gdm.service
enable colord.service
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
-index 803eff2..a02c757 100644
+index 2e298ca..48b2697 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -66,7 +66,7 @@
<filename>...</filename>
</literallayout></para>
</refsynopsisdiv>
-@@ -310,7 +310,7 @@
+@@ -314,7 +314,7 @@
<entry>Runtime units</entry>
</row>
<row>
<entry>Units of installed packages</entry>
</row>
</tbody>
-@@ -361,7 +361,7 @@
+@@ -365,7 +365,7 @@
<entry>Units of packages that have been installed in the home directory (only used when $XDG_DATA_HOME is not set)</entry>
</row>
<row>
<entry>Units of packages that have been installed system-wide</entry>
</row>
</tbody>
-@@ -1128,14 +1128,14 @@
+@@ -1137,14 +1137,14 @@
used to conditionalize units on
whether the specified directory
requires an update because
or <filename>/var</filename> on the
next following boot. Units making use
diff --git a/man/systemd.xml b/man/systemd.xml
-index bf7a7a6..4ab1aba 100644
+index e0e8d37..7273107 100644
--- a/man/systemd.xml
+++ b/man/systemd.xml
-@@ -511,7 +511,7 @@
+@@ -513,7 +513,7 @@
directories checked are
<filename>/usr/local/lib/systemd/system</filename>
and
...</programlisting>
</para>
diff --git a/man/udev.xml b/man/udev.xml
-index 87c16c7..241ceac 100644
+index 1113a66..61843c1 100644
--- a/man/udev.xml
+++ b/man/udev.xml
@@ -56,17 +56,17 @@
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/core/namespace.c b/src/core/namespace.c
-index 4bc288d..4bf73e7 100644
+index 4c41109..568ec88 100644
--- a/src/core/namespace.c
+++ b/src/core/namespace.c
-@@ -448,7 +448,7 @@ int setup_namespace(
+@@ -439,7 +439,7 @@ int setup_namespace(
strv_length(inaccessible_dirs) +
private_dev +
(protect_home != PROTECT_HOME_NO ? 3 : 0) +
(protect_system == PROTECT_SYSTEM_FULL ? 1 : 0);
if (n > 0) {
-@@ -496,7 +496,7 @@ int setup_namespace(
+@@ -487,7 +487,7 @@ int setup_namespace(
}
if (protect_system != PROTECT_SYSTEM_NO) {
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
-index 25e3cc8..91b0a52 100644
+index bf24f6a..c09b3d6 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
-@@ -178,13 +178,13 @@ static bool enable_name_policy(void) {
- log_warning("Failed to read /proc/cmdline, ignoring: %s",
- strerror(-r));
- if (r <= 0)
+@@ -178,14 +178,14 @@ static bool enable_name_policy(void) {
+ r = proc_cmdline(&line);
+ if (r < 0) {
+ log_warning_errno(r, "Failed to read /proc/cmdline, ignoring: %m");
- return true;
+ return false;
+ }
FOREACH_WORD_QUOTED(word, l, line, state)
- if (strneq(word, "net.ifnames=0", l))
1 file changed, 2 insertions(+)
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
-index cda25ed..28dc4a0 100644
+index 342f552..6823bd8 100644
--- a/src/core/mount-setup.c
+++ b/src/core/mount-setup.c
@@ -96,6 +96,8 @@ static const MountPoint mount_table[] = {
#endif
- { "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NODEV|MS_STRICTATIME,
- NULL, MNT_FATAL|MNT_IN_CONTAINER },
-+ { "tmpfs", "/run/lock", "tmpfs", "mode=1777,size=5242880", MS_NOSUID|MS_NODEV|MS_NOEXEC,
-+ NULL, MNT_FATAL|MNT_IN_CONTAINER },
- { "tmpfs", "/sys/fs/cgroup", "tmpfs", "mode=755", MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_STRICTATIME,
- NULL, MNT_FATAL|MNT_IN_CONTAINER },
- { "cgroup", "/sys/fs/cgroup/systemd", "cgroup", "none,name=systemd,xattr", MS_NOSUID|MS_NOEXEC|MS_NODEV,
+ { "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NODEV|MS_STRICTATIME,
+ NULL, MNT_FATAL|MNT_IN_CONTAINER },
++ { "tmpfs", "/run/lock", "tmpfs", "mode=1777,size=5242880", MS_NOSUID|MS_NODEV|MS_NOEXEC,
++ NULL, MNT_FATAL|MNT_IN_CONTAINER },
+ { "tmpfs", "/sys/fs/cgroup", "tmpfs", "mode=755", MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_STRICTATIME,
+ NULL, MNT_FATAL|MNT_IN_CONTAINER },
+ { "cgroup", "/sys/fs/cgroup/systemd", "cgroup", "none,name=systemd,xattr", MS_NOSUID|MS_NOEXEC|MS_NODEV,
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
-index 207a5e7..6a8b644 100644
+index b1441ad..ed25f9a 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
-@@ -5095,7 +5095,7 @@ static int import_environment(sd_bus *bus, char **args) {
+@@ -5142,7 +5142,7 @@ static int import_environment(sd_bus *bus, char **args) {
static int enable_sysv_units(const char *verb, char **args) {
int r = 0;
-#if defined(HAVE_SYSV_COMPAT) && defined(HAVE_CHKCONFIG)
+#if defined(HAVE_SYSV_COMPAT)
- unsigned f = 1, t = 1;
+ unsigned f = 0;
_cleanup_lookup_paths_free_ LookupPaths paths = {};
-@@ -5103,8 +5103,9 @@ static int enable_sysv_units(const char *verb, char **args) {
+@@ -5150,8 +5150,9 @@ static int enable_sysv_units(const char *verb, char **args) {
return 0;
if (!streq(verb, "enable") &&
return 0;
/* Processes all SysV units, and reshuffles the array so that
-@@ -5120,7 +5121,7 @@ static int enable_sysv_units(const char *verb, char **args) {
+@@ -5167,7 +5168,7 @@ static int enable_sysv_units(const char *verb, char **args) {
_cleanup_free_ char *p = NULL, *q = NULL, *l = NULL;
bool found_native = false, found_sysv;
unsigned c = 1;
char **k;
int j;
pid_t pid;
-@@ -5161,15 +5162,15 @@ static int enable_sysv_units(const char *verb, char **args) {
- /* Mark this entry, so that we don't try enabling it as native unit */
- args[f] = (char*) "";
+@@ -5205,15 +5206,15 @@ static int enable_sysv_units(const char *verb, char **args) {
+ if (!found_sysv)
+ continue;
- log_info("%s is not a native service, redirecting to /sbin/chkconfig.", name);
+ log_info("%s is not a native service, redirecting to /usr/sbin/update-rc.d.", name);
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
-index ebd8076..b1c6a36 100644
+index ad7db47..91623e2 100644
--- a/src/sysv-generator/sysv-generator.c
+++ b/src/sysv-generator/sysv-generator.c
-@@ -247,8 +247,15 @@ static int sysv_translate_facility(const char *name, const char *filename, char
+@@ -243,8 +243,15 @@ static int sysv_translate_facility(const char *name, const char *filename, char
"named", SPECIAL_NSS_LOOKUP_TARGET,
"portmap", SPECIAL_RPCBIND_TARGET,
"remote_fs", SPECIAL_REMOTE_FS_TARGET,
create mode 100644 src/default-display-manager-generator/default-display-manager-generator.c
diff --git a/Makefile.am b/Makefile.am
-index 28370df..1cb15ca 100644
+index be921b0..f1299ef 100644
--- a/Makefile.am
+++ b/Makefile.am
-@@ -402,7 +402,8 @@ systemgenerator_PROGRAMS = \
+@@ -403,7 +403,8 @@ systemgenerator_PROGRAMS = \
systemd-getty-generator \
systemd-fstab-generator \
systemd-system-update-generator \
dist_bashcompletion_DATA = \
shell-completion/bash/busctl \
-@@ -2191,6 +2192,14 @@ systemd_delta_LDADD = \
+@@ -2293,6 +2294,14 @@ systemd_delta_LDADD = \
libsystemd-shared.la
# ------------------------------------------------------------------------------
+.PHONY: all clean
diff --git a/src/default-display-manager-generator/default-display-manager-generator.c b/src/default-display-manager-generator/default-display-manager-generator.c
new file mode 100644
-index 0000000..817b30b
+index 0000000..7ca9d53
--- /dev/null
+++ b/src/default-display-manager-generator/default-display-manager-generator.c
@@ -0,0 +1,103 @@
4 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/man/journald.conf.xml b/man/journald.conf.xml
-index 5538b96..046609e 100644
+index 4edcc00..6f770e2 100644
--- a/man/journald.conf.xml
+++ b/man/journald.conf.xml
-@@ -395,8 +395,8 @@
+@@ -402,8 +402,8 @@
forwarding to syslog is enabled but no
syslog daemon is running, the
respective option has no effect. By
overridden at boot time with the
kernel command line options
<literal>systemd.journald.forward_to_syslog=</literal>,
-@@ -405,9 +405,9 @@
+@@ -412,9 +412,9 @@
and
<literal>systemd.journald.forward_to_wall=</literal>.
When forwarding to the console, the
<varlistentry>
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
-index 08b143b..50e5013 100644
+index 80c9736..9a48222 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
-@@ -1462,6 +1462,7 @@ int server_init(Server *s) {
+@@ -1472,6 +1472,7 @@ int server_init(Server *s) {
s->rate_limit_interval = DEFAULT_RATE_LIMIT_INTERVAL;
s->rate_limit_burst = DEFAULT_RATE_LIMIT_BURST;
s->max_file_usec = DEFAULT_MAX_FILE_USEC;
diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c
-index 79c07ff..e768d57 100644
+index cc44d45..e18bec3 100644
--- a/src/journal/journald-syslog.c
+++ b/src/journal/journald-syslog.c
@@ -37,14 +37,14 @@
- static void forward_syslog_iovec(Server *s, const struct iovec *iovec, unsigned n_iovec, struct ucred *ucred, struct timeval *tv) {
+ static void forward_syslog_iovec(Server *s, const struct iovec *iovec, unsigned n_iovec, const struct ucred *ucred, const struct timeval *tv) {
- static const union sockaddr_union sa = {
+ union sockaddr_union sa = {
.msg_namelen = offsetof(union sockaddr_union, un.sun_path)
+ strlen("/run/systemd/journal/syslog"),
};
-@@ -426,7 +426,7 @@ int server_open_syslog_socket(Server *s) {
+@@ -422,7 +422,7 @@ int server_open_syslog_socket(Server *s) {
assert(s);
if (s->syslog_fd < 0) {
.un.sun_path = "/run/systemd/journal/dev-log",
};
diff --git a/src/journal/journald.conf b/src/journal/journald.conf
-index 2073f1b..cded4a9 100644
+index 29bdf8f..5f99ee4 100644
--- a/src/journal/journald.conf
+++ b/src/journal/journald.conf
-@@ -23,7 +23,7 @@
+@@ -26,7 +26,7 @@
#RuntimeMaxFileSize=
#MaxRetentionSec=
#MaxFileSec=1month
[1] http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
[2] d5051f7666e25ecf2b32c7076ce18c1de969d01b
---
- src/udev/udev-event.c | 44 ++++++++++++++++++++++++++++++++++++++------
- 1 file changed, 38 insertions(+), 6 deletions(-)
+ src/udev/udev-event.c | 41 ++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 38 insertions(+), 3 deletions(-)
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
-index 30a6708..1a4e9ef 100644
+index 6b18430..4c8c220 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
-@@ -770,21 +770,53 @@ static int rename_netif(struct udev_event *event) {
+@@ -769,18 +769,53 @@ static int rename_netif(struct udev_event *event) {
char name[IFNAMSIZ];
const char *oldname;
int r;
strscpy(name, IFNAMSIZ, event->name);
r = rtnl_set_link_name(&event->rtnl, udev_device_get_ifindex(dev), name);
-- if (r < 0) {
-- log_error("error changing net interface name '%s' to '%s': %s",
-- oldname, name, strerror(-r));
-- return r;
+ if (r >= 0) {
+ log_debug("renamed network interface %s to %s\n", oldname, name);
+ goto out;
- }
-
-- log_debug("renamed network interface '%s' to '%s'\n", oldname, name);
++ }
++
+ /* keep trying if the destination interface name already exists */
+ if (r != -EEXIST)
+ goto out;
-
-- return 0;
++
+ /* free our own name, another process may wait for us */
+ snprintf(name, IFNAMSIZ, "rename%u", udev_device_get_ifindex(dev));
+ r = rtnl_set_link_name(&event->rtnl, udev_device_get_ifindex(dev), name);
-+ if (r < 0)
+ if (r < 0)
+- return log_error_errno(r, "Error changing net interface name '%s' to '%s': %m", oldname, name);
+ goto out;
-+
+
+- log_debug("renamed network interface '%s' to '%s'", oldname, name);
+ /* log temporary name */
+ log_debug("renamed network interface %s to %s\n", oldname, name);
-+
+
+- return 0;
+ /* wait a maximum of 90 seconds for our target to become available */
+ strscpy(name, IFNAMSIZ, event->name);
+ loop = 90 * 20;
1 file changed, 39 insertions(+), 1 deletion(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
-index e31d6fe..e55d65e 100644
+index 87d9c5d..98be4d0 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
-@@ -5166,8 +5166,46 @@ static int enable_sysv_units(const char *verb, char **args) {
+@@ -5208,8 +5208,46 @@ static int enable_sysv_units(const char *verb, char **args) {
continue;
}
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in
-index e30d9a8..78d2760 100644
+index b66d727..8e1896d 100644
--- a/rules/99-systemd.rules.in
+++ b/rules/99-systemd.rules.in
@@ -7,6 +7,12 @@
# Pull in rfkill save/restore for all rfkill devices
--SUBSYSTEM=="rfkill", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_WANTS}+="systemd-rfkill@$name.service"
-+SUBSYSTEM=="rfkill", TAG+="systemd", ENV{SYSTEMD_WANTS}+="systemd-rfkill@$name.service"
+-SUBSYSTEM=="rfkill", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/rfkill/devices/%k", ENV{SYSTEMD_WANTS}+="systemd-rfkill@$name.service"
++SUBSYSTEM=="rfkill", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/rfkill/devices/%k", ENV{SYSTEMD_WANTS}+="systemd-rfkill@$name.service"
# Asynchronously mount file systems implemented by these modules as
# soon as they are loaded.
1 file changed, 4 deletions(-)
diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c
-index 0c71177..aaed9b9 100644
+index 111e2b7..1c526b0 100644
--- a/src/login/pam_systemd.c
+++ b/src/login/pam_systemd.c
-@@ -222,10 +222,6 @@ _public_ PAM_EXTERN int pam_sm_open_session(
+@@ -221,10 +221,6 @@ _public_ PAM_EXTERN int pam_sm_open_session(
assert(handle);
1 file changed, 112 insertions(+), 92 deletions(-)
diff --git a/src/locale/localed.c b/src/locale/localed.c
-index 552ffdf..e3cf51d 100644
+index 8d60d0f..b76730e 100644
--- a/src/locale/localed.c
+++ b/src/locale/localed.c
-@@ -164,6 +164,24 @@ static int locale_read_data(Context *c) {
+@@ -168,6 +168,24 @@ static int locale_read_data(Context *c) {
"LC_IDENTIFICATION", &c->locale[LOCALE_LC_IDENTIFICATION],
NULL);
if (r == -ENOENT) {
int p;
-@@ -201,64 +219,17 @@ static int vconsole_read_data(Context *c) {
+@@ -205,64 +223,17 @@ static int vconsole_read_data(Context *c) {
}
static int x11_read_data(Context *c) {
- if (in_section && first_word(l, "Option")) {
- _cleanup_strv_free_ char **a = NULL;
-
-- r = strv_split_quoted(&a, l);
+- r = strv_split_quoted(&a, l, false);
- if (r < 0)
- return r;
-
- } else if (!in_section && first_word(l, "Section")) {
- _cleanup_strv_free_ char **a = NULL;
-
-- r = strv_split_quoted(&a, l);
+- r = strv_split_quoted(&a, l, false);
- if (r < 0)
- return -ENOMEM;
-
}
static int context_read_data(Context *c) {
-@@ -274,10 +245,15 @@ static int context_read_data(Context *c) {
+@@ -278,10 +249,15 @@ static int context_read_data(Context *c) {
static int locale_write_data(Context *c, char ***settings) {
int r, p;
_cleanup_strv_free_ char **l = NULL;
if (r < 0 && r != -ENOENT)
return r;
-@@ -304,13 +280,13 @@ static int locale_write_data(Context *c, char ***settings) {
+@@ -308,13 +284,13 @@ static int locale_write_data(Context *c, char ***settings) {
}
if (strv_isempty(l)) {
if (r < 0)
return r;
-@@ -431,57 +407,101 @@ static int vconsole_write_data(Context *c) {
+@@ -435,57 +411,101 @@ static int vconsole_write_data(Context *c) {
}
static int x11_write_data(Context *c) {
quota, libcap2-bin, procps, kmod and kexec-tools just to get the correct
paths. Closes: #721347
---
- configure.ac | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
+ configure.ac | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
-index f8a95cb..db4b289 100644
+index 9218ed3..adf5094 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -87,14 +87,14 @@ AC_PROG_CC_C99
+@@ -87,16 +87,16 @@ AC_PROG_CC_C99
AC_PATH_PROG([M4], [m4])
AC_PATH_PROG([XSLTPROC], [xsltproc])
+AC_PATH_PROG([QUOTAON], [quotaon], [/sbin/quotaon], [$PATH:/usr/sbin:/sbin])
+AC_PATH_PROG([QUOTACHECK], [quotacheck], [/sbin/quotacheck], [$PATH:/usr/sbin:/sbin])
+-AC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap], [$PATH:/usr/sbin:/sbin])
++AC_PATH_PROG([SETCAP], [setcap], [/sbin/setcap], [$PATH:/usr/sbin:/sbin])
+
-AC_PATH_PROG([KILL], [kill], [/usr/bin/kill], [$PATH:/usr/sbin:/sbin])
+AC_PATH_PROG([KILL], [kill], [/bin/kill], [$PATH:/usr/sbin:/sbin])
AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
-@@ -1108,13 +1108,13 @@ AC_ARG_WITH(kbd-loadkeys,
+@@ -1137,13 +1137,13 @@ AC_ARG_WITH(kbd-loadkeys,
AS_HELP_STRING([--with-kbd-loadkeys=PATH],
[Path to loadkeys]),
[KBD_LOADKEYS="$withval"],
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
-index db4b289..daf7cc2 100644
+index adf5094..8d5b192 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -222,8 +222,7 @@ CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
+@@ -224,8 +224,7 @@ CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
-Wl,--gc-sections \
-Wl,-z,relro \
-Wl,-z,now \
+++ /dev/null
-From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Sat, 29 Nov 2014 10:28:01 -0500
-Subject: delta: diff returns 1 when files differ, ignore this
-
-https://bugs.debian/org/771397
----
- src/core/shutdown.c | 2 +-
- src/delta/delta.c | 2 +-
- src/login/inhibit.c | 2 +-
- src/nspawn/nspawn.c | 4 ++--
- src/quotacheck/quotacheck.c | 2 +-
- src/shared/util.c | 22 ++++++++++++----------
- src/shared/util.h | 2 +-
- src/vconsole/vconsole-setup.c | 4 ++--
- 8 files changed, 21 insertions(+), 19 deletions(-)
-
-diff --git a/src/core/shutdown.c b/src/core/shutdown.c
-index 03cfddc..7add89f 100644
---- a/src/core/shutdown.c
-+++ b/src/core/shutdown.c
-@@ -371,7 +371,7 @@ int main(int argc, char *argv[]) {
- execv(args[0], (char * const *) args);
- _exit(EXIT_FAILURE);
- } else
-- wait_for_terminate_and_warn("kexec", pid);
-+ wait_for_terminate_and_warn("kexec", pid, true);
- }
-
- cmd = RB_AUTOBOOT;
-diff --git a/src/delta/delta.c b/src/delta/delta.c
-index 25c4a0b..9a2f17c 100644
---- a/src/delta/delta.c
-+++ b/src/delta/delta.c
-@@ -194,7 +194,7 @@ static int found_override(const char *top, const char *bottom) {
- _exit(1);
- }
-
-- wait_for_terminate_and_warn("diff", pid);
-+ wait_for_terminate_and_warn("diff", pid, false);
- putchar('\n');
-
- return k;
-diff --git a/src/login/inhibit.c b/src/login/inhibit.c
-index d5ea1d9..848f75f 100644
---- a/src/login/inhibit.c
-+++ b/src/login/inhibit.c
-@@ -274,7 +274,7 @@ int main(int argc, char *argv[]) {
- _exit(EXIT_FAILURE);
- }
-
-- r = wait_for_terminate_and_warn(argv[optind], pid);
-+ r = wait_for_terminate_and_warn(argv[optind], pid, true);
- return r < 0 ? EXIT_FAILURE : r;
- }
-
-diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
-index 14c4e13..de5c600 100644
---- a/src/nspawn/nspawn.c
-+++ b/src/nspawn/nspawn.c
-@@ -2778,7 +2778,7 @@ static int change_uid_gid(char **_home) {
-
- truncate_nl(line);
-
-- wait_for_terminate_and_warn("getent passwd", pid);
-+ wait_for_terminate_and_warn("getent passwd", pid, true);
-
- x = strchr(line, ':');
- if (!x) {
-@@ -2862,7 +2862,7 @@ static int change_uid_gid(char **_home) {
-
- truncate_nl(line);
-
-- wait_for_terminate_and_warn("getent initgroups", pid);
-+ wait_for_terminate_and_warn("getent initgroups", pid, true);
-
- /* Skip over the username and subsequent separator whitespace */
- x = line;
-diff --git a/src/quotacheck/quotacheck.c b/src/quotacheck/quotacheck.c
-index ed95b48..6c69ae3 100644
---- a/src/quotacheck/quotacheck.c
-+++ b/src/quotacheck/quotacheck.c
-@@ -107,5 +107,5 @@ int main(int argc, char *argv[]) {
- _exit(1); /* Operational error */
- }
-
-- return wait_for_terminate_and_warn("quotacheck", pid) >= 0 ? EXIT_SUCCESS : EXIT_FAILURE;
-+ return wait_for_terminate_and_warn("quotacheck", pid, true) < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
- }
-diff --git a/src/shared/util.c b/src/shared/util.c
-index 1b3bbeb..7d70bb0 100644
---- a/src/shared/util.c
-+++ b/src/shared/util.c
-@@ -3621,8 +3621,11 @@ int wait_for_terminate(pid_t pid, siginfo_t *status) {
- *
- * That is, success is indicated by a return value of zero, and an
- * error is indicated by a non-zero value.
-+ *
-+ * A warning is emitted if the process terminates abnormally,
-+ * and also if it returns non-zero unless check_exit_code is true.
- */
--int wait_for_terminate_and_warn(const char *name, pid_t pid) {
-+int wait_for_terminate_and_warn(const char *name, pid_t pid, bool check_exit_code) {
- int r;
- siginfo_t status;
-
-@@ -3636,14 +3639,13 @@ int wait_for_terminate_and_warn(const char *name, pid_t pid) {
- }
-
- if (status.si_code == CLD_EXITED) {
-- if (status.si_status != 0) {
-- log_warning("%s failed with error code %i.", name, status.si_status);
-- return status.si_status;
-- }
--
-- log_debug("%s succeeded.", name);
-- return 0;
-+ if (status.si_status != 0)
-+ log_full(check_exit_code ? LOG_WARNING : LOG_DEBUG,
-+ "%s failed with error code %i.", name, status.si_status);
-+ else
-+ log_debug("%s succeeded.", name);
-
-+ return status.si_status;
- } else if (status.si_code == CLD_KILLED ||
- status.si_code == CLD_DUMPED) {
-
-@@ -3998,13 +4000,13 @@ void execute_directory(const char *directory, DIR *d, usec_t timeout, char *argv
- path = hashmap_remove(pids, UINT_TO_PTR(pid));
- assert(path);
-
-- wait_for_terminate_and_warn(path, pid);
-+ wait_for_terminate_and_warn(path, pid, true);
- }
-
- _exit(EXIT_SUCCESS);
- }
-
-- wait_for_terminate_and_warn(directory, executor_pid);
-+ wait_for_terminate_and_warn(directory, executor_pid, true);
- }
-
- int kill_and_sigcont(pid_t pid, int sig) {
-diff --git a/src/shared/util.h b/src/shared/util.h
-index f928034..21dfae3 100644
---- a/src/shared/util.h
-+++ b/src/shared/util.h
-@@ -506,7 +506,7 @@ char *unquote(const char *s, const char *quotes);
- char *normalize_env_assignment(const char *s);
-
- int wait_for_terminate(pid_t pid, siginfo_t *status);
--int wait_for_terminate_and_warn(const char *name, pid_t pid);
-+int wait_for_terminate_and_warn(const char *name, pid_t pid, bool check_exit_code);
-
- noreturn void freeze(void);
-
-diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
-index 0db97f8..4f29caa 100644
---- a/src/vconsole/vconsole-setup.c
-+++ b/src/vconsole/vconsole-setup.c
-@@ -310,7 +310,7 @@ int main(int argc, char **argv) {
- }
-
- if (font_pid > 0)
-- wait_for_terminate_and_warn(KBD_SETFONT, font_pid);
-+ wait_for_terminate_and_warn(KBD_SETFONT, font_pid, true);
-
- r = keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid);
- if (r < 0) {
-@@ -319,7 +319,7 @@ int main(int argc, char **argv) {
- }
-
- if (keymap_pid > 0)
-- wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid);
-+ wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid, true);
-
- /* Only copy the font when we started setfont successfully */
- if (font_copy && font_pid > 0)
1 file changed, 6 insertions(+)
diff --git a/src/login/logind-core.c b/src/login/logind-core.c
-index ed7ea5d..22c2e10 100644
+index 88694f9..323a15e 100644
--- a/src/login/logind-core.c
+++ b/src/login/logind-core.c
@@ -34,6 +34,7 @@
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
-index e257c12..dd0e07c 100644
+index 1f34594..70c9df9 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
-@@ -168,9 +168,7 @@ static bool mount_is_network(struct mntent *me) {
+@@ -166,9 +166,7 @@ static bool mount_is_network(struct mntent *me) {
static bool mount_in_initrd(struct mntent *me) {
assert(me);
+++ /dev/null
-From: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Fri, 28 Nov 2014 15:38:05 +0100
-Subject: hostnamectl: Exit with zero on success
-
-In show_all_names(), bus_map_all_properties() returns 1 on success which is
-then used as the return code of show_all_names() and eventually main(). Exit
-with zero in main() on all nonnegative results to guard against similar errors.
----
- src/hostname/hostnamectl.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/hostname/hostnamectl.c b/src/hostname/hostnamectl.c
-index e487369..ff4e9c9 100644
---- a/src/hostname/hostnamectl.c
-+++ b/src/hostname/hostnamectl.c
-@@ -536,5 +536,5 @@ int main(int argc, char *argv[]) {
- r = hostnamectl_main(bus, argc, argv);
-
- finish:
-- return r < 0 ? EXIT_FAILURE : r;
-+ return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
- }
create mode 100644 src/insserv-generator/insserv-generator.c
diff --git a/Makefile.am b/Makefile.am
-index 34d6e7b..ed038fc 100644
+index 7648572..1ccee3f 100644
--- a/Makefile.am
+++ b/Makefile.am
-@@ -398,6 +398,7 @@ rootlibexec_PROGRAMS += \
+@@ -399,6 +399,7 @@ rootlibexec_PROGRAMS += \
endif
systemgenerator_PROGRAMS = \
systemd-getty-generator \
systemd-fstab-generator \
systemd-system-update-generator \
-@@ -2184,6 +2185,14 @@ systemd_delta_LDADD = \
+@@ -2286,6 +2287,14 @@ systemd_delta_LDADD = \
libsystemd-shared.la
# ------------------------------------------------------------------------------
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
-index 1205b48..171a024 100644
+index 9ff1302..dd052fb 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -20,6 +20,7 @@
assert(u);
-@@ -321,6 +323,12 @@ static int user_mkdir_runtime_path(User *u) {
+@@ -319,6 +321,12 @@ static int user_mkdir_runtime_path(User *u) {
} else
p = u->runtime_path;
if (path_is_mount_point(p, false) <= 0) {
_cleanup_free_ char *t = NULL;
-@@ -512,7 +520,7 @@ static int user_remove_runtime_path(User *u) {
+@@ -510,7 +518,7 @@ static int user_remove_runtime_path(User *u) {
if (r < 0)
- log_error("Failed to remove runtime directory %s: %s", u->runtime_path, strerror(-r));
+ log_error_errno(r, "Failed to remove runtime directory %s: %m", u->runtime_path);
- if (umount2(u->runtime_path, MNT_DETACH) < 0)
+ if (path_is_mount_point(u->runtime_path, false) && umount2(u->runtime_path, MNT_DETACH) < 0)
- log_error("Failed to unmount user runtime directory %s: %m", u->runtime_path);
+ log_error_errno(errno, "Failed to unmount user runtime directory %s: %m", u->runtime_path);
r = rm_rf(u->runtime_path, false, true, false);
+++ /dev/null
-From: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Thu, 20 Nov 2014 14:30:52 +0100
-Subject: nspawn: Add try-{host,guest} journal link modes
-
---link-journal={host,guest} fail if the host does not have persistent
-journalling enabled and /var/log/journal/ does not exist. Even worse, as there
-is no stdout/err any more, there is no error message to point that out.
-
-Introduce two new modes "try-host" and "try-guest" which don't fail in this
-case, and instead just silently skip the guest journal setup.
-
-Change -j to mean "try-guest" instead of "guest", and fix the wrong --help
-output for it (it said "host" before).
-
-Change systemd-nspawn@.service.in to use "try-guest" so that this unit works
-with both persistent and non-persistent journals on the host without failing.
-
-https://bugs.debian.org/770275
----
- man/systemd-nspawn.xml | 11 ++++++++---
- src/nspawn/nspawn.c | 37 +++++++++++++++++++++++++++++--------
- units/systemd-nspawn@.service.in | 2 +-
- 3 files changed, 38 insertions(+), 12 deletions(-)
-
-diff --git a/man/systemd-nspawn.xml b/man/systemd-nspawn.xml
-index b3a2d32..75db65e 100644
---- a/man/systemd-nspawn.xml
-+++ b/man/systemd-nspawn.xml
-@@ -439,7 +439,9 @@
- versa). Takes one of
- <literal>no</literal>,
- <literal>host</literal>,
-+ <literal>try-host</literal>,
- <literal>guest</literal>,
-+ <literal>try-guest</literal>,
- <literal>auto</literal>. If
- <literal>no</literal>, the journal is
- not linked. If <literal>host</literal>,
-@@ -453,8 +455,11 @@
- guest file system (beneath
- <filename>/var/log/journal/<replaceable>machine-id</replaceable></filename>)
- and the subdirectory is symlinked into the host
-- at the same location. If
-- <literal>auto</literal> (the default),
-+ at the same location. <literal>try-host</literal>
-+ and <literal>try-guest</literal> do the same
-+ but do not fail if the host does not have
-+ persistant journalling enabled.
-+ If <literal>auto</literal> (the default),
- and the right subdirectory of
- <filename>/var/log/journal</filename>
- exists, it will be bind mounted
-@@ -473,7 +478,7 @@
- <term><option>-j</option></term>
-
- <listitem><para>Equivalent to
-- <option>--link-journal=guest</option>.</para></listitem>
-+ <option>--link-journal=try-guest</option>.</para></listitem>
- </varlistentry>
-
- <varlistentry>
-diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
-index f332ade..14c4e13 100644
---- a/src/nspawn/nspawn.c
-+++ b/src/nspawn/nspawn.c
-@@ -123,6 +123,7 @@ static bool arg_private_network = false;
- static bool arg_read_only = false;
- static bool arg_boot = false;
- static LinkJournal arg_link_journal = LINK_AUTO;
-+static bool arg_link_journal_try = false;
- static uint64_t arg_retain =
- (1ULL << CAP_CHOWN) |
- (1ULL << CAP_DAC_OVERRIDE) |
-@@ -201,8 +202,9 @@ static void help(void) {
- " --capability=CAP In addition to the default, retain specified\n"
- " capability\n"
- " --drop-capability=CAP Drop the specified capability from the default set\n"
-- " --link-journal=MODE Link up guest journal, one of no, auto, guest, host\n"
-- " -j Equivalent to --link-journal=host\n"
-+ " --link-journal=MODE Link up guest journal, one of no, auto, guest, host,\n"
-+ " try-guest, try-host\n"
-+ " -j Equivalent to --link-journal=try-guest\n"
- " --read-only Mount the root directory read-only\n"
- " --bind=PATH[:PATH] Bind mount a file or directory from the host into\n"
- " the container\n"
-@@ -427,6 +429,7 @@ static int parse_argv(int argc, char *argv[]) {
-
- case 'j':
- arg_link_journal = LINK_GUEST;
-+ arg_link_journal_try = true;
- break;
-
- case ARG_LINK_JOURNAL:
-@@ -438,7 +441,13 @@ static int parse_argv(int argc, char *argv[]) {
- arg_link_journal = LINK_GUEST;
- else if (streq(optarg, "host"))
- arg_link_journal = LINK_HOST;
-- else {
-+ else if (streq(optarg, "try-guest")) {
-+ arg_link_journal = LINK_GUEST;
-+ arg_link_journal_try = true;
-+ } else if (streq(optarg, "try-host")) {
-+ arg_link_journal = LINK_HOST;
-+ arg_link_journal_try = true;
-+ } else {
- log_error("Failed to parse link journal mode %s", optarg);
- return -EINVAL;
- }
-@@ -1403,8 +1412,13 @@ static int setup_journal(const char *directory) {
- if (arg_link_journal == LINK_GUEST) {
-
- if (symlink(q, p) < 0) {
-- log_error("Failed to symlink %s to %s: %m", q, p);
-- return -errno;
-+ if (arg_link_journal_try) {
-+ log_debug("Failed to symlink %s to %s, skipping journal setup: %m", q, p);
-+ return 0;
-+ } else {
-+ log_error("Failed to symlink %s to %s: %m", q, p);
-+ return -errno;
-+ }
- }
-
- r = mkdir_p(q, 0755);
-@@ -1414,10 +1428,17 @@ static int setup_journal(const char *directory) {
- }
-
- if (arg_link_journal == LINK_HOST) {
-- r = mkdir_p(p, 0755);
-+ /* don't create parents here -- if the host doesn't have
-+ * permanent journal set up, don't force it here */
-+ r = mkdir(p, 0755);
- if (r < 0) {
-- log_error("Failed to create %s: %m", p);
-- return r;
-+ if (arg_link_journal_try) {
-+ log_debug("Failed to create %s, skipping journal setup: %m", p);
-+ return 0;
-+ } else {
-+ log_error("Failed to create %s: %m", p);
-+ return r;
-+ }
- }
-
- } else if (access(p, F_OK) < 0)
-diff --git a/units/systemd-nspawn@.service.in b/units/systemd-nspawn@.service.in
-index 574d0de..05dd2b3 100644
---- a/units/systemd-nspawn@.service.in
-+++ b/units/systemd-nspawn@.service.in
-@@ -10,7 +10,7 @@ Description=Container %i
- Documentation=man:systemd-nspawn(1)
-
- [Service]
--ExecStart=@bindir@/systemd-nspawn --quiet --keep-unit --boot --link-journal=guest --directory=/var/lib/container/%i
-+ExecStart=@bindir@/systemd-nspawn --quiet --keep-unit --boot --link-journal=try-guest --directory=/var/lib/container/%i
- KillMode=mixed
- Type=notify
- RestartForceExitStatus=133
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/src/libsystemd/sd-bus/bus-internal.c b/src/libsystemd/sd-bus/bus-internal.c
-index 0bea8ca..2c1b69e 100644
+index 91b288c..a0741be 100644
--- a/src/libsystemd/sd-bus/bus-internal.c
+++ b/src/libsystemd/sd-bus/bus-internal.c
-@@ -166,6 +166,19 @@ bool service_name_is_valid(const char *p) {
- return true;
+@@ -186,6 +186,19 @@ char* service_name_startswith(const char *a, const char *b) {
+ return NULL;
}
+bool sender_name_is_valid(const char *p) {
const char *q;
diff --git a/src/libsystemd/sd-bus/bus-internal.h b/src/libsystemd/sd-bus/bus-internal.h
-index 57247d7..dd3c316 100644
+index 977b340..85dcc88 100644
--- a/src/libsystemd/sd-bus/bus-internal.h
+++ b/src/libsystemd/sd-bus/bus-internal.h
-@@ -339,6 +339,7 @@ struct sd_bus {
-
+@@ -343,6 +343,7 @@ struct sd_bus {
bool interface_name_is_valid(const char *p) _pure_;
bool service_name_is_valid(const char *p) _pure_;
+ char* service_name_startswith(const char *a, const char *b);
+bool sender_name_is_valid(const char *p) _pure_;
bool member_name_is_valid(const char *p) _pure_;
bool object_path_is_valid(const char *p) _pure_;
char *object_path_startswith(const char *a, const char *b) _pure_;
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
-index 1362a60..57dd132 100644
+index 06d8d77..fb55c50 100644
--- a/src/libsystemd/sd-bus/bus-message.c
+++ b/src/libsystemd/sd-bus/bus-message.c
-@@ -5056,7 +5056,7 @@ int bus_message_parse_fields(sd_bus_message *m) {
+@@ -5118,7 +5118,7 @@ int bus_message_parse_fields(sd_bus_message *m) {
if (!streq(signature, "s"))
return -EBADMSG;
break;
case BUS_MESSAGE_HEADER_SENDER:
-@@ -5067,7 +5067,7 @@ int bus_message_parse_fields(sd_bus_message *m) {
+@@ -5129,7 +5129,7 @@ int bus_message_parse_fields(sd_bus_message *m) {
if (!streq(signature, "s"))
return -EBADMSG;
+++ /dev/null
-From: Lukas Nykryn <lnykryn@redhat.com>
-Date: Fri, 21 Nov 2014 17:02:15 +0100
-Subject: selinux-access: fix broken ternary operator
-
-it seems to be a typo introduced by ebcf1f97de4f6b1580ae55eb56b1a3939fe6b602
-- _r = selinux_access_check(_b, _m, _u->source_path ?:_u->fragment_path, (permission), &_error); \
-+ ({ Unit *_unit = (unit); selinux_generic_access_check(bus,message, _unit->fragment_path ?: _unit->fragment_path, permission,error); })
----
- src/core/selinux-access.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/core/selinux-access.h b/src/core/selinux-access.h
-index bccf0d2..dd1e8bb 100644
---- a/src/core/selinux-access.h
-+++ b/src/core/selinux-access.h
-@@ -40,7 +40,7 @@ int mac_selinux_unit_access_check_strv(char **units, sd_bus_message *message, Ma
- #define mac_selinux_unit_access_check(unit, message, permission, error) \
- ({ \
- Unit *_unit = (unit); \
-- mac_selinux_generic_access_check((message), _unit->fragment_path ?: _unit->fragment_path, (permission), (error)); \
-+ mac_selinux_generic_access_check((message), _unit->source_path ?: _unit->fragment_path, (permission), (error)); \
- })
-
- #else
-## Cherry-picked patches:
-v217-stable.patch
-nspawn-Add-try-host-guest-journal-link-modes.patch
-tmpfiles.d-Create-var-lib-container.patch
-selinux-access-fix-broken-ternary-operator.patch
-shared-add-readlink_value.patch
-hostnamectl-Exit-with-zero-on-success.patch
-delta-diff-returns-1-when-files-differ-ignore-this.patch
-
-## Debian specific patches:
Add-back-support-for-Debian-specific-config-files.patch
Make-systemctl-enable-disable-call-update-rc.d-for-s.patch
Also-redirect-to-update-rc.d-when-not-using-.service.patch
+++ /dev/null
-From: Tom Gundersen <teg@jklm.no>
-Date: Fri, 7 Nov 2014 19:19:02 +0100
-Subject: shared: add readlink_value
-
-Reads the basename of the target of a symlink.
----
- src/shared/util.c | 22 ++++++++++++++++++++++
- src/shared/util.h | 1 +
- 2 files changed, 23 insertions(+)
-
-diff --git a/src/shared/util.c b/src/shared/util.c
-index 4143f6d..1b3bbeb 100644
---- a/src/shared/util.c
-+++ b/src/shared/util.c
-@@ -893,6 +893,28 @@ int readlink_malloc(const char *p, char **ret) {
- return readlinkat_malloc(AT_FDCWD, p, ret);
- }
-
-+int readlink_value(const char *p, char **ret) {
-+ _cleanup_free_ char *link = NULL;
-+ char *value;
-+ int r;
-+
-+ r = readlink_malloc(p, &link);
-+ if (r < 0)
-+ return r;
-+
-+ value = basename(link);
-+ if (!value)
-+ return -ENOENT;
-+
-+ value = strdup(value);
-+ if (!value)
-+ return -ENOMEM;
-+
-+ *ret = value;
-+
-+ return 0;
-+}
-+
- int readlink_and_make_absolute(const char *p, char **r) {
- _cleanup_free_ char *target = NULL;
- char *k;
-diff --git a/src/shared/util.h b/src/shared/util.h
-index 3558446..f928034 100644
---- a/src/shared/util.h
-+++ b/src/shared/util.h
-@@ -270,6 +270,7 @@ char **replace_env_argv(char **argv, char **env);
-
- int readlinkat_malloc(int fd, const char *p, char **ret);
- int readlink_malloc(const char *p, char **r);
-+int readlink_value(const char *p, char **ret);
- int readlink_and_make_absolute(const char *p, char **r);
- int readlink_and_canonicalize(const char *p, char **r);
-
=?utf-8?q?ing/disabling_sysv_units?=
---
- src/systemctl/systemctl.c | 11 +++++------
- 1 file changed, 5 insertions(+), 6 deletions(-)
+ src/systemctl/systemctl.c | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
-index 939ea81..e31d6fe 100644
+index 0e7e5e9..87d9c5d 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
-@@ -5144,9 +5144,6 @@ static int enable_sysv_units(const char *verb, char **args) {
+@@ -5191,9 +5191,6 @@ static int enable_sysv_units(const char *verb, char **args) {
break;
}
p = path_join(arg_root, SYSTEM_SYSVINIT_PATH, name);
if (!p)
return log_oom();
-@@ -5157,10 +5154,12 @@ static int enable_sysv_units(const char *verb, char **args) {
+@@ -5204,7 +5201,7 @@ static int enable_sysv_units(const char *verb, char **args) {
if (!found_sysv)
continue;
-- /* Mark this entry, so that we don't try enabling it as native unit */
-- args[f] = (char*) "";
-+ if (!found_native) {
-+ /* Mark this entry, so that we don't try enabling it as native unit */
-+ args[f] = (char*) "";
-+ }
-
- log_info("%s is not a native service, redirecting to /usr/sbin/update-rc.d.", name);
+ log_info("Synchronizing state for %s with sysvinit using update-rc.d...", name);
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
-index b1c6a36..b66ae01 100644
+index 91623e2..1efd8b8 100644
--- a/src/sysv-generator/sysv-generator.c
+++ b/src/sysv-generator/sysv-generator.c
-@@ -781,6 +781,10 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
+@@ -777,6 +777,10 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
service->name = name;
service->path = fpath;
r = hashmap_put(all_services, service->name, service);
if (r < 0)
return log_oom();
-@@ -970,10 +974,6 @@ int main(int argc, char *argv[]) {
+@@ -966,10 +970,6 @@ int main(int argc, char *argv[]) {
}
HASHMAP_FOREACH(service, all_services, j) {
1 file changed, 93 insertions(+), 1 deletion(-)
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
-index 3a55d65..74a926f 100644
+index 84b5259..8b9afdf 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -23,6 +23,9 @@
#include "sd-id128.h"
#include "sd-messages.h"
-@@ -40,6 +43,7 @@
- #include "bus-util.h"
- #include "bus-errors.h"
+@@ -41,6 +44,7 @@
+ #include "bus-error.h"
+ #include "bus-common-errors.h"
#include "event-util.h"
+#include "copy.h"
#define NULL_ADJTIME_UTC "0.0 0 0\n0\nUTC\n"
#define NULL_ADJTIME_LOCAL "0.0 0 0\n0\nLOCAL\n"
-@@ -59,6 +63,94 @@ static void context_free(Context *c) {
+@@ -65,6 +69,94 @@ static void context_free(Context *c) {
bus_verify_polkit_async_registry_free(c->polkit_registry);
}
static int context_read_data(Context *c) {
_cleanup_free_ char *t = NULL;
int r;
-@@ -127,7 +219,7 @@ static int context_write_data_timezone(Context *c) {
+@@ -133,7 +225,7 @@ static int context_write_data_timezone(Context *c) {
if (!p)
return log_oom();
+++ /dev/null
-From: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Thu, 20 Nov 2014 14:37:08 +0100
-Subject: tmpfiles.d: Create /var/lib/container
-
-Create /var/lib/container so that it exists with an appropriate mode. We want
-0700 by default so that users on the host aren't able to call suid root
-binaries in the container. This becomes a security issue if a user can enter a
-container as root, create a suid root binary, and call that from the host.
-(This assumes that containers are caged by mandatory access control or are
-started as user).
----
- tmpfiles.d/var.conf | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/tmpfiles.d/var.conf b/tmpfiles.d/var.conf
-index 4b63e41..d9545fe 100644
---- a/tmpfiles.d/var.conf
-+++ b/tmpfiles.d/var.conf
-@@ -18,4 +18,6 @@ f /var/log/btmp 0600 root utmp -
- d /var/cache 0755 - - -
-
- d /var/lib 0755 - - -
-+d /var/lib/container 0700 - - -
-+
- d /var/spool 0755 - - -
+++ /dev/null
-From: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Mon, 1 Dec 2014 13:17:02 +0100
-Subject: v217-stable
-
-Import v217-stable patches up to
-
- timer: reenable TIMER_ACTIVE timers when restarted
-
-(bfb4c47ddd, 2014-11-07)
----
- Makefile.am | 4 ++
- NEWS | 7 ++-
- README | 1 -
- TODO | 7 ---
- hwdb/20-bluetooth-vendor-product.hwdb | 57 ++++++++++++++++++
- hwdb/60-keyboard.hwdb | 5 ++
- man/hostnamectl.xml | 3 +-
- man/journalctl.xml | 4 +-
- man/sd_event_add_defer.xml | 2 +-
- man/tmpfiles.d.xml | 4 +-
- man/udevadm.xml | 11 +++-
- shell-completion/bash/hostnamectl | 2 +-
- shell-completion/bash/systemctl.in | 33 ++++++-----
- shell-completion/zsh/_hostnamectl | 2 +-
- shell-completion/zsh/_systemctl.in | 28 ++++++---
- src/core/machine-id-setup.c | 17 ++++--
- src/core/manager.c | 96 +++++++++++++++++--------------
- src/core/shutdown.c | 17 ++++--
- src/core/snapshot.c | 2 +-
- src/core/timer.c | 6 ++
- src/core/transaction.c | 6 +-
- src/hostname/hostnamed.c | 3 +-
- src/journal/journal-vacuum.c | 6 +-
- src/journal/journald-server.c | 1 +
- src/kernel-install/90-loaderentry.install | 2 +-
- src/libsystemd-network/sd-dhcp-client.c | 3 +
- src/libsystemd-network/sd-dhcp6-client.c | 10 ++--
- src/libsystemd/sd-bus/bus-match.c | 2 +-
- src/libudev/libudev-util.c | 10 +++-
- src/libudev/libudev.c | 28 ++++++---
- src/locale/localectl.c | 2 +-
- src/nspawn/nspawn.c | 55 +++++++-----------
- src/shared/capability.c | 4 +-
- src/shared/copy.h | 3 +
- src/shared/install.c | 8 +--
- src/shared/locale-util.h | 4 ++
- src/shared/logs-show.c | 2 +-
- src/shared/selinux-util.c | 8 ++-
- src/shared/switch-root.c | 12 ++--
- src/systemctl/systemctl.c | 62 +++++++++++++++-----
- src/sysusers/sysusers.c | 61 +++++++++++++-------
- src/udev/scsi_id/scsi_id.c | 4 +-
- src/udev/udev-builtin-path_id.c | 12 ++--
- src/udev/udevd.c | 24 ++++----
- src/vconsole/90-vconsole.rules | 11 ++++
- units/basic.target | 6 +-
- units/poweroff.target | 2 -
- units/reboot.target | 2 -
- units/systemd-journal-flush.service.in | 6 +-
- units/systemd-journald.service.in | 1 +
- units/timers.target | 3 +
- 51 files changed, 442 insertions(+), 229 deletions(-)
- create mode 100644 src/vconsole/90-vconsole.rules
-
-diff --git a/Makefile.am b/Makefile.am
-index c80d25d..22fd306 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1527,6 +1527,7 @@ test_util_SOURCES = \
- src/test/test-util.c
-
- test_util_LDADD = \
-+ -lm \
- libsystemd-core.la
-
- test_uid_range_SOURCES = \
-@@ -4402,6 +4403,9 @@ rootlibexec_PROGRAMS += \
- nodist_systemunit_DATA += \
- units/systemd-vconsole-setup.service
-
-+dist_udevrules_DATA += \
-+ src/vconsole/90-vconsole.rules
-+
- SYSINIT_TARGET_WANTS += \
- systemd-vconsole-setup.service
- endif
-diff --git a/NEWS b/NEWS
-index 84a43fd..0ed03da 100644
---- a/NEWS
-+++ b/NEWS
-@@ -7,6 +7,11 @@ CHANGES WITH 217:
- show log timestamps in the UTC timezone. journalctl now also
- accepts -n/--lines=all to disable line capping in a pager.
-
-+ * journalctl gained a new switch, --flush, that synchronously
-+ flushes logs from /run/log/journal to /var/log/journal if
-+ persistent storage is enabled. systemd-journal-flush.service
-+ now waits until the operation is complete.
-+
- * Services can notify the manager before they start a reload
- (by sending RELOADING=1) or shutdown (by sending
- STOPPING=1). This allows the manager to track and show the
-@@ -76,7 +81,7 @@ CHANGES WITH 217:
- rotating media anymore, and nobody stepped up to actively
- maintain this component of systemd it has now been removed.
-
-- * Swap units can use Discard= to specify discard options.
-+ * Swap units can use Options= to specify discard options.
- Discard options specified for swaps in /etc/fstab are now
- respected.
-
-diff --git a/README b/README
-index 99b66a8..1440367 100644
---- a/README
-+++ b/README
-@@ -30,7 +30,6 @@ AUTHOR:
-
- LICENSE:
- LGPLv2.1+ for all code
-- - except sd-readahead.[ch] which is MIT
- - except src/shared/MurmurHash2.c which is Public Domain
- - except src/shared/siphash24.c which is CC0 Public Domain
- - except src/journal/lookup3.c which is Public Domain
-diff --git a/TODO b/TODO
-index b07d664..abe89b7 100644
---- a/TODO
-+++ b/TODO
-@@ -646,13 +646,6 @@ Features:
-
- * and a dbus call to generate target from current state
-
--* readahead:
-- - drop /.readahead on bigger upgrades with yum
-- - move readahead files into /var (look for them with .path units?)
-- - readahead: use BTRFS_IOC_DEFRAG_RANGE instead of BTRFS_IOC_DEFRAG ioctl, with START_IO
-- - readahead: when bumping /sys readahead variable save mtime and compare later to detect changes
-- - readahead: make use of EXT4_IOC_MOVE_EXT, as used by http://e4rat.sourceforge.net/
--
- * GC unreferenced jobs (such as .device jobs)
-
- * write blog stories about:
-diff --git a/hwdb/20-bluetooth-vendor-product.hwdb b/hwdb/20-bluetooth-vendor-product.hwdb
-index ee2efdf..58ca87d 100644
---- a/hwdb/20-bluetooth-vendor-product.hwdb
-+++ b/hwdb/20-bluetooth-vendor-product.hwdb
-@@ -1166,3 +1166,60 @@ bluetooth:v0181*
-
- bluetooth:v0182*
- ID_VENDOR_FROM_DATABASE=HOP Ubiquitous
-+
-+bluetooth:v0183*
-+ ID_VENDOR_FROM_DATABASE=To Be Assigned
-+
-+bluetooth:v0184*
-+ ID_VENDOR_FROM_DATABASE=Nectar
-+
-+bluetooth:v0185*
-+ ID_VENDOR_FROM_DATABASE=bel'apps LLC
-+
-+bluetooth:v0186*
-+ ID_VENDOR_FROM_DATABASE=CORE Lighting Ltd
-+
-+bluetooth:v0187*
-+ ID_VENDOR_FROM_DATABASE=Seraphim Sense Ltd
-+
-+bluetooth:v0188*
-+ ID_VENDOR_FROM_DATABASE=Unico RBC
-+
-+bluetooth:v0189*
-+ ID_VENDOR_FROM_DATABASE=Physical Enterprises Inc.
-+
-+bluetooth:v018A*
-+ ID_VENDOR_FROM_DATABASE=Able Trend Technology Limited
-+
-+bluetooth:v018B*
-+ ID_VENDOR_FROM_DATABASE=Konica Minolta, Inc.
-+
-+bluetooth:v018C*
-+ ID_VENDOR_FROM_DATABASE=Wilo SE
-+
-+bluetooth:v018D*
-+ ID_VENDOR_FROM_DATABASE=Extron Design Services
-+
-+bluetooth:v018E*
-+ ID_VENDOR_FROM_DATABASE=Fitbit, Inc.
-+
-+bluetooth:v018F*
-+ ID_VENDOR_FROM_DATABASE=Fireflies Systems
-+
-+bluetooth:v0190*
-+ ID_VENDOR_FROM_DATABASE=Intelletto Technologies Inc.
-+
-+bluetooth:v0191*
-+ ID_VENDOR_FROM_DATABASE=FDK CORPORATION
-+
-+bluetooth:v0192*
-+ ID_VENDOR_FROM_DATABASE=Cloudleaf, Inc
-+
-+bluetooth:v0193*
-+ ID_VENDOR_FROM_DATABASE=Maveric Automation LLC
-+
-+bluetooth:v0194*
-+ ID_VENDOR_FROM_DATABASE=Acoustic Stream Corporation
-+
-+bluetooth:v0195*
-+ ID_VENDOR_FROM_DATABASE=Zuli
-diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb
-index 06caba9..d2ca965 100644
---- a/hwdb/60-keyboard.hwdb
-+++ b/hwdb/60-keyboard.hwdb
-@@ -230,6 +230,11 @@ keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*1110:pvr*
- keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*1210:pvr*
- KEYBOARD_KEY_84=wlan
-
-+# Dell Inspiron 1520
-+keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*1520:pvr*
-+ KEYBOARD_KEY_85=unknown # Brightness Down, also emitted by acpi-video, ignore
-+ KEYBOARD_KEY_86=unknown # Brightness Up, also emitted by acpi-video, ignore
-+
- # Latitude XT2
- keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*XT2:pvr*
- KEYBOARD_KEY_9b=up # tablet rocker up
-diff --git a/man/hostnamectl.xml b/man/hostnamectl.xml
-index 128d92f..ffae5e6 100644
---- a/man/hostnamectl.xml
-+++ b/man/hostnamectl.xml
-@@ -217,7 +217,8 @@
- <literal>server</literal>,
- <literal>tablet</literal>,
- <literal>handset</literal>,
-- <literal>watch</literal>, as well as
-+ <literal>watch</literal>,
-+ <literal>embedded</literal> as well as
- the special chassis types
- <literal>vm</literal> and
- <literal>container</literal> for
-diff --git a/man/journalctl.xml b/man/journalctl.xml
-index db2a1e1..0ed3ca3 100644
---- a/man/journalctl.xml
-+++ b/man/journalctl.xml
-@@ -883,9 +883,9 @@
-
- <listitem><para>Asks the Journal
- daemon to flush any log data stored in
-- <filename>/run/systemd/log</filename>
-+ <filename>/run/log/journal</filename>
- into
-- <filename>/var/systemd/log</filename>,
-+ <filename>/var/log/journal</filename>,
- if persistent storage is enabled. This
- call does not return until the
- operation is
-diff --git a/man/sd_event_add_defer.xml b/man/sd_event_add_defer.xml
-index 442600a..dcc76cd 100644
---- a/man/sd_event_add_defer.xml
-+++ b/man/sd_event_add_defer.xml
-@@ -104,7 +104,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
- default, the handler will be called once
- (<constant>SD_EVENT_ONESHOT</constant>).</para>
-
-- <para><function>sd_event_add_defer()</function> adds a new event
-+ <para><function>sd_event_add_post()</function> adds a new event
- source that will "fire" if any event handlers are invoked whenever
- the event loop is run. By default, the source is enabled
- permanently (<constant>SD_EVENT_ON</constant>).</para>
-diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml
-index f2360ba..1b14d69 100644
---- a/man/tmpfiles.d.xml
-+++ b/man/tmpfiles.d.xml
-@@ -108,8 +108,8 @@
- filename in lexicographic order, regardless of which
- of the directories they reside in. If multiple files
- specify the same path, the entry in the file with the
-- lexicographically earliest name will be applied, all
-- all other conflicting entries will be logged as
-+ lexicographically earliest name will be applied.
-+ All other conflicting entries will be logged as
- errors. When two lines are prefix and suffix of each
- other, then the prefix is always processed first, the
- suffix later. Otherwise, the files/directories are
-diff --git a/man/udevadm.xml b/man/udevadm.xml
-index b85d9a9..fd17f40 100644
---- a/man/udevadm.xml
-+++ b/man/udevadm.xml
-@@ -368,9 +368,14 @@
- <term><option>-l</option></term>
- <term><option>--log-priority=<replaceable>value</replaceable></option></term>
- <listitem>
-- <para>Set the internal log level of systemd-udevd. Valid values are the numerical
-- syslog priorities or their textual representations: <option>err</option>,
-- <option>info</option> and <option>debug</option>.</para>
-+ <para>Set the internal log level of
-+ <filename>systemd-udevd</filename>. Valid values are the
-+ numerical syslog priorities or their textual
-+ representations: <option>emerg</option>,
-+ <option>alert</option>, <option>crit</option>,
-+ <option>err</option>, <option>warning</option>,
-+ <option>notice</option>, <option>info</option>, and
-+ <option>debug</option>.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
-diff --git a/shell-completion/bash/hostnamectl b/shell-completion/bash/hostnamectl
-index a5e3460..7a0850d 100644
---- a/shell-completion/bash/hostnamectl
-+++ b/shell-completion/bash/hostnamectl
-@@ -52,7 +52,7 @@ _hostnamectl() {
- if [[ -z $verb ]]; then
- comps=${VERBS[*]}
- elif __contains_word "$verb" ${VERBS[CHASSIS]}; then
-- comps='desktop laptop server tablet handset watch vm container'
-+ comps='desktop laptop server tablet handset watch embedded vm container'
- elif __contains_word "$verb" ${VERBS[STANDALONE]} ${VERBS[ICONS]} ${VERBS[NAME]}; then
- comps=''
- fi
-diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in
-index 1c44a8d..9e98a18 100644
---- a/shell-completion/bash/systemctl.in
-+++ b/shell-completion/bash/systemctl.in
-@@ -52,20 +52,29 @@ __filter_units_by_property () {
- }
-
- __get_all_units () { { __systemctl $1 list-unit-files; __systemctl $1 list-units --all; } \
-- | { while read -r a b; do echo " $a"; done; }; }
-+ | { while read -r a b; do [[ $a =~ @\. ]] || echo " $a"; done; }; }
- __get_template_names () { __systemctl $1 list-unit-files \
- | { while read -r a b; do [[ $a =~ @\. ]] && echo " ${a%%@.*}@"; done; }; }
-
- __get_active_units () { __systemctl $1 list-units \
- | { while read -r a b; do echo " $a"; done; }; }
- __get_startable_units () {
-- # find inactive or failed units, filter out masked and not-found
-- __systemctl $1 list-units --state inactive,failed -- $( __get_all_units ) | \
-- { while read -r a b c d; do [[ $b == "loaded" ]] && echo " $a"; done; }; }
-+ # find startable inactive units
-+ __filter_units_by_property $mode ActiveState inactive $(
-+ __filter_units_by_property $mode CanStart yes $(
-+ __systemctl $mode list-unit-files --state enabled,disabled,static | \
-+ { while read -r a b; do [[ $a =~ @\. ]] || echo " $a"; done; }
-+ __systemctl $mode list-units --state inactive,failed | \
-+ { while read -r a b; do echo " $a"; done; } ))
-+}
- __get_restartable_units () {
-- # find !masked, filter out masked and not-found
-- __systemctl $1 list-units --state active,inactive,failed -- $( __get_all_units ) | \
-- { while read -r a b c d; do [[ $b == "loaded" ]] && echo " $a"; done; }; }
-+ # filter out masked and not-found
-+ __filter_units_by_property $mode CanStart yes $(
-+ __systemctl $mode list-unit-files --state enabled,disabled,static | \
-+ { while read -r a b; do [[ $a =~ @\. ]] || echo " $a"; done; }
-+ __systemctl $mode list-units | \
-+ { while read -r a b; do echo " $a"; done; } )
-+}
- __get_failed_units () { __systemctl $1 list-units \
- | { while read -r a b c d; do [[ $c == "failed" ]] && echo " $a"; done; }; }
- __get_enabled_units () { __systemctl $1 list-unit-files \
-@@ -186,15 +195,13 @@ _systemctl () {
- compopt -o filenames
-
- elif __contains_word "$verb" ${VERBS[STARTABLE_UNITS]}; then
-- comps=$( __filter_units_by_property $mode CanStart yes \
-- $( __get_startable_units $mode);
-- __get_template_names $mode)
-+ comps=$( __get_startable_units $mode;
-+ __get_template_names $mode)
- compopt -o filenames
-
- elif __contains_word "$verb" ${VERBS[RESTARTABLE_UNITS]}; then
-- comps=$( __filter_units_by_property $mode CanStart yes \
-- $( __get_restartable_units $mode); \
-- __get_template_names $mode)
-+ comps=$( __get_restartable_units $mode;
-+ __get_template_names $mode)
- compopt -o filenames
-
- elif __contains_word "$verb" ${VERBS[STOPPABLE_UNITS]}; then
-diff --git a/shell-completion/zsh/_hostnamectl b/shell-completion/zsh/_hostnamectl
-index e02f6de..a7217a1 100644
---- a/shell-completion/zsh/_hostnamectl
-+++ b/shell-completion/zsh/_hostnamectl
-@@ -18,7 +18,7 @@ _hostnamectl_set-icon-name() {
-
- _hostnamectl_set-chassis() {
- if (( CURRENT <= 3 )); then
-- _chassis=( desktop laptop server tablet handset watch vm container )
-+ _chassis=( desktop laptop server tablet handset watch embedded vm container )
- _describe chassis _chassis
- else
- _message "no more options"
-diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
-index 44981fe..7eefe53 100644
---- a/shell-completion/zsh/_systemctl.in
-+++ b/shell-completion/zsh/_systemctl.in
-@@ -141,13 +141,29 @@ _filter_units_by_property() {
- done
- }
-
--_systemctl_all_units() { { __systemctl list-unit-files; __systemctl list-units --all; } | { while read -r a b; do echo -E - " $a"; done; } }
-+_systemctl_all_units() { { __systemctl list-unit-files; __systemctl list-units --all; } | { while read -r a b; do [[ $a =~ @\. ]] || echo -E - " $a"; done; } }
- _systemctl_get_template_names() { __systemctl list-unit-files | { while read -r a b; do [[ $a =~ @\. ]] && echo -E - " ${a%%@.*}@"; done; } }
-
-
- _systemctl_active_units() {_sys_active_units=( $(__systemctl list-units | { while read -r a b; do echo -E - " $a"; done; }) )}
--_systemctl_startable_units(){_sys_startable_units=($(__systemctl list-units --state inactive,failed -- $(_systemctl_all_units) | { while read -r a b c d; do [[ $b == "loaded" ]] && echo -E - " $a"; done; }) )}
--_systemctl_restartable_units(){_sys_restartable_units=($(__systemctl list-units --state inactive,failed,active -- $(_systemctl_all_units) | { while read -r a b c d; do [[ $b == "loaded" ]] && echo -E - " $a"; done; }) )}
-+
-+_systemctl_startable_units(){
-+ _sys_startable_units=(_filter_units_by_property ActiveState inactive $(
-+ _filter_units_by_property CanStart yes $(
-+ __systemctl $mode list-unit-files --state enabled,disabled,static | \
-+ { while read -r a b; do [[ $a =~ @\. ]] || echo -E - " $a"; done; }
-+ __systemctl $mode list-units --state inactive,failed | \
-+ { while read -r a b; do echo -E - " $a"; done; } )))
-+}
-+
-+_systemctl_restartable_units(){
-+ _sys_restartable_units=(_filter_units_by_property CanStart yes $(
-+ __systemctl $mode list-unit-files --state enabled,disabled,static | \
-+ { while read -r a b; do [[ $a =~ @\. ]] || echo -E - " $a"; done; }
-+ __systemctl $mode list-units | \
-+ { while read -r a b; do echo -E - " $a"; done; } ))
-+}
-+
- _systemctl_failed_units() {_sys_failed_units=( $(__systemctl list-units --failed | { while read -r a b; do echo -E - " $a"; done; }) )}
- _systemctl_enabled_units() {_sys_enabled_units=( $(__systemctl list-unit-files | { while read -r a b; do [[ $b == "enabled" ]] && echo -E - " $a"; done; }) )}
- _systemctl_disabled_units(){_sys_disabled_units=($(__systemctl list-unit-files | { while read -r a b; do [[ $b == "disabled" ]] && echo -E - " $a"; done; }) )}
-@@ -194,8 +210,7 @@ done
- (( $+functions[_systemctl_start] )) || _systemctl_start()
- {
- _systemctl_startable_units
-- compadd "$@" - $( _filter_units_by_property CanStart yes \
-- ${_sys_startable_units[*]} )
-+ compadd "$@" - ${_sys_startable_units[*]} $(_systemctl_get_template_names)
- }
-
- # Completion functions for STOPPABLE_UNITS
-@@ -231,8 +246,7 @@ for fun in restart reload-or-restart ; do
- (( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
- {
- _systemctl_restartable_units
-- compadd "$@" - $( _filter_units_by_property CanStart yes \
-- ${_sys_restartable_units[*]} )
-+ compadd "$@" - ${_sys_restartable_units[*]} $(_systemctl_get_template_names)
- }
- done
-
-diff --git a/src/core/machine-id-setup.c b/src/core/machine-id-setup.c
-index efb074f..ce6d8e0 100644
---- a/src/core/machine-id-setup.c
-+++ b/src/core/machine-id-setup.c
-@@ -162,7 +162,7 @@ static int generate(char id[34], const char *root) {
- int machine_id_setup(const char *root) {
- const char *etc_machine_id, *run_machine_id;
- _cleanup_close_ int fd = -1;
-- bool writable = false;
-+ bool writable = true;
- struct stat st;
- char id[34]; /* 32 + \n + \0 */
- int r;
-@@ -186,12 +186,19 @@ int machine_id_setup(const char *root) {
-
- mkdir_parents(etc_machine_id, 0755);
- fd = open(etc_machine_id, O_RDWR|O_CREAT|O_CLOEXEC|O_NOCTTY, 0444);
-- if (fd >= 0)
-- writable = true;
-- else {
-+ if (fd < 0) {
-+ int old_errno = errno;
-+
- fd = open(etc_machine_id, O_RDONLY|O_CLOEXEC|O_NOCTTY);
- if (fd < 0) {
-- log_error("Cannot open %s: %m", etc_machine_id);
-+ if (old_errno == EROFS && errno == ENOENT)
-+ log_error("System cannot boot: Missing /etc/machine-id and /etc is mounted read-only.\n"
-+ "Booting up is supported only when:\n"
-+ "1) /etc/machine-id exists and is populated.\n"
-+ "2) /etc/machine-id exists and is empty.\n"
-+ "3) /etc/machine-id is missing and /etc is writable.\n");
-+ else
-+ log_error("Cannot open %s: %m", etc_machine_id);
- return -errno;
- }
-
-diff --git a/src/core/manager.c b/src/core/manager.c
-index d427d88..47e23ba 100644
---- a/src/core/manager.c
-+++ b/src/core/manager.c
-@@ -662,9 +662,11 @@ static int manager_setup_notify(Manager *m) {
- return -errno;
- }
-
-- if (m->running_as == SYSTEMD_SYSTEM)
-+ if (m->running_as == SYSTEMD_SYSTEM) {
- m->notify_socket = strdup("/run/systemd/notify");
-- else {
-+ if (!m->notify_socket)
-+ return log_oom();
-+ } else {
- const char *e;
-
- e = getenv("XDG_RUNTIME_DIR");
-@@ -674,9 +676,11 @@ static int manager_setup_notify(Manager *m) {
- }
-
- m->notify_socket = strappend(e, "/systemd/notify");
-+ if (!m->notify_socket)
-+ return log_oom();
-+
-+ mkdir_parents_label(m->notify_socket, 0755);
- }
-- if (!m->notify_socket)
-- return log_oom();
-
- strncpy(sa.un.sun_path, m->notify_socket, sizeof(sa.un.sun_path)-1);
- r = bind(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(sa.un.sun_path));
-@@ -2584,45 +2588,13 @@ bool manager_unit_inactive_or_pending(Manager *m, const char *name) {
- return unit_inactive_or_pending(u);
- }
-
--void manager_check_finished(Manager *m) {
-+static void manager_notify_finished(Manager *m) {
- char userspace[FORMAT_TIMESPAN_MAX], initrd[FORMAT_TIMESPAN_MAX], kernel[FORMAT_TIMESPAN_MAX], sum[FORMAT_TIMESPAN_MAX];
- usec_t firmware_usec, loader_usec, kernel_usec, initrd_usec, userspace_usec, total_usec;
-- Unit *u = NULL;
-- Iterator i;
--
-- assert(m);
--
-- if (m->n_running_jobs == 0)
-- m->jobs_in_progress_event_source = sd_event_source_unref(m->jobs_in_progress_event_source);
-
-- if (hashmap_size(m->jobs) > 0) {
--
-- if (m->jobs_in_progress_event_source)
-- sd_event_source_set_time(m->jobs_in_progress_event_source, now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_WAIT_USEC);
--
-- return;
-- }
--
-- manager_flip_auto_status(m, false);
--
-- /* Notify Type=idle units that we are done now */
-- m->idle_pipe_event_source = sd_event_source_unref(m->idle_pipe_event_source);
-- manager_close_idle_pipe(m);
--
-- /* Turn off confirm spawn now */
-- m->confirm_spawn = false;
--
-- /* No need to update ask password status when we're going non-interactive */
-- manager_close_ask_password(m);
--
-- /* This is no longer the first boot */
-- manager_set_first_boot(m, false);
--
-- if (dual_timestamp_is_set(&m->finish_timestamp))
-+ if (m->test_run)
- return;
-
-- dual_timestamp_get(&m->finish_timestamp);
--
- if (m->running_as == SYSTEMD_SYSTEM && detect_container(NULL) <= 0) {
-
- /* Note that m->kernel_usec.monotonic is always at 0,
-@@ -2677,10 +2649,6 @@ void manager_check_finished(Manager *m) {
- NULL);
- }
-
-- SET_FOREACH(u, m->startup_units, i)
-- if (u->cgroup_path)
-- cgroup_context_apply(unit_get_cgroup_context(u), unit_get_cgroup_mask(u), u->cgroup_path, manager_state(m));
--
- bus_manager_send_finished(m, firmware_usec, loader_usec, kernel_usec, initrd_usec, userspace_usec, total_usec);
-
- sd_notifyf(false,
-@@ -2689,6 +2657,50 @@ void manager_check_finished(Manager *m) {
- format_timespan(sum, sizeof(sum), total_usec, USEC_PER_MSEC));
- }
-
-+void manager_check_finished(Manager *m) {
-+ Unit *u = NULL;
-+ Iterator i;
-+
-+ assert(m);
-+
-+ if (m->n_running_jobs == 0)
-+ m->jobs_in_progress_event_source = sd_event_source_unref(m->jobs_in_progress_event_source);
-+
-+ if (hashmap_size(m->jobs) > 0) {
-+
-+ if (m->jobs_in_progress_event_source)
-+ sd_event_source_set_time(m->jobs_in_progress_event_source, now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_WAIT_USEC);
-+
-+ return;
-+ }
-+
-+ manager_flip_auto_status(m, false);
-+
-+ /* Notify Type=idle units that we are done now */
-+ m->idle_pipe_event_source = sd_event_source_unref(m->idle_pipe_event_source);
-+ manager_close_idle_pipe(m);
-+
-+ /* Turn off confirm spawn now */
-+ m->confirm_spawn = false;
-+
-+ /* No need to update ask password status when we're going non-interactive */
-+ manager_close_ask_password(m);
-+
-+ /* This is no longer the first boot */
-+ manager_set_first_boot(m, false);
-+
-+ if (dual_timestamp_is_set(&m->finish_timestamp))
-+ return;
-+
-+ dual_timestamp_get(&m->finish_timestamp);
-+
-+ manager_notify_finished(m);
-+
-+ SET_FOREACH(u, m->startup_units, i)
-+ if (u->cgroup_path)
-+ cgroup_context_apply(unit_get_cgroup_context(u), unit_get_cgroup_mask(u), u->cgroup_path, manager_state(m));
-+}
-+
- static int create_generator_dir(Manager *m, char **generator, const char *name) {
- char *p;
- int r;
-diff --git a/src/core/shutdown.c b/src/core/shutdown.c
-index 20cf526..03cfddc 100644
---- a/src/core/shutdown.c
-+++ b/src/core/shutdown.c
-@@ -75,7 +75,9 @@ static int parse_argv(int argc, char *argv[]) {
- assert(argc >= 1);
- assert(argv);
-
-- while ((c = getopt_long(argc, argv, "", options, NULL)) >= 0)
-+ /* "-" prevents getopt from permuting argv[] and moving the verb away
-+ * from argv[1]. Our interface to initrd promises it'll be there. */
-+ while ((c = getopt_long(argc, argv, "-", options, NULL)) >= 0)
- switch (c) {
-
- case ARG_LOG_LEVEL:
-@@ -113,6 +115,13 @@ static int parse_argv(int argc, char *argv[]) {
-
- break;
-
-+ case '\001':
-+ if (!arg_verb)
-+ arg_verb = optarg;
-+ else
-+ log_error("Excess arguments, ignoring");
-+ break;
-+
- case '?':
- return -EINVAL;
-
-@@ -120,15 +129,11 @@ static int parse_argv(int argc, char *argv[]) {
- assert_not_reached("Unhandled option code.");
- }
-
-- if (optind >= argc) {
-+ if (!arg_verb) {
- log_error("Verb argument missing.");
- return -EINVAL;
- }
-
-- arg_verb = argv[optind];
--
-- if (optind + 1 < argc)
-- log_error("Excess arguments, ignoring");
- return 0;
- }
-
-diff --git a/src/core/snapshot.c b/src/core/snapshot.c
-index 5eed615..c2678cb 100644
---- a/src/core/snapshot.c
-+++ b/src/core/snapshot.c
-@@ -208,7 +208,7 @@ int snapshot_create(Manager *m, const char *name, bool cleanup, sd_bus_error *e,
- return sd_bus_error_setf(e, SD_BUS_ERROR_INVALID_ARGS, "Unit name %s lacks snapshot suffix.", name);
-
- if (manager_get_unit(m, name))
-- sd_bus_error_setf(e, BUS_ERROR_UNIT_EXISTS, "Snapshot %s exists already.", name);
-+ return sd_bus_error_setf(e, BUS_ERROR_UNIT_EXISTS, "Snapshot %s exists already.", name);
-
- } else {
-
-diff --git a/src/core/timer.c b/src/core/timer.c
-index a3713e2..5c4e9f9 100644
---- a/src/core/timer.c
-+++ b/src/core/timer.c
-@@ -521,6 +521,7 @@ fail:
-
- static int timer_start(Unit *u) {
- Timer *t = TIMER(u);
-+ TimerValue *v;
-
- assert(t);
- assert(t->state == TIMER_DEAD || t->state == TIMER_FAILED);
-@@ -530,6 +531,11 @@ static int timer_start(Unit *u) {
-
- t->last_trigger = DUAL_TIMESTAMP_NULL;
-
-+ /* Reenable all timers that depend on unit activation time */
-+ LIST_FOREACH(value, v, t->values)
-+ if (v->base == TIMER_ACTIVE)
-+ v->disabled = false;
-+
- if (t->stamp_path) {
- struct stat st;
-
-diff --git a/src/core/transaction.c b/src/core/transaction.c
-index dbb4133..91f5ee1 100644
---- a/src/core/transaction.c
-+++ b/src/core/transaction.c
-@@ -377,9 +377,9 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi
- for (k = from; k; k = ((k->generation == generation && k->marker != k) ? k->marker : NULL)) {
-
- /* logging for j not k here here to provide consistent narrative */
-- log_info_unit(j->unit->id,
-- "Found dependency on %s/%s",
-- k->unit->id, job_type_to_string(k->type));
-+ log_warning_unit(j->unit->id,
-+ "Found dependency on %s/%s",
-+ k->unit->id, job_type_to_string(k->type));
-
- if (!delete && hashmap_get(tr->jobs, k->unit) &&
- !unit_matters_to_anchor(k->unit, k)) {
-diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
-index a449610..0123922 100644
---- a/src/hostname/hostnamed.c
-+++ b/src/hostname/hostnamed.c
-@@ -138,7 +138,8 @@ static bool valid_chassis(const char *chassis) {
- "server\0"
- "tablet\0"
- "handset\0"
-- "watch\0",
-+ "watch\0"
-+ "embedded\0",
- chassis);
- }
-
-diff --git a/src/journal/journal-vacuum.c b/src/journal/journal-vacuum.c
-index 7699482..226af82 100644
---- a/src/journal/journal-vacuum.c
-+++ b/src/journal/journal-vacuum.c
-@@ -275,7 +275,11 @@ int journal_directory_vacuum(
-
- patch_realtime(directory, p, &st, &realtime);
-
-- GREEDY_REALLOC(list, n_allocated, n_list + 1);
-+ if (!GREEDY_REALLOC(list, n_allocated, n_list + 1)) {
-+ free(p);
-+ r = -ENOMEM;
-+ goto finish;
-+ }
-
- list[n_list].filename = p;
- list[n_list].usage = 512UL * (uint64_t) st.st_blocks;
-diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
-index 12735c4..08b143b 100644
---- a/src/journal/journald-server.c
-+++ b/src/journal/journald-server.c
-@@ -1655,6 +1655,7 @@ void server_done(Server *s) {
- free(s->buffer);
- free(s->tty_path);
- free(s->cgroup_root);
-+ free(s->hostname_field);
-
- if (s->mmap)
- mmap_cache_unref(s->mmap);
-diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install
-index 6f032b5..d433e00 100644
---- a/src/kernel-install/90-loaderentry.install
-+++ b/src/kernel-install/90-loaderentry.install
-@@ -47,7 +47,7 @@ if [[ -f /etc/kernel/cmdline ]]; then
- fi
-
- if ! [[ ${BOOT_OPTIONS[*]} ]]; then
-- read -ar line < /proc/cmdline
-+ read -a line -r < /proc/cmdline
- for i in "${line[@]}"; do
- [[ "${i#initrd=*}" != "$i" ]] && continue
- BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
-diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
-index 0eba4c3..1f7f238 100644
---- a/src/libsystemd-network/sd-dhcp-client.c
-+++ b/src/libsystemd-network/sd-dhcp-client.c
-@@ -1269,6 +1269,9 @@ static int client_handle_message(sd_dhcp_client *client, DHCPMessage *message,
- if (r >= 0) {
- client->timeout_resend =
- sd_event_source_unref(client->timeout_resend);
-+ client->receive_message =
-+ sd_event_source_unref(client->receive_message);
-+ client->fd = asynchronous_close(client->fd);
-
- if (IN_SET(client->state, DHCP_STATE_REQUESTING,
- DHCP_STATE_REBOOTING))
-diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
-index fa4f9b5..dbec1a2 100644
---- a/src/libsystemd-network/sd-dhcp6-client.c
-+++ b/src/libsystemd-network/sd-dhcp6-client.c
-@@ -200,19 +200,19 @@ int sd_dhcp6_client_set_duid(sd_dhcp6_client *client, uint16_t type, uint8_t *du
-
- switch (type) {
- case DHCP6_DUID_LLT:
-- if (duid_len <= sizeof(client->duid.llt))
-+ if (duid_len <= sizeof(client->duid.llt) - 2)
- return -EINVAL;
- break;
- case DHCP6_DUID_EN:
-- if (duid_len != sizeof(client->duid.en))
-+ if (duid_len != sizeof(client->duid.en) - 2)
- return -EINVAL;
- break;
- case DHCP6_DUID_LL:
-- if (duid_len <= sizeof(client->duid.ll))
-+ if (duid_len <= sizeof(client->duid.ll) - 2)
- return -EINVAL;
- break;
- case DHCP6_DUID_UUID:
-- if (duid_len != sizeof(client->duid.uuid))
-+ if (duid_len != sizeof(client->duid.uuid) - 2)
- return -EINVAL;
- break;
- default:
-@@ -222,7 +222,7 @@ int sd_dhcp6_client_set_duid(sd_dhcp6_client *client, uint16_t type, uint8_t *du
-
- client->duid.raw.type = htobe16(type);
- memcpy(&client->duid.raw.data, duid, duid_len);
-- client->duid_len = duid_len;
-+ client->duid_len = duid_len + 2; /* +2 for sizeof(type) */
-
- return 0;
- }
-diff --git a/src/libsystemd/sd-bus/bus-match.c b/src/libsystemd/sd-bus/bus-match.c
-index 18afe0f..5658c61 100644
---- a/src/libsystemd/sd-bus/bus-match.c
-+++ b/src/libsystemd/sd-bus/bus-match.c
-@@ -537,7 +537,7 @@ static int bus_match_find_compare_value(
- else if (BUS_MATCH_CAN_HASH(t))
- n = hashmap_get(c->compare.children, value_str);
- else {
-- for (n = c->child; !value_node_same(n, t, value_u8, value_str); n = n->next)
-+ for (n = c->child; n && !value_node_same(n, t, value_u8, value_str); n = n->next)
- ;
- }
-
-diff --git a/src/libudev/libudev-util.c b/src/libudev/libudev-util.c
-index f3fdf3b..0bc10f3 100644
---- a/src/libudev/libudev-util.c
-+++ b/src/libudev/libudev-util.c
-@@ -159,9 +159,13 @@ int util_log_priority(const char *priority)
- char *endptr;
- int prio;
-
-- prio = strtol(priority, &endptr, 10);
-- if (endptr[0] == '\0' || isspace(endptr[0]))
-- return prio;
-+ prio = strtoul(priority, &endptr, 10);
-+ if (endptr[0] == '\0' || isspace(endptr[0])) {
-+ if (prio >= 0 && prio <= 7)
-+ return prio;
-+ else
-+ return -ERANGE;
-+ }
-
- return log_level_from_string(priority);
- }
-diff --git a/src/libudev/libudev.c b/src/libudev/libudev.c
-index e2ab960..05f3b47 100644
---- a/src/libudev/libudev.c
-+++ b/src/libudev/libudev.c
-@@ -119,7 +119,7 @@ _public_ struct udev *udev_new(void)
- {
- struct udev *udev;
- const char *env;
-- FILE *f;
-+ _cleanup_fclose_ FILE *f = NULL;
-
- udev = new0(struct udev, 1);
- if (udev == NULL)
-@@ -132,7 +132,7 @@ _public_ struct udev *udev_new(void)
- f = fopen("/etc/udev/udev.conf", "re");
- if (f != NULL) {
- char line[UTIL_LINE_SIZE];
-- int line_nr = 0;
-+ unsigned line_nr = 0;
-
- while (fgets(line, sizeof(line), f)) {
- size_t len;
-@@ -153,7 +153,7 @@ _public_ struct udev *udev_new(void)
- /* split key/value */
- val = strchr(key, '=');
- if (val == NULL) {
-- udev_err(udev, "missing <key>=<value> in /etc/udev/udev.conf[%i]; skip line\n", line_nr);
-+ udev_err(udev, "/etc/udev/udev.conf:%u: missing assignment, skipping line.\n", line_nr);
- continue;
- }
- val[0] = '\0';
-@@ -185,7 +185,7 @@ _public_ struct udev *udev_new(void)
- /* unquote */
- if (val[0] == '"' || val[0] == '\'') {
- if (val[len-1] != val[0]) {
-- udev_err(udev, "inconsistent quoting in /etc/udev/udev.conf[%i]; skip line\n", line_nr);
-+ udev_err(udev, "/etc/udev/udev.conf:%u: inconsistent quoting, skipping line.\n", line_nr);
- continue;
- }
- val[len-1] = '\0';
-@@ -193,17 +193,29 @@ _public_ struct udev *udev_new(void)
- }
-
- if (streq(key, "udev_log")) {
-- udev_set_log_priority(udev, util_log_priority(val));
-+ int prio;
-+
-+ prio = util_log_priority(val);
-+ if (prio < 0)
-+ udev_err(udev, "/etc/udev/udev.conf:%u: invalid logging level '%s', ignoring.\n", line_nr, val);
-+ else
-+ udev_set_log_priority(udev, prio);
- continue;
- }
- }
-- fclose(f);
- }
-
- /* environment overrides config */
- env = secure_getenv("UDEV_LOG");
-- if (env != NULL)
-- udev_set_log_priority(udev, util_log_priority(env));
-+ if (env != NULL) {
-+ int prio;
-+
-+ prio = util_log_priority(env);
-+ if (prio < 0)
-+ udev_err(udev, "$UDEV_LOG specifies invalid logging level '%s', ignoring.\n", env);
-+ else
-+ udev_set_log_priority(udev, prio);
-+ }
-
- return udev;
- }
-diff --git a/src/locale/localectl.c b/src/locale/localectl.c
-index 3690f9f..d4a2d29 100644
---- a/src/locale/localectl.c
-+++ b/src/locale/localectl.c
-@@ -505,7 +505,7 @@ static void help(void) {
- " list-locales Show known locales\n"
- " set-keymap MAP [MAP] Set virtual console keyboard mapping\n"
- " list-keymaps Show known virtual console keyboard mappings\n"
-- " set-x11-keymap LAYOUT [MODEL] [VARIANT] [OPTIONS]\n"
-+ " set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]\n"
- " Set X11 keyboard mapping\n"
- " list-x11-keymap-models Show known X11 keyboard mapping models\n"
- " list-x11-keymap-layouts Show known X11 keyboard mapping layouts\n"
-diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
-index b6d9bc6..f332ade 100644
---- a/src/nspawn/nspawn.c
-+++ b/src/nspawn/nspawn.c
-@@ -758,7 +758,7 @@ static int mount_binds(const char *dest, char **l, bool ro) {
- * and char devices. */
- if (S_ISDIR(source_st.st_mode)) {
- r = mkdir_label(where, 0755);
-- if (r < 0) {
-+ if (r < 0 && errno != EEXIST) {
- log_error("Failed to create mount point %s: %s", where, strerror(-r));
-
- return r;
-@@ -2911,8 +2911,8 @@ static int change_uid_gid(char **_home) {
- * container argument.
- * > 0 : The program executed in the container terminated with an
- * error. The exit code of the program executed in the
-- * container is returned. No change is made to the container
-- * argument.
-+ * container is returned. The container argument has been set
-+ * to CONTAINER_TERMINATED.
- * 0 : The container is being rebooted, has been shut down or exited
- * successfully. The container argument has been set to either
- * CONTAINER_TERMINATED or CONTAINER_REBOOTED.
-@@ -2921,8 +2921,8 @@ static int change_uid_gid(char **_home) {
- * error is indicated by a non-zero value.
- */
- static int wait_for_container(pid_t pid, ContainerStatus *container) {
-- int r;
- siginfo_t status;
-+ int r;
-
- r = wait_for_terminate(pid, &status);
- if (r < 0) {
-@@ -2931,51 +2931,40 @@ static int wait_for_container(pid_t pid, ContainerStatus *container) {
- }
-
- switch (status.si_code) {
-+
- case CLD_EXITED:
-- r = status.si_status;
-- if (r == 0) {
-- if (!arg_quiet)
-- log_debug("Container %s exited successfully.",
-- arg_machine);
-+ if (status.si_status == 0) {
-+ log_full(arg_quiet ? LOG_DEBUG : LOG_INFO, "Container %s exited successfully.", arg_machine);
-
-- *container = CONTAINER_TERMINATED;
-- } else {
-- log_error("Container %s failed with error code %i.",
-- arg_machine, status.si_status);
-- }
-- break;
-+ } else
-+ log_full(arg_quiet ? LOG_DEBUG : LOG_INFO, "Container %s failed with error code %i.", arg_machine, status.si_status);
-+
-+ *container = CONTAINER_TERMINATED;
-+ return status.si_status;
-
- case CLD_KILLED:
- if (status.si_status == SIGINT) {
-- if (!arg_quiet)
-- log_info("Container %s has been shut down.",
-- arg_machine);
-
-+ log_full(arg_quiet ? LOG_DEBUG : LOG_INFO, "Container %s has been shut down.", arg_machine);
- *container = CONTAINER_TERMINATED;
-- r = 0;
-- break;
-+ return 0;
-+
- } else if (status.si_status == SIGHUP) {
-- if (!arg_quiet)
-- log_info("Container %s is being rebooted.",
-- arg_machine);
-
-+ log_full(arg_quiet ? LOG_DEBUG : LOG_INFO, "Container %s is being rebooted.", arg_machine);
- *container = CONTAINER_REBOOTED;
-- r = 0;
-- break;
-+ return 0;
- }
-+
- /* CLD_KILLED fallthrough */
-
- case CLD_DUMPED:
-- log_error("Container %s terminated by signal %s.",
-- arg_machine, signal_to_string(status.si_status));
-- r = -1;
-- break;
-+ log_error("Container %s terminated by signal %s.", arg_machine, signal_to_string(status.si_status));
-+ return -EIO;
-
- default:
-- log_error("Container %s failed due to unknown reason.",
-- arg_machine);
-- r = -1;
-- break;
-+ log_error("Container %s failed due to unknown reason.", arg_machine);
-+ return -EIO;
- }
-
- return r;
-diff --git a/src/shared/capability.c b/src/shared/capability.c
-index d2b9013..0226542 100644
---- a/src/shared/capability.c
-+++ b/src/shared/capability.c
-@@ -228,7 +228,7 @@ int drop_privileges(uid_t uid, gid_t gid, uint64_t keep_capabilities) {
- * which we want to avoid. */
-
- if (setresgid(gid, gid, gid) < 0) {
-- log_error("Failed change group ID: %m");
-+ log_error("Failed to change group ID: %m");
- return -errno;
- }
-
-@@ -244,7 +244,7 @@ int drop_privileges(uid_t uid, gid_t gid, uint64_t keep_capabilities) {
-
- r = setresuid(uid, uid, uid);
- if (r < 0) {
-- log_error("Failed change user ID: %m");
-+ log_error("Failed to change user ID: %m");
- return -errno;
- }
-
-diff --git a/src/shared/copy.h b/src/shared/copy.h
-index 0bf2598..6b93107 100644
---- a/src/shared/copy.h
-+++ b/src/shared/copy.h
-@@ -21,6 +21,9 @@
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
- ***/
-
-+#include <stdbool.h>
-+#include <sys/types.h>
-+
- int copy_file(const char *from, const char *to, int flags, mode_t mode);
- int copy_tree(const char *from, const char *to, bool merge);
- int copy_bytes(int fdf, int fdt, off_t max_bytes);
-diff --git a/src/shared/install.c b/src/shared/install.c
-index 035b44c..cab93e8 100644
---- a/src/shared/install.c
-+++ b/src/shared/install.c
-@@ -1620,12 +1620,10 @@ int unit_file_enable(
- STRV_FOREACH(i, files) {
- UnitFileState state;
-
-+ /* We only want to know if this unit is masked, so we ignore
-+ * errors from unit_file_get_state, deferring other checks.
-+ * This allows templated units to be enabled on the fly. */
- state = unit_file_get_state(scope, root_dir, *i);
-- if (state < 0) {
-- log_error("Failed to get unit file state for %s: %s", *i, strerror(-state));
-- return state;
-- }
--
- if (state == UNIT_FILE_MASKED || state == UNIT_FILE_MASKED_RUNTIME) {
- log_error("Failed to enable unit: Unit %s is masked", *i);
- return -ENOTSUP;
-diff --git a/src/shared/locale-util.h b/src/shared/locale-util.h
-index d7a3e4f..e48aa3d 100644
---- a/src/shared/locale-util.h
-+++ b/src/shared/locale-util.h
-@@ -21,6 +21,10 @@
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
- ***/
-
-+#include <stdbool.h>
-+
-+#include "macro.h"
-+
- typedef enum LocaleVariable {
- /* We don't list LC_ALL here on purpose. People should be
- * using LANG instead. */
-diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
-index 04e1165..e33824b 100644
---- a/src/shared/logs-show.c
-+++ b/src/shared/logs-show.c
-@@ -365,7 +365,7 @@ static int output_short(
- fprintf(f, " %.*s", (int) comm_len, comm);
- n += comm_len + 1;
- } else
-- fputc(' ', f);
-+ fputs(" unknown", f);
-
- if (pid && shall_print(pid, pid_len, flags)) {
- fprintf(f, "[%.*s]", (int) pid_len, pid);
-diff --git a/src/shared/selinux-util.c b/src/shared/selinux-util.c
-index 1eddd17..6bd3bf1 100644
---- a/src/shared/selinux-util.c
-+++ b/src/shared/selinux-util.c
-@@ -332,9 +332,13 @@ int mac_selinux_create_file_prepare(const char *path, mode_t mode) {
- r = selabel_lookup_raw(label_hnd, &filecon, newpath, mode);
- }
-
-- if (r < 0 && errno != ENOENT)
-+ /* No context specified by the policy? Proceed without setting it. */
-+ if (r < 0 && errno == ENOENT)
-+ return 0;
-+
-+ if (r < 0)
- r = -errno;
-- else if (r == 0) {
-+ else {
- r = setfscreatecon(filecon);
- if (r < 0) {
- log_enforcing("Failed to set SELinux security context %s for %s: %m", filecon, path);
-diff --git a/src/shared/switch-root.c b/src/shared/switch-root.c
-index bac0e5c..3adb846 100644
---- a/src/shared/switch-root.c
-+++ b/src/shared/switch-root.c
-@@ -47,7 +47,6 @@ int switch_root(const char *new_root, const char *oldroot, bool detach_oldroot,
- struct stat new_root_stat;
- bool old_root_remove;
- const char *i, *temporary_old_root;
-- int r;
-
- if (path_equal(new_root, "/"))
- return 0;
-@@ -103,11 +102,12 @@ int switch_root(const char *new_root, const char *oldroot, bool detach_oldroot,
- }
- }
-
-- r = base_filesystem_create(new_root);
-- if (r < 0) {
-- log_error("Failed to create the base filesystem: %s", strerror(-r));
-- return r;
-- }
-+ /* Do not fail, if base_filesystem_create() fails. Not all
-+ * switch roots are like base_filesystem_create() wants them
-+ * to look like. They might even boot, if they are RO and
-+ * don't have the FS layout. Just ignore the error and
-+ * switch_root() nevertheless. */
-+ (void) base_filesystem_create(new_root);
-
- if (chdir(new_root) < 0) {
- log_error("Failed to change directory to %s: %m", new_root);
-diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
-index 28eaa6a..207a5e7 100644
---- a/src/systemctl/systemctl.c
-+++ b/src/systemctl/systemctl.c
-@@ -301,21 +301,37 @@ static int compare_unit_info(const void *a, const void *b) {
- }
-
- static bool output_show_unit(const UnitInfo *u, char **patterns) {
-- const char *dot;
--
- if (!strv_isempty(patterns)) {
- char **pattern;
-
- STRV_FOREACH(pattern, patterns)
- if (fnmatch(*pattern, u->id, FNM_NOESCAPE) == 0)
-- return true;
-+ goto next;
- return false;
- }
-
-- return (!arg_types || ((dot = strrchr(u->id, '.')) &&
-- strv_find(arg_types, dot+1))) &&
-- (arg_all || !(streq(u->active_state, "inactive")
-- || u->following[0]) || u->job_id > 0);
-+next:
-+ if (arg_types) {
-+ const char *dot;
-+
-+ dot = strrchr(u->id, '.');
-+ if (!dot)
-+ return false;
-+
-+ if (!strv_find(arg_types, dot+1))
-+ return false;
-+ }
-+
-+ if (arg_all)
-+ return true;
-+
-+ if (u->job_id > 0)
-+ return true;
-+
-+ if (streq(u->active_state, "inactive") || u->following[0])
-+ return false;
-+
-+ return true;
- }
-
- static int output_units_list(const UnitInfo *unit_infos, unsigned c) {
-@@ -1231,18 +1247,33 @@ static int compare_unit_file_list(const void *a, const void *b) {
- }
-
- static bool output_show_unit_file(const UnitFileList *u, char **patterns) {
-- const char *dot;
--
- if (!strv_isempty(patterns)) {
- char **pattern;
-
- STRV_FOREACH(pattern, patterns)
- if (fnmatch(*pattern, basename(u->path), FNM_NOESCAPE) == 0)
-- return true;
-+ goto next;
- return false;
- }
-
-- return !arg_types || ((dot = strrchr(u->path, '.')) && strv_find(arg_types, dot+1));
-+next:
-+ if (!strv_isempty(arg_types)) {
-+ const char *dot;
-+
-+ dot = strrchr(u->path, '.');
-+ if (!dot)
-+ return false;
-+
-+ if (!strv_find(arg_types, dot+1))
-+ return false;
-+ }
-+
-+ if (!strv_isempty(arg_states)) {
-+ if (!strv_find(arg_states, unit_file_state_to_string(u->state)))
-+ return false;
-+ }
-+
-+ return true;
- }
-
- static void output_unit_file_list(const UnitFileList *units, unsigned c) {
-@@ -6917,8 +6948,13 @@ done:
-
- static int halt_now(enum action a) {
-
--/* Make sure C-A-D is handled by the kernel from this
-- * point on... */
-+ /* The kernel will automaticall flush ATA disks and suchlike
-+ * on reboot(), but the file systems need to be synce'd
-+ * explicitly in advance. */
-+ sync();
-+
-+ /* Make sure C-A-D is handled by the kernel from this point
-+ * on... */
- reboot(RB_ENABLE_CAD);
-
- switch (a) {
-diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c
-index 9b9be96..c133dc5 100644
---- a/src/sysusers/sysusers.c
-+++ b/src/sysusers/sysusers.c
-@@ -358,6 +358,7 @@ static int write_files(void) {
- _cleanup_fclose_ FILE *passwd = NULL, *group = NULL, *shadow = NULL, *gshadow = NULL;
- _cleanup_free_ char *passwd_tmp = NULL, *group_tmp = NULL, *shadow_tmp = NULL, *gshadow_tmp = NULL;
- const char *passwd_path = NULL, *group_path = NULL, *shadow_path = NULL, *gshadow_path = NULL;
-+ struct stat st;
- bool group_changed = false;
- Iterator iterator;
- Item *i;
-@@ -372,15 +373,17 @@ static int write_files(void) {
- if (r < 0)
- goto finish;
-
-- if (fchmod(fileno(group), 0644) < 0) {
-- r = -errno;
-- goto finish;
-- }
--
- original = fopen(group_path, "re");
- if (original) {
- struct group *gr;
-
-+ if (fstat(fileno(original), &st) < 0 ||
-+ fchmod(fileno(group), st.st_mode & 07777) < 0 ||
-+ fchown(fileno(group), st.st_uid, st.st_gid) < 0) {
-+ r = -errno;
-+ goto finish;
-+ }
-+
- errno = 0;
- while ((gr = fgetgrent(original))) {
- /* Safety checks against name and GID
-@@ -418,6 +421,9 @@ static int write_files(void) {
- } else if (errno != ENOENT) {
- r = -errno;
- goto finish;
-+ } else if (fchmod(fileno(group), 0644) < 0) {
-+ r = -errno;
-+ goto finish;
- }
-
- HASHMAP_FOREACH(i, todo_gids, iterator) {
-@@ -449,15 +455,17 @@ static int write_files(void) {
- if (r < 0)
- goto finish;
-
-- if (fchmod(fileno(gshadow), 0000) < 0) {
-- r = -errno;
-- goto finish;
-- }
--
- original = fopen(gshadow_path, "re");
- if (original) {
- struct sgrp *sg;
-
-+ if (fstat(fileno(original), &st) < 0 ||
-+ fchmod(fileno(gshadow), st.st_mode & 07777) < 0 ||
-+ fchown(fileno(gshadow), st.st_uid, st.st_gid) < 0) {
-+ r = -errno;
-+ goto finish;
-+ }
-+
- errno = 0;
- while ((sg = fgetsgent(original))) {
-
-@@ -483,6 +491,9 @@ static int write_files(void) {
- } else if (errno != ENOENT) {
- r = -errno;
- goto finish;
-+ } else if (fchmod(fileno(gshadow), 0000) < 0) {
-+ r = -errno;
-+ goto finish;
- }
-
- HASHMAP_FOREACH(i, todo_gids, iterator) {
-@@ -513,15 +524,17 @@ static int write_files(void) {
- if (r < 0)
- goto finish;
-
-- if (fchmod(fileno(passwd), 0644) < 0) {
-- r = -errno;
-- goto finish;
-- }
--
- original = fopen(passwd_path, "re");
- if (original) {
- struct passwd *pw;
-
-+ if (fstat(fileno(original), &st) < 0 ||
-+ fchmod(fileno(passwd), st.st_mode & 07777) < 0 ||
-+ fchown(fileno(passwd), st.st_uid, st.st_gid) < 0) {
-+ r = -errno;
-+ goto finish;
-+ }
-+
- errno = 0;
- while ((pw = fgetpwent(original))) {
-
-@@ -552,6 +565,9 @@ static int write_files(void) {
- } else if (errno != ENOENT) {
- r = -errno;
- goto finish;
-+ } else if (fchmod(fileno(passwd), 0644) < 0) {
-+ r = -errno;
-+ goto finish;
- }
-
- HASHMAP_FOREACH(i, todo_uids, iterator) {
-@@ -596,15 +612,17 @@ static int write_files(void) {
- if (r < 0)
- goto finish;
-
-- if (fchmod(fileno(shadow), 0000) < 0) {
-- r = -errno;
-- goto finish;
-- }
--
- original = fopen(shadow_path, "re");
- if (original) {
- struct spwd *sp;
-
-+ if (fstat(fileno(original), &st) < 0 ||
-+ fchmod(fileno(shadow), st.st_mode & 07777) < 0 ||
-+ fchown(fileno(shadow), st.st_uid, st.st_gid) < 0) {
-+ r = -errno;
-+ goto finish;
-+ }
-+
- errno = 0;
- while ((sp = fgetspent(original))) {
-
-@@ -629,6 +647,9 @@ static int write_files(void) {
- } else if (errno != ENOENT) {
- r = -errno;
- goto finish;
-+ } else if (fchmod(fileno(shadow), 0000) < 0) {
-+ r = -errno;
-+ goto finish;
- }
-
- lstchg = (long) (now(CLOCK_REALTIME) / USEC_PER_DAY);
-diff --git a/src/udev/scsi_id/scsi_id.c b/src/udev/scsi_id/scsi_id.c
-index 4d9378a..48c6cf7 100644
---- a/src/udev/scsi_id/scsi_id.c
-+++ b/src/udev/scsi_id/scsi_id.c
-@@ -317,8 +317,8 @@ static void help(void) {
- " -f,--config= location of config file\n"
- " -p,--page=0x80|0x83|pre-spc3-83 SCSI page (0x80, 0x83, pre-spc3-83)\n"
- " -s,--sg-version=3|4 use SGv3 or SGv4\n"
-- " -b,--blacklisted threat device as blacklisted\n"
-- " -g,--whitelisted threat device as whitelisted\n"
-+ " -b,--blacklisted treat device as blacklisted\n"
-+ " -g,--whitelisted treat device as whitelisted\n"
- " -u,--replace-whitespace replace all whitespace by underscores\n"
- " -v,--verbose verbose logging\n"
- " --version print version\n"
-diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c
-index 0d247f6..df996cb 100644
---- a/src/udev/udev-builtin-path_id.c
-+++ b/src/udev/udev-builtin-path_id.c
-@@ -548,9 +548,9 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool
- }
-
- /*
-- * Do return devices with have an unknown type of parent device, they
-- * might produce conflicting IDs below multiple independent parent
-- * devices.
-+ * Do not return devices with an unknown parent device type. They
-+ * might produce conflicting IDs if the parent does not provide a
-+ * unique and predictable name.
- */
- if (!supported_parent) {
- free(path);
-@@ -558,9 +558,9 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool
- }
-
- /*
-- * Do not return a have-only a single-parent block devices, some
-- * have entire hidden buses behind it, and not create predictable
-- * IDs that way.
-+ * Do not return block devices without a well-known transport. Some
-+ * devices do not expose their buses and do not provide a unique
-+ * and predictable name that way.
- */
- if (streq(udev_device_get_subsystem(dev), "block") && !supported_transport) {
- free(path);
-diff --git a/src/udev/udevd.c b/src/udev/udevd.c
-index 2e6c713..65d086e 100644
---- a/src/udev/udevd.c
-+++ b/src/udev/udevd.c
-@@ -967,7 +967,7 @@ static void kernel_cmdline_options(struct udev *udev) {
- return;
-
- FOREACH_WORD_QUOTED(word, l, line, state) {
-- char *s, *opt;
-+ char *s, *opt, *value;
-
- s = strndup(word, l);
- if (!s)
-@@ -979,24 +979,24 @@ static void kernel_cmdline_options(struct udev *udev) {
- else
- opt = s;
-
-- if (startswith(opt, "udev.log-priority=")) {
-+ if ((value = startswith(opt, "udev.log-priority="))) {
- int prio;
-
-- prio = util_log_priority(opt + 18);
-+ prio = util_log_priority(value);
- log_set_max_level(prio);
- udev_set_log_priority(udev, prio);
-- } else if (startswith(opt, "udev.children-max=")) {
-- r = safe_atoi(opt + 18, &arg_children_max);
-+ } else if ((value = startswith(opt, "udev.children-max="))) {
-+ r = safe_atoi(value, &arg_children_max);
- if (r < 0)
-- log_warning("Invalid udev.children-max ignored: %s", opt + 18);
-- } else if (startswith(opt, "udev.exec-delay=")) {
-- r = safe_atoi(opt + 16, &arg_exec_delay);
-+ log_warning("Invalid udev.children-max ignored: %s", value);
-+ } else if ((value = startswith(opt, "udev.exec-delay="))) {
-+ r = safe_atoi(value, &arg_exec_delay);
- if (r < 0)
-- log_warning("Invalid udev.exec-delay ignored: %s", opt + 16);
-- } else if (startswith(opt, "udev.event-timeout=")) {
-- r = safe_atou64(opt + 16, &arg_event_timeout_usec);
-+ log_warning("Invalid udev.exec-delay ignored: %s", value);
-+ } else if ((value = startswith(opt, "udev.event-timeout="))) {
-+ r = safe_atou64(value, &arg_event_timeout_usec);
- if (r < 0) {
-- log_warning("Invalid udev.event-timeout ignored: %s", opt + 16);
-+ log_warning("Invalid udev.event-timeout ignored: %s", value);
- break;
- }
- arg_event_timeout_usec *= USEC_PER_SEC;
-diff --git a/src/vconsole/90-vconsole.rules b/src/vconsole/90-vconsole.rules
-new file mode 100644
-index 0000000..bf6a9ef
---- /dev/null
-+++ b/src/vconsole/90-vconsole.rules
-@@ -0,0 +1,11 @@
-+# This file is part of systemd.
-+#
-+# systemd is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU Lesser General Public License as published by
-+# the Free Software Foundation; either version 2.1 of the License, or
-+# (at your option) any later version.
-+
-+# Kernel resets vconsole state when changing console drivers so run
-+# systemd-vconsole-setup when fbcon loads
-+
-+ACTION=="add", SUBSYSTEM=="graphics", KERNEL=="fbcon", RUN+="/usr/lib/systemd/systemd-vconsole-setup"
-diff --git a/units/basic.target b/units/basic.target
-index 228f62c..abb63ec 100644
---- a/units/basic.target
-+++ b/units/basic.target
-@@ -8,8 +8,8 @@
- [Unit]
- Description=Basic System
- Documentation=man:systemd.special(7)
-+
- Requires=sysinit.target
-+After=sysinit.target
- Wants=sockets.target timers.target paths.target slices.target
--After=sysinit.target sockets.target timers.target paths.target slices.target
--JobTimeoutSec=15min
--JobTimeoutAction=poweroff-force
-+After=sockets.target paths.target slices.target
-diff --git a/units/poweroff.target b/units/poweroff.target
-index dd92d81..7187103 100644
---- a/units/poweroff.target
-+++ b/units/poweroff.target
-@@ -12,8 +12,6 @@ DefaultDependencies=no
- Requires=systemd-poweroff.service
- After=systemd-poweroff.service
- AllowIsolate=yes
--JobTimeoutSec=30min
--JobTimeoutAction=poweroff-force
-
- [Install]
- Alias=ctrl-alt-del.target
-diff --git a/units/reboot.target b/units/reboot.target
-index 668b98d..dec8f56 100644
---- a/units/reboot.target
-+++ b/units/reboot.target
-@@ -12,8 +12,6 @@ DefaultDependencies=no
- Requires=systemd-reboot.service
- After=systemd-reboot.service
- AllowIsolate=yes
--JobTimeoutSec=30min
--JobTimeoutAction=reboot-force
-
- [Install]
- Alias=ctrl-alt-del.target
-diff --git a/units/systemd-journal-flush.service.in b/units/systemd-journal-flush.service.in
-index 699670b..98c91b4 100644
---- a/units/systemd-journal-flush.service.in
-+++ b/units/systemd-journal-flush.service.in
-@@ -6,12 +6,14 @@
- # (at your option) any later version.
-
- [Unit]
--Description=Trigger Flushing of Journal to Persistent Storage
-+Description=Flush Journal to Persistent Storage
- Documentation=man:systemd-journald.service(8) man:journald.conf(5)
- DefaultDependencies=no
- Requires=systemd-journald.service
--After=systemd-journald.service local-fs.target remote-fs.target
-+After=systemd-journald.service
-+After=systemd-remount-fs.service
- Before=systemd-user-sessions.service systemd-tmpfiles-setup.service
-+RequiresMountsFor=/var/log/journal
-
- [Service]
- ExecStart=@rootbindir@/journalctl --flush
-diff --git a/units/systemd-journald.service.in b/units/systemd-journald.service.in
-index 4de38fa..441d5b1 100644
---- a/units/systemd-journald.service.in
-+++ b/units/systemd-journald.service.in
-@@ -14,6 +14,7 @@ After=systemd-journald.socket systemd-journald-dev-log.socket syslog.socket
- Before=sysinit.target
-
- [Service]
-+Type=notify
- Sockets=systemd-journald.socket systemd-journald-dev-log.socket
- ExecStart=@rootlibexecdir@/systemd-journald
- Restart=always
-diff --git a/units/timers.target b/units/timers.target
-index 07fda3d..251fa68 100644
---- a/units/timers.target
-+++ b/units/timers.target
-@@ -8,3 +8,6 @@
- [Unit]
- Description=Timers
- Documentation=man:systemd.special(7)
-+
-+DefaultDependencies=no
-+Conflicts=shutdown.target