mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-23 09:23:02 +02:00
confd: ensure correct ownership of startup-config after factory reset
Fixes #415 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
committed by
Tobias Waldekranz
parent
809e6b44be
commit
2412fff39c
@@ -10,10 +10,11 @@ run name:error :1 log:console norestart if:<run/bootstrap/failure> \
|
||||
service name:confd log <run/bootstrap/success> \
|
||||
[S12345] sysrepo-plugind -f -p /run/confd.pid -n -- Configuration daemon
|
||||
|
||||
# Bootstrap system with startup-config
|
||||
# Bootstrap system with startup-config, ensure correct ownership
|
||||
run name:startup log:prio:user.notice norestart <pid/confd> \
|
||||
[S] /usr/libexec/confd/load startup-config \
|
||||
-- Loading startup-config
|
||||
task chown admin:wheel /cfg/startup-config.cfg --
|
||||
|
||||
# Run if loading startup-config fails for some reason
|
||||
run name:failure log:prio:user.critical norestart <pid/confd> if:<run/startup/failure> \
|
||||
|
||||
@@ -255,7 +255,6 @@ chgrp wheel /cfg
|
||||
chmod g+w /cfg
|
||||
if [ ! -f "$STARTUP_CFG" ]; then
|
||||
sysrepocfg -f json -X"$STARTUP_CFG"
|
||||
chown admin:wheel "$STARTUP_CFG"
|
||||
fi
|
||||
|
||||
# Clear running-config so we can load startup in the next step
|
||||
|
||||
Reference in New Issue
Block a user