mirror of
https://github.com/troglobit/finit.git
synced 2026-09-30 21:13:01 +07:00
boomisc: Create /run/uuid for Void Linux if uuid user exists
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
+10
-1
@@ -98,7 +98,7 @@ static void bootclean(void)
|
||||
*/
|
||||
static void setup(void *arg)
|
||||
{
|
||||
int gid;
|
||||
int uid, gid;
|
||||
|
||||
/* Cleanup stale files, if any still linger on. */
|
||||
bootclean();
|
||||
@@ -165,6 +165,15 @@ static void setup(void *arg)
|
||||
makefifo("/dev/xconsole", 0640); /* sysklogd */
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user