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, const char *mode) {
return 0;
}
-static void test_files(void) {
-
-#if HAVE_SYSV_COMPAT
- if (access("/fastboot", F_OK) >= 0) {
- log_error("Please pass 'fsck.mode=skip' on the kernel command line rather than creating /fastboot on the root file system.");
- arg_skip = true;
- }
-
- if (access("/forcefsck", F_OK) >= 0) {
- log_error("Please pass 'fsck.mode=force' on the kernel command line rather than creating /forcefsck on the root file system.");
- arg_force = true;
- }
-#endif
-
- arg_show_progress = access("/run/systemd/show-status", F_OK) >= 0;
-}
-
static double percent(int pass, unsigned long cur, unsigned long max) {
/* Values stolen from e2fsck */
if (r < 0)
log_warning_errno(r, "Failed to parse kernel command line, ignoring: %m");
- test_files();
+ bool show_progress = access("/run/systemd/show-status", F_OK) >= 0;
if (!arg_force && arg_skip)
return 0;
console = fopen("/dev/console", "we");
if (console &&
- arg_show_progress &&
+ show_progress &&
pipe(progress_pipe) < 0)
return log_error_errno(errno, "pipe(): %m");
return 0;
}
-static void test_files(void) {
-
-#if HAVE_SYSV_COMPAT
- if (access("/forcequotacheck", F_OK) >= 0) {
- log_error("Please pass 'quotacheck.mode=force' on the kernel command line rather than creating /forcequotacheck on the root file system. Proceeding anyway.");
- arg_force = true;
- }
-#endif
-}
-
static int run(int argc, char *argv[]) {
int r;
if (r < 0)
log_warning_errno(r, "Failed to parse kernel command line, ignoring: %m");
- test_files();
-
if (!arg_force) {
if (arg_skip)
return 0;
# /run/lock/subsys is used for serializing SysV service execution, and
# hence without use on SysV-less systems.
d /run/lock/subsys 0755 root root -
-
-# /forcefsck, /fastboot and /forcequotacheck are deprecated in favor of the
-# kernel command line options 'fsck.mode=force', 'fsck.mode=skip' and
-# 'quotacheck.mode=force'
-r! /forcefsck
-r! /fastboot
-r! /forcequotacheck
{% endif %}