Allow overriding /etc/fstab with $SYSTEMD_FSTAB

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2019-11-13 22:04:51 +01:00
parent 32c6237a7c
commit ed4ad48897
6 changed files with 29 additions and 18 deletions
+2 -1
View File
@@ -15,6 +15,7 @@
#include "device-util.h"
#include "escape.h"
#include "fileio.h"
#include "fstab-util.h"
#include "log.h"
#include "main-func.h"
#include "mount-util.h"
@@ -302,7 +303,7 @@ static char *disk_mount_point(const char *label) {
if (asprintf(&device, "/dev/mapper/%s", label) < 0)
return NULL;
f = setmntent("/etc/fstab", "re");
f = setmntent(fstab_path(), "re");
if (!f)
return NULL;