How does bsdinstall script work?

I have found the sources for bsdinstall in usr.sbin/ directory in the source tree; now I see a reference in that script to some /usr/libexec/bsdinstall; as far as I understand, it is a reference to an already existing script on some floppy disk, for example, that is used for installation; so the question is how do I find this script in the source tree? I have not found anything close to bsdinstall in libexec/ directory...
 
so the question is how do I find this script in the source tree?
Run a search /usr/libexec/bsdinstall at github/freebsd. You will find at the second code BINDIR= ${LIBEXECDIR}/bsdinstall. Run another search with that pattern on github or local egrep -R '({LINEXECDIR}/bsdinstall)' /usr/src/usr.sbin /bsdinstall
 
Run a search /usr/libexec/bsdinstall at github/freebsd. You will find at the second code BINDIR= ${LIBEXECDIR}/bsdinstall. Run another search with that pattern on github or local egrep -R '({LINEXECDIR}/bsdinstall)' /usr/src/usr.sbin /bsdinstall
Oops. Misunderstanding. I don't know from where that came from, but I had interpreted script for Makefile's. Sorry.
 
Oops. Misunderstanding. I don't know from where that came from, but I had interpreted script for Makefile's. Sorry.

That's okay, I think I finally got it. The script under bsdinstall/ which is named bsdinstall too, is copied into /usr/libexec/bsdinstall/, and from there when it is run, it calls other scripts that should already be located at /usr/libexec/bsdinstall. See $VERB in bsdinstall script, it gets substituted with something like rootpass, or mount, or config, so here is how it most probably works.
 
Back
Top