mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-01 05:13:01 +02:00
confd: save boot time by not loading startup-config twice
Only create a default startup-config from factory-config if one is missing. Do not load an existing startup-config, that is handled by a later step in the boot process, which needs to be monitored (and displayed) separately to fail over to a Fail Secure mode on error. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
committed by
Tobias Waldekranz
parent
17e748a129
commit
8152df445b
@@ -105,17 +105,14 @@ sysrepoctl -c ietf-netconf -g wheel -p 0660 \
|
||||
# Allow wheel group users (admin) to modify NACM
|
||||
sysrepoctl -c ietf-netconf-acm -g wheel -p 0660
|
||||
|
||||
# On first boot, install factory-config as startup-config
|
||||
# Otherwise, load startup-config to {startup}. Due to a
|
||||
# limitation in sysrepo we cannot initialize factory for
|
||||
# ietf-netconf-acm, so we cheat, see sysrepo#3079
|
||||
if [ -f "$STARTUP" ]; then
|
||||
sysrepocfg -f json -I"$STARTUP"
|
||||
else
|
||||
# On first boot, install factory-config as startup-config. Due to a
|
||||
# limitation in sysrepo we cannot initialize ietf-netconf-acm, so we
|
||||
# cheat, see sysrepo#3079
|
||||
if [ ! -f "$STARTUP" ]; then
|
||||
sysrepocfg -f json -X"$STARTUP"
|
||||
fi
|
||||
|
||||
# Clear running-config
|
||||
# Clear running-config so we can load startup in the next step
|
||||
echo "{}" > "$INIT_DATA"
|
||||
sysrepocfg -f json -I"$INIT_DATA" -d running
|
||||
|
||||
|
||||
Reference in New Issue
Block a user