Merge branch 'sysctl-fix' into 'main'

fix error handling when setting sysctl via yaml config

See merge request systemrescue/systemrescue-sources!239
This commit is contained in:
Gerd v. Egidy 2022-10-15 15:31:12 +00:00
commit 6d7848cf5f

View file

@ -334,7 +334,7 @@ if 'sysconfig' in config and 'sysctl' in config['sysconfig'] and \
# pipe config into sysctl
p = subprocess.run(["sysctl", "--load=-"], text=True, input=sysctllines)
if p.returncode is not 0:
if p.returncode != 0:
print (f"Some or all sysctl options couldn't be set")
errcnt+=1