mirror of
https://github.com/troglobit/finit.git
synced 2026-10-18 10:59:34 +00:00
Mount /var/lock and /var/run as tmpfs
Also create /var/run/console/<user> for X authentication Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
This commit is contained in:
1 parent
d05900368f
commit
2679c1b1c5
3 files changed
+13
-4
No files matched your search
@@ -12,7 +12,7 @@ BINS = finit finit-mod finit-mdv
|
||||
#### Configurable parameters
|
||||
|
||||
# Add -DDEBUG to build with debug messages, also drops to terminal after X
|
||||
#CFLAGS += -DDEBUG
|
||||
CFLAGS += -DDEBUG
|
||||
|
||||
# Parameters added by Metalshark
|
||||
|
||||
|
||||
+9
-3
@@ -171,6 +171,8 @@ int main()
|
||||
mount("devpts", "/dev/pts", "devpts", 0, "gid=5,mode=620");
|
||||
mount("tmpfs", "/dev/shm", "tmpfs", 0, NULL);
|
||||
mount("tmpfs", "/tmp", "tmpfs", 0, "mode=1777,size=128m");
|
||||
mount("tmpfs", "/var/run", "tmpfs", 0, "mode=0755");
|
||||
mount("tmpfs", "/var/lock", "tmpfs", 0, "mode=1777");
|
||||
mount(SYSROOT, "/", NULL, MS_MOVE, NULL);
|
||||
|
||||
unlink("/etc/mtab");
|
||||
@@ -251,13 +253,17 @@ int main()
|
||||
unlink(RANDOMSEED);
|
||||
umask(077);
|
||||
copyfile("/dev/urandom", RANDOMSEED, 4096);
|
||||
umask(0);
|
||||
|
||||
/*
|
||||
* Console setup (for X)
|
||||
*/
|
||||
makepath("/var/run/console");
|
||||
touch("/var/run/console/" DEFUSER);
|
||||
|
||||
/*
|
||||
* Misc setup
|
||||
*/
|
||||
unlink("/var/run/.clean");
|
||||
unlink("/var/lock/.clean");
|
||||
umask(0);
|
||||
mkdir("/tmp/.X11-unix", 01777);
|
||||
mkdir("/tmp/.ICE-unix", 01777);
|
||||
umask(022);
|
||||
|
||||
@@ -40,6 +40,7 @@ Changelog from the original Eeepc fastinit:
|
||||
- Draw shutdown splash screen using C calls instead of system("echo;cat")
|
||||
- Change poweroff method from writing 5 to /sys/power/state to
|
||||
reboot(RB_POWER_OFF) (by Metalshark)
|
||||
- Mount /var/run and /var/lock as tmpfs
|
||||
|
||||
*/
|
||||
|
||||
@@ -151,6 +152,8 @@ int main()
|
||||
mount("devpts", "/dev/pts", "devpts", 0, "gid=5,mode=620");
|
||||
mount("tmpfs", "/dev/shm", "tmpfs", 0, NULL);
|
||||
mount("tmpfs", "/tmp", "tmpfs", 0, "mode=1777,size=128m");
|
||||
mount("tmpfs", "/var/run", "tmpfs", 0, "mode=0755");
|
||||
mount("tmpfs", "/var/lock", "tmpfs", 0, "mode=1777");
|
||||
mount("/mnt", "/", NULL, MS_MOVE, NULL);
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user