summaryrefslogtreecommitdiff
path: root/src/remount-fs
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-11-13 17:36:46 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-11-13 22:04:51 +0100
commited4ad4889723a9acdf75ed86f10cee0024bbbcbc (patch)
treea9cb824bcefb634a8d913b6bd24912eb964ebb3b /src/remount-fs
parent32c6237a7c2e697d2fc4f3403319db16858fb8e3 (diff)
downloadsystemd-ed4ad4889723a9acdf75ed86f10cee0024bbbcbc.tar.gz
Allow overriding /etc/fstab with $SYSTEMD_FSTAB
Diffstat (limited to 'src/remount-fs')
-rw-r--r--src/remount-fs/remount-fs.c5
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 */