I utilize bsdinstall to rebuild my systems indirectly, but I'd like to replace the logging and dialogs entirely.
Right now, I'm launching the install essentially as:
I have my own script.custom which modifies the stock script file under: /usr/libexec/bsdinstall/script. It automatically sets up networking, my framework for installing shell apps, my freebsd-installer app (wrapper around bsdinstall), sets up a package cache, and others.
I use ZFS on top of GELI for all of my installs and I utilize the zfsboot script under /usr/libexec/bsdinstall. Previously, I used my own script which differed slightly to remove the dialogs. I reverted back because I want to minimize the amount of code I'm maintaining.
While I'd like to minimize all of the dialogs and echo statements, I want to also minimize how much I deviate from the main bsdinstall and thus have to maintain myself.
I was thinking that perhaps what I might do is overwrite the files under /usr/share/bsdconfig and overwrite the functions defined there. But, I also don't like that approach. Ideally, I'd like to just be able to say:
Ideally, I'd like the script to be simplified to something like - this isn't necessarily in the right order with all the args, but it intent is that it is self-contained, automatically sets up logging or the interactive prompts if needed.
Since I use zfsboot for all of my systems and that is interactive, at least for the password prompt, I am stuck with that, but are there any other approaches?
Right now, I'm launching the install essentially as:
bsdinstall -D /tmp/bsdinstall.log script.custom bootstrap
I have my own script.custom which modifies the stock script file under: /usr/libexec/bsdinstall/script. It automatically sets up networking, my framework for installing shell apps, my freebsd-installer app (wrapper around bsdinstall), sets up a package cache, and others.
I use ZFS on top of GELI for all of my installs and I utilize the zfsboot script under /usr/libexec/bsdinstall. Previously, I used my own script which differed slightly to remove the dialogs. I reverted back because I want to minimize the amount of code I'm maintaining.
While I'd like to minimize all of the dialogs and echo statements, I want to also minimize how much I deviate from the main bsdinstall and thus have to maintain myself.
I was thinking that perhaps what I might do is overwrite the files under /usr/share/bsdconfig and overwrite the functions defined there. But, I also don't like that approach. Ideally, I'd like to just be able to say:
Code:
NON_INTERACTIVE=1
REQUIRED_VARIABLE_1=1234
REQUIRED_VARIABLE_2=abcd
Ideally, I'd like the script to be simplified to something like - this isn't necessarily in the right order with all the args, but it intent is that it is self-contained, automatically sets up logging or the interactive prompts if needed.
Code:
bsdinstall config
bsdinstall zfsboot
bsdinstall mount
bsdinstall chroot
Since I use zfsboot for all of my systems and that is interactive, at least for the password prompt, I am stuck with that, but are there any other approaches?