4 ms·
logging is covered here: https://netbsd.gw.com/cgi-bin/man-cgi?rc+8+NetBSD-current https://netbsd.gw.com/cgi-bin/man-cgi?rc+8+NetBSD-current https://netbsd.gw.
by cat199 7y ago
logging is covered here:
https://netbsd.gw.com/cgi-bin/man-cgi?rc+8+NetBSD-current https://netbsd.gw.com/cgi-bin/man-cgi?rc+8+NetBSD-current
https://netbsd.gw.com/cgi-bin/man-cgi?rc.subr+8+NetBSD-current https://netbsd.gw.com/cgi-bin/man-cgi?rc.subr+8+NetBSD-curre...
and dependency ordering here:
https://netbsd.gw.com/cgi-bin/man-cgi?rcorder+8+NetBSD-current https://netbsd.gw.com/cgi-bin/man-cgi?rcorder+8+NetBSD-curre...
design rationale & further discussion here:
Luke Mewburn, "The Design and Implementation of the NetBSD rc.d system",
Proceedings of the FREENIX Track: 2001 USENIX Annual Technical
Conference, USENIX Association,
http://www.usenix.org/publications/library/proceedings/usenix01/freenix01/full_papers/mewburn/mewburn.pdf,
June 25-30, 2001.
- theamk 7y agoI can see the rc runner itself will save output to /var/run/rc.log . This is great, as far as shell-based systems go -- of course not as good as systemd/upstart (which separate by service), but better than many linux's init systems. Next, I wanted to check if "run_rc_command" suppressed the stdout/stderr of the program it was running. And here is where I hit a first difficulty: - The rc.subr manpage you referred to does not seem to mention logging it in any way. - So I looked in the source.. and it is 1300 line shell script [1], with run_rc_command being pretty complex function, with thousands of lines of code. I found answer to my question (apparently it does not care about stdout/stderr at all), but this was non-trivial. Compare it to systemd, which just have this information in the official manpages [2]. Are you still claiming shell-based init scripts are simpler? (Expert level question: you have a third-party Java app, which provides a single sh file for you to run. Can you use it with your "10 line init script"? Why not?) [1] https://github.com/IIJ-NetBSD/netbsd-src/blob/e4505e0610ceb1b2db8e2a9ed607b4bfa076aa2f/etc/rc.subr https://github.com/IIJ-NetBSD/netbsd-src/blob/e4505e0610ceb1... [2] https://www.freedesktop.org/software/systemd/man/systemd.exec.html#StandardOutput= https://www.freedesktop.org/software/systemd/man/systemd.exe...