From c969bda62ded50d928309edb2253e2f88f4327f2 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Thu, 18 Jan 2018 12:32:25 +0100 Subject: [PATCH] bootmisc.so: Create /etc/mtab symlink if missing Signed-off-by: Joachim Nilsson --- plugins/bootmisc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/bootmisc.c b/plugins/bootmisc.c index 0be64b5c..89f1fc12 100644 --- a/plugins/bootmisc.c +++ b/plugins/bootmisc.c @@ -170,6 +170,9 @@ static void setup(void *arg) makefifo("/dev/xconsole", 0640); /* sysklogd */ chown("/dev/xconsole", 0, gid); + if (!fexist("/etc/mtab")) + symlink("../proc/self/mounts", "/etc/mtab"); + /* Void Linux has a uuidd that runs as uuid:uuid and needs /run/uuid */ uid = getuser("uuidd", NULL); if (uid >= 0) {