Commit f4c3f0ad authored by Ariadne Conill's avatar Ariadne Conill 🐰 Committed by Timo Teräs

database: create additional device nodes when initializing root fs

Some triggers and maintainer scripts depend on /dev/random, /dev/urandom,
/dev/zero and /dev/console.
parent 4d69d123
Pipeline #20145 passed with stage
in 41 seconds
......@@ -1330,6 +1330,10 @@ static int apk_db_create(struct apk_database *db)
mkdirat(db->root_fd, "tmp", 01777);
mkdirat(db->root_fd, "dev", 0755);
mknodat(db->root_fd, "dev/null", S_IFCHR | 0666, makedev(1, 3));
mknodat(db->root_fd, "dev/zero", S_IFCHR | 0666, makedev(1, 5));
mknodat(db->root_fd, "dev/random", S_IFCHR | 0666, makedev(1, 8));
mknodat(db->root_fd, "dev/urandom", S_IFCHR | 0666, makedev(1, 9));
mknodat(db->root_fd, "dev/console", S_IFCHR | 0600, makedev(5, 1));
mkdirat(db->root_fd, "etc", 0755);
mkdirat(db->root_fd, "etc/apk", 0755);
mkdirat(db->root_fd, "lib", 0755);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment