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:
Joachim Wiberg
2024-04-29 14:31:40 +02:00
committed by Tobias Waldekranz
parent 809e6b44be
commit 2412fff39c
2 changed files with 2 additions and 2 deletions
+2 -1
View File
@@ -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> \
-1
View File
@@ -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