We have a bunch of variables in the default environment (defined in https://github.com/vyos/vyos-1x/blob/current/src/etc/default/vyatta) that used to be important for compatibility with old Vyatta scripts or early VyOS re-implementations of them, but aren't used anywhere anymore and just makes it harder to reason about the variables we actually need.
Among them:
- vyos_cfg_templates
- vyatta_prefix
- vyatta_htmldir
- vyatta_datadir
- vyatta_bindir
- vyos_libdir
- vyatta_localstatedir
- vyos_op_templates
- vyos_cfg_templates
- vyatta_libexecdir
- vyatta_prefix
- vyos_prefix
- vyos_datarootdir
- vyatta_sharedstatedir
- vyatta_infodir
- vyatta_localedir
- vyos_sbin_dir
- vyos_share_dir
- vyos_configdir — scripts that do use a variable for the config dir, use $vyatta_sysconfdir, funnily enough.
For the record, the following variables are used:
- vyatta_sysconfdir — used in vyos-router and in vyos-boot-config-loader.py; we could replace it with a more modern name.
- vyatta_sbindir — used only in vyos-router (its usage there is dubious and likely useless now) and in vyatta-cfg-cmd-wrapper (could be hardcoded there)