boomisc: Create /run/uuid for Void Linux if uuid user exists

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-10-18 10:05:46 +02:00
parent 38ba9930d0
commit f4662d8c06
+10 -1
View File
@@ -98,7 +98,7 @@ static void bootclean(void)
*/ */
static void setup(void *arg) static void setup(void *arg)
{ {
int gid; int uid, gid;
/* Cleanup stale files, if any still linger on. */ /* Cleanup stale files, if any still linger on. */
bootclean(); bootclean();
@@ -165,6 +165,15 @@ static void setup(void *arg)
makefifo("/dev/xconsole", 0640); /* sysklogd */ makefifo("/dev/xconsole", 0640); /* sysklogd */
chown("/dev/xconsole", 0, getgroup("tty")); chown("/dev/xconsole", 0, getgroup("tty"));
/* Void Linux has a uuidd that runs as uuid:uuid and needs /run/uuid */
uid = getuser("uuid", NULL);
if (uid >= 0) {
gid = getgroup("uuid");
if (gid < 0)
gid = 0;
makedir("/var/run/uuid", uid, gid);
}
umask(022); umask(022);
} }