mirror of
https://github.com/troglobit/finit.git
synced 2026-10-12 10:12:32 +00:00
Handle systems with new /run tmpfs
Modern systems today use a RAM disk for /run and /run/lock, with symlinks to the FHS locations in /var/run and /var/lock. See the following link for details http://lwn.net/Articles/436012/ Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
+10
-2
@@ -44,12 +44,20 @@ static void setup(void *UNUSED(arg))
|
||||
makedir("/var/lib/misc", 0755);
|
||||
makedir("/var/lib/alarm", 0755);
|
||||
makedir("/var/lib/urandom",0755);
|
||||
makedir("/var/lock", 0755);
|
||||
if (fisdir("/run")) {
|
||||
_d("System with new /run tmpfs ...");
|
||||
makedir("/run/lock", 1777);
|
||||
symlink("/run/lock", "/var/lock");
|
||||
symlink("/run", "/var/run");
|
||||
symlink("/dev/shm", "/run/shm");
|
||||
} else {
|
||||
makedir("/var/lock", 1777);
|
||||
makedir("/var/run", 0755);
|
||||
}
|
||||
makedir("/var/lock/subsys",0755); /* Needed by D-Bus plugin */
|
||||
makedir("/var/log", 0755);
|
||||
makedir("/var/mail", 0755);
|
||||
makedir("/var/opt", 0755);
|
||||
makedir("/var/run", 0755);
|
||||
makedir("/var/spool", 0755);
|
||||
makedir("/var/spool/cron", 0755);
|
||||
makedir("/var/tmp", 0755);
|
||||
|
||||
Reference in New Issue
Block a user