diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-11-13 17:36:46 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-11-13 22:04:51 +0100 |
commit | ed4ad4889723a9acdf75ed86f10cee0024bbbcbc (patch) | |
tree | a9cb824bcefb634a8d913b6bd24912eb964ebb3b /src/remount-fs/remount-fs.c | |
parent | 32c6237a7c2e697d2fc4f3403319db16858fb8e3 (diff) | |
download | systemd-ed4ad4889723a9acdf75ed86f10cee0024bbbcbc.tar.gz |
Allow overriding /etc/fstab with $SYSTEMD_FSTAB
Diffstat (limited to 'src/remount-fs/remount-fs.c')
-rw-r--r-- | src/remount-fs/remount-fs.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 */ |