Initialize /config from /etc, except for existing files (like bind-mounts). Move to using /config in VPP, even though there is a backwards compat symlink from /etc/{frr,bird,vpp} to /config

This commit is contained in:
2026-04-02 00:16:49 +02:00
parent 039d09d358
commit d8369e2c10
6 changed files with 17 additions and 11 deletions

View File

@@ -19,6 +19,13 @@ sed -i -e 's,^#PermitRootLogin prohibit-password,PermitRootLogin yes,' /etc/ssh/
sed -i -e 's,^root:.*,root:$y$j9T$kG8pyZEVmwLXEtXekQCRK.$9iJxq/bEx5buni1hrC8VmvkDHRy7ZMsw9wYvwrzexID:20211::::::,' /etc/shadow
/etc/init.d/ssh start
echo "Initializing /config"
for dir in vpp bird frr; do
rsync -av --ignore-existing /etc/$dir/ /config/$dir/
rm -rf /etc/$dir/
ln -s /config/$dir /etc/$dir
done
if [ "$BIRD_ENABLED" == "true" ]; then
echo "Starting Bird in $NETNS"
mkdir -p /run/bird /var/log/bird