bisdn / meta-switch

MIT License
4 stars 2 forks source link

installer: add support for default configurations #203

Closed KanjiMonster closed 1 month ago

KanjiMonster commented 2 months ago

Add support for creating a default network config during installation.

By setting the environment variable BISDN_DEFAULT_CONFIG, the identically named example configuration shipped by the baseboxd package will be installed.

This will disable the take over of any configuration from a previous installation, to avoid configuration conflicts.

As a special keyword, 'none' is accepted as a way to prevent configuration backup without creating a default configuration.

KanjiMonster commented 2 months ago

Completely untested.

Open question: should specifying a non-existing default config result in a wiped config, or should it then restore the previous installation's one?

I for now opted for the former, since the behavior would be most similar to when setting it to an existing config.

should work this way:

$ BISDN_DEFAULT_CONFIG="foo" onie-nos-install ...