Skip to content

Commit

Permalink
Make sure all network interfaces are routable
Browse files Browse the repository at this point in the history
This is a workaround for #6051

It makes sure the boot-time /etc/network/interfaces file is copied
to the persisted location and then restarts the networking service
yet one more time.

This workaround should be removed when the issue is fixed upstream.

Signed-off-by: Jan Dubois <[email protected]>
  • Loading branch information
jandubois committed Nov 26, 2023
1 parent d80c017 commit 678f0c8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/rancher-desktop/assets/lima-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ provision:
mkdir -p /bootfs
mount --bind / /bootfs
# /bootfs/etc is empty on first boot because it has been moved to /mnt/data/etc by lima
# Workaround for https://github.com/rancher-sandbox/rancher-desktop/issues/6051
# should be removed when the issue is fixed in Lima itself
if [ -f /bootfs/etc/network/interfaces ] && ! diff -q /etc/network/interfaces /bootfs/etc/network/interfaces; then
cp /bootfs/etc/network/interfaces /etc/network/interfaces
rc-service networking restart
fi
if [ -f /bootfs/etc/os-release ] && ! diff -q /etc/os-release /bootfs/etc/os-release; then
cp /etc/machine-id /bootfs/etc
cp /etc/ssh/ssh_host* /bootfs/etc/ssh/
Expand Down

0 comments on commit 678f0c8

Please sign in to comment.