summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS29
-rw-r--r--coccinelle/strempty.cocci10
-rw-r--r--src/fsck/fsck.c8
3 files changed, 43 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 68e46dd0df..03dc5ba2e3 100644
--- a/NEWS
+++ b/NEWS
@@ -31,6 +31,35 @@ CHANGES WITH 227:
assignments and "auto" for picking a free value
automatically.
+ * 'systemctl is-system-running' now returns 'offline' if the
+ system is not booted with systemd. This command can now be
+ used as a substitute for 'systemd-notify --booted'.
+
+ * Watchdog timeouts have been increased to 3 minutes for all
+ in-tree service files. Apparently, disk IO issues are more
+ frequent than we hoped, and user reported >1 minute waiting
+ for disk IO.
+
+ * 'machine-id-commit' functionality has been merged into
+ 'machine-id-setup --commit'. The separate binary has been
+ removed.
+
+ * The WorkingDirectory= directive in unit files may now be
+ set to the special value '~'. In this case, the working
+ directory is set to the home directory of the user configured
+ in User=.
+
+ * A new systemd.crash_reboot=1 kernel command line option has
+ been added that triggers a reboot after crashing. This can
+ also be set through CrashReboot= in systemd.conf.
+
+ * The CrashChVT= configuration file setting is renamed to
+ CrashChangeVT=, following our usual logic of not abbreviating
+ unnecessarily. The old directive is still supported for compat
+ reasons. Also, this directive now takes an integer value
+ between 1 and 63, or a boolean value. The formerly supported
+ '-1' value for disabling stays around for compat reasons.
+
* The PrivateTmp, PrivateDevices, PrivateNetwork,
NoNewPrivileges, TTYPath, WorkingDirectory and RootDirectory
properties can now be set for transient units.
diff --git a/coccinelle/strempty.cocci b/coccinelle/strempty.cocci
new file mode 100644
index 0000000000..e3bd0a1f56
--- /dev/null
+++ b/coccinelle/strempty.cocci
@@ -0,0 +1,10 @@
+@@
+expression s;
+@@
+- s ?: ""
++ strempty(s)
+@@
+expression s;
+@@
+- s ? s : ""
++ strempty(s)
diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c
index 8e790b85ae..30c846f01d 100644
--- a/src/fsck/fsck.c
+++ b/src/fsck/fsck.c
@@ -60,7 +60,7 @@ static bool arg_force = false;
static bool arg_show_progress = false;
static const char *arg_repair = "-a";
-static void start_target(const char *target) {
+static void start_target(const char *target, const char *mode) {
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_bus_flush_close_unref_ sd_bus *bus = NULL;
int r;
@@ -83,7 +83,7 @@ static void start_target(const char *target) {
"StartUnitReplace",
&error,
NULL,
- "sss", "basic.target", target, "replace");
+ "sss", "basic.target", target, mode);
/* Don't print a warning if we aren't called during startup */
if (r < 0 && !sd_bus_error_has_name(&error, BUS_ERROR_NO_SUCH_JOB))
@@ -463,10 +463,10 @@ int main(int argc, char *argv[]) {
if (status.si_code == CLD_EXITED && (status.si_status & FSCK_SYSTEM_SHOULD_REBOOT) && root_directory)
/* System should be rebooted. */
- start_target(SPECIAL_REBOOT_TARGET);
+ start_target(SPECIAL_REBOOT_TARGET, "replace-irreversibly");
else if (status.si_code == CLD_EXITED && (status.si_status & (FSCK_SYSTEM_SHOULD_REBOOT | FSCK_ERRORS_LEFT_UNCORRECTED)))
/* Some other problem */
- start_target(SPECIAL_EMERGENCY_TARGET);
+ start_target(SPECIAL_EMERGENCY_TARGET, "replace");
else {
log_warning("Ignoring error.");
r = 0;