mirror of
https://github.com/troglobit/finit.git
synced 2026-10-19 11:09:35 +00:00
Improve udev support on non-embedded systems
Embedded Linux systems usually employ BusyBox mdev. This patch assumes that all non-embedded systems employ udev. Adding support for cleaning up the udev db after the initramfs, or mounting /dev if that not done. It also runs the udev-finish script at the end. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
8002704a5f
commit
789354ab40
1 file changed
+11
@@ -189,6 +189,13 @@ int main(int argc, char* argv[])
|
||||
mount("none", "/proc/bus/usb", "usbfs", 0, NULL);
|
||||
mount("none", "/sys", "sysfs", 0, NULL);
|
||||
|
||||
#ifndef EMBEDDED_SYSTEM
|
||||
if (!fismnt("/dev"))
|
||||
mount("udev", "/dev", "devtmpfs", MS_RELATIME, "size=10%,nr_inodes=61156,mode=755");
|
||||
else
|
||||
run_interactive("/sbin/udevadm info --cleanup-db", "Cleaning up udev db");
|
||||
#endif
|
||||
|
||||
/* Some systems use /dev/pts */
|
||||
makedir("/dev/pts", 0755);
|
||||
mount("devpts", "/dev/pts", "devpts", 0, "gid=5,mode=620");
|
||||
@@ -253,6 +260,10 @@ int main(int argc, char* argv[])
|
||||
mount(SYSROOT, "/", NULL, MS_MOVE, NULL);
|
||||
#endif
|
||||
|
||||
#ifndef EMBEDDED_SYSTEM
|
||||
run_interactive("/lib/udev/udev-finish", "Finalizing udev");
|
||||
#endif
|
||||
|
||||
_d("Root FS up, calling hooks ...");
|
||||
plugin_run_hooks(HOOK_ROOTFS_UP);
|
||||
|
||||
|
||||
Reference in new issue
Block a user