Steve Polyack <kor...@comcast.net> wrote: > I was able to "fix" the single-user mode behavior (which I agree, > isn't necessarily broken) and get it to bring up the links by > simply patching init(8) to call system("/sbin/ifconfig") before > prompting for the single-user shell. It works, but I feel dirty.
I see no particular objection to adding a way of running "something" ahead of the single-user shell, but system(3) is not necessarily the best mechanism to use for the purpose because it invokes a shell. It would be both more efficient and more robust to call fork(2) and exec(3) (or execve(2)) directly. It would be more general to fork/exec "/etc/rc.single" instead of "/sbin/ifconfig", expecting "/etc/rc.single" to be an executable script (with an appropriate shebang line) and ignoring the failure which would occur if it did not exist. (In your case, instead of a script, you could make /etc/rc.single a link to /sbin/ifconfig.) _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"