Add sanity check for "systemd" config values (MR 2273)

Make sure users don't set systemd to "true" or other not allowed values
(allowed are "always", "default", "never").

Check for it:
* after loading the config
* when using 'pmbootstrap config systemd <newvalue>'
This commit is contained in:
Oliver Smith 2024-03-11 17:27:12 +01:00
parent de5e4c6962
commit 4478116379
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
4 changed files with 29 additions and 2 deletions

View file

@ -213,6 +213,7 @@ def config(args):
pmb.config.save(args, cfg)
elif args.value is not None:
cfg["pmbootstrap"][args.name] = args.value
pmb.config.sanity_checks(args, cfg, False)
logging.info("Config changed: " + args.name + "='" + args.value + "'")
pmb.config.save(args, cfg)
elif args.name: