This change converts NanoBSD into a two-script bundle.
- defaults.sh contains all non-CLI code. Most NanoBSD code is moved into this file.
- nanobsd.sh now consists just of a command line interface that calls into functions in defaults.sh.
Differential D1321
Make NanoBSD source-able from other scripts. will on Dec 16 2014, 3:21 AM. Authored by Tags None Referenced Files
Subscribers None
Details
This change converts NanoBSD into a two-script bundle.
Run NanoBSD using a previously-working configuration.
Diff Detail
Event TimelineComment Actions So what's the motivation for this?
Comment Actions The motivation is primarily to enable using NanoBSD within another script. This can be useful for sharing configuration data, for example. Comment Actions Sure, but there's one big caveat. The API between nanobsd.sh and defaults.sh is currently undocumented and subject to change. cust_pkg is definitely going to be deleted soon, for example. All the geometry stuff to create a disk is likely to be redone (though the current APIs might remain). Unless there's documentation and/or documented users, external folks are going to have a bumpy ride. Comment Actions That's true, but the point of the change is merely to enable reuse, not necessarily to make any sort of API guarantee.
|