From ed4ad4889723a9acdf75ed86f10cee0024bbbcbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 13 Nov 2019 17:36:46 +0100 Subject: Allow overriding /etc/fstab with $SYSTEMD_FSTAB --- src/remount-fs/remount-fs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/remount-fs/remount-fs.c') diff --git a/src/remount-fs/remount-fs.c b/src/remount-fs/remount-fs.c index 5891013427..7386f70529 100644 --- a/src/remount-fs/remount-fs.c +++ b/src/remount-fs/remount-fs.c @@ -9,6 +9,7 @@ #include "env-util.h" #include "exit-status.h" +#include "fstab-util.h" #include "log.h" #include "main-func.h" #include "mount-setup.h" @@ -86,10 +87,10 @@ static int run(int argc, char *argv[]) { umask(0022); - f = setmntent("/etc/fstab", "re"); + f = setmntent(fstab_path(), "re"); if (!f) { if (errno != ENOENT) - return log_error_errno(errno, "Failed to open /etc/fstab: %m"); + return log_error_errno(errno, "Failed to open %s: %m", fstab_path()); } else while ((me = getmntent(f))) { /* Remount the root fs, /usr, and all API VFSs */ -- cgit v1.2.1