finit: Some problems - tested with my laptop and musl libc
First, sorry for my poor english… And problems:
1. reboot without sync in sig.c:
--- finit-3.0-rc1/sig.c 2016-09-14 04:49:41.000000000 +0800
+++ finit-3.0-rc1/sig.c 2016-09-14 04:49:41.000000000 +0800
@@ -152,6 +152,7 @@
unmount_regular();
/* We sit on / so we must remount it ro, try all the things! */
+ run("sync");
run("/bin/mount -n -o remount,ro -t dummytype dummydev /");
run("/bin/mount -n -o remount,ro dummydev /");
run("/bin/mount -n -o remount,ro /");
I rebooted my laptop immediately after installing…crashed…I checked /bin/finit, found that it was empty.
Umount will sync automaticly but remount, so this was only happened on /.There is a need of sync command or soomething else can sync.
2. didn’t clean hidden files
- run_interactive("rm -rf /tmp/* /var/run/* /var/lock/*", "Cleaning up temporary directories");
+ run_interactive("rm -rf /tmp/* /tmp/.??* /var/run/* /var/lock/*", "Cleaning up temporary directories");
All files that named .* are not cleaned on boot.But /tmp has a lot of files named .*.
3. start udevd but no trigger
run_interactive(devfsd, "Populating device tree");
+ run_interactive("/sbin/udevadm trigger --action=add --type=subsystems", "Trigger subsystems");
+ run_interactive("/sbin/udevadm trigger --action=add --type=devices", "Trigger devices");
With out trigger, kernel modules won’t be loaded automaticly.Also devices is not under management.
For example, i915 was not loaded after boot, my network card was not renamed from wlan0 to wlp3s0 which means it was not handled by udev.
4. missing dir
+ makedir("/var/lock/subsys", 0755);
makedir("/var/lock/subsys/messagebus", 0755);
No subsys in some distros.
5. A question
Can rlimit option be used on a specific process?This can be useful in cases like starting jack daemon.
😃 Thx for your excellent work on this init.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 18 (18 by maintainers)
Commits related to this issue
- Fix issue #42: Use ftw() to recursively clean up dirs. Signed-off-by: Joachim Nilsson <troglobit@gmail.com> — committed to troglobit/finit by troglobit 8 years ago
- Fix issue #42: Skip base directories in bootclean. Signed-off-by: Wang He <xw897002528@gmail.com> Signed-off-by: Joachim Nilsson <troglobit@gmail.com> — committed to troglobit/finit by xhebox 8 years ago
Should work now, please reopen if the problem persists. Thank you for contributing to Open Source! ❤️