X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fmain.c;h=44373cc7ef435f23079da0f00b49eaf2d0f02843;hb=9f103625b145a397e67c3714766775b615c8b587;hp=95ab40fffc09135e72c4031ce7503d5f24da60b3;hpb=1b6d7fa742e303611dff8d7ebfa86ee5fb8b7dc7;p=elogind.git diff --git a/src/core/main.c b/src/core/main.c index 95ab40fff..44373cc7e 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -272,6 +272,7 @@ static int parse_proc_cmdline_item(const char *key, const char *value) { static const char * const rlmap[] = { "emergency", SPECIAL_EMERGENCY_TARGET, "-b", SPECIAL_EMERGENCY_TARGET, + "rescue", SPECIAL_RESCUE_TARGET, "single", SPECIAL_RESCUE_TARGET, "-s", SPECIAL_RESCUE_TARGET, "s", SPECIAL_RESCUE_TARGET, @@ -1725,7 +1726,7 @@ int main(int argc, char *argv[]) { after_startup = now(CLOCK_MONOTONIC); log_full(arg_action == ACTION_TEST ? LOG_INFO : LOG_DEBUG, "Loaded units and determined initial transaction in %s.", - format_timespan(timespan, sizeof(timespan), after_startup - before_startup, 0)); + format_timespan(timespan, sizeof(timespan), after_startup - before_startup, 100 * USEC_PER_MSEC)); if (arg_action == ACTION_TEST) { printf("-> By jobs:\n"); @@ -1853,8 +1854,8 @@ finish: * deserializing. */ broadcast_signal(SIGTERM, false, true); - /* And switch root */ - r = switch_root(switch_root_dir); + /* And switch root with MS_MOVE, because we remove the old directory afterwards and detach it. */ + r = switch_root(switch_root_dir, "/mnt", true, MS_MOVE); if (r < 0) log_error("Failed to switch root, ignoring: %s", strerror(-r)); }