From 3fd45eac7c7086fcb27edd5e118b277afef5f4ae Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Tue, 14 Nov 2017 15:24:25 +0100 Subject: [PATCH] bootmisc: Handle _PATH_VARDB inconsistency gracefully Some systems use /var/db while others use /var/lib/misc, we need to support both and cannot rely on _PATH_VARDB, since it too might not be set properly. Signed-off-by: Joachim Nilsson --- plugins/bootmisc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/bootmisc.c b/plugins/bootmisc.c index 80588021..0be64b5c 100644 --- a/plugins/bootmisc.c +++ b/plugins/bootmisc.c @@ -106,9 +106,10 @@ static void setup(void *arg) _d("Setting up FHS structure in /var ..."); umask(0); makedir("/var/cache", 0755); + makedir("/var/db", 0755); /* _PATH_VARDB on some systems */ makedir("/var/games", 0755); makedir("/var/lib", 0755); - makedir("/var/lib/misc", 0755); + makedir("/var/lib/misc", 0755); /* _PATH_VARDB on some systems */ makedir("/var/lib/alarm", 0755); makedir("/var/lib/urandom",0755); if (fisdir("/run")) {