fix ssh config move (replace relative by absolute symlinks)

This commit is contained in:
Jörg Deckert 2025-01-28 18:23:38 +01:00
parent c75223fbae
commit d53ac83efc

View File

@ -170,6 +170,8 @@ populate_data
if [ ! -d "/$LABEL/etc/ssh" ]; then if [ ! -d "/$LABEL/etc/ssh" ]; then
cp -af /etc/ssh /etc/ssh.orig cp -af /etc/ssh /etc/ssh.orig
# replace relative by absulute symlinks
find /etc/ssh -type l -exec /bin/bash -c 'abs=$(readlink -f "$0") && rm "$0" && ln -s "$abs" "$0"' {} \;
mkdir -p "/$LABEL/etc" mkdir -p "/$LABEL/etc"
mv /etc/ssh "/$LABEL/etc/" mv /etc/ssh "/$LABEL/etc/"
ln -nsf "/$LABEL/etc/ssh" /etc/ssh ln -nsf "/$LABEL/etc/ssh" /etc/ssh