</varlistentry>
<varlistentry>
+ <term><varname>fsck.repair=</varname></term>
+
+ <listitem>
+ <para>Parameter understood by
+ the file system checker
+ services. For details, see
+ <citerefentry><refentrytitle>systemd-fsck@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><varname>quotacheck.mode=</varname></term>
<listitem>
skips any file system
checks.</para></listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><varname>fsck.repair=</varname></term>
+
+ <listitem><para>One of
+ <literal>preen</literal>,
+ <literal>yes</literal>,
+ <literal>no</literal>. Controls the
+ mode of operation. The default is <literal>
+ preen</literal>, and will automatically repair
+ problems that can be safely fixed. <literal>yes
+ </literal> will answer yes to all questions by
+ fsck and <literal>no</literal> will answer no to
+ all questions.
+ </para></listitem>
+ </varlistentry>
</variablelist>
</refsect1>
This file is part of systemd.
Copyright 2010 Lennart Poettering
+ Copyright 2014 Holger Hans Peter Freyther
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
static bool arg_skip = false;
static bool arg_force = false;
static bool arg_show_progress = false;
+static const char *arg_repair = "-a";
static void start_target(const char *target) {
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
arg_skip = true;
else
log_warning("Invalid fsck.mode= parameter. Ignoring.");
+ } else if (streq(key, "fsck.repair") && value) {
+
+ if (streq(value, "preen"))
+ arg_repair = "-a";
+ else if (streq(value, "yes"))
+ arg_repair = "-y";
+ else if (streq(value, "no"))
+ arg_repair = "-n";
+ else
+ log_warning("Invalid fsck.repair= parameter. Ignoring.");
} else if (startswith(key, "fsck."))
log_warning("Invalid fsck parameter. Ignoring.");
#ifdef HAVE_SYSV_COMPAT
}
cmdline[i++] = "/sbin/fsck";
- cmdline[i++] = "-a";
+ cmdline[i++] = arg_repair;
cmdline[i++] = "-T";
cmdline[i++] = "-l";