Skip to content

Commit cac97ed

Browse files
authored
Merge pull request #2033 from rancher-sandbox/update-interfaces
Update /mnt/data/etc/network/interfaces on each boot
2 parents bfd7471 + da59e63 commit cac97ed

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

pkg/cidata/cidata.TEMPLATE.d/boot/04-persistent-data-volume.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ if [ "$(awk '$2 == "/" {print $3}' /proc/mounts)" == "tmpfs" ]; then
2727
fi
2828
# Mount data volume
2929
mount -t ext4 /dev/disk/by-label/data-volume /mnt/data
30+
# Update /etc files that might have changed during this boot
31+
cp /etc/network/interfaces /mnt/data/etc/network/
32+
cp /etc/resolv.conf /mnt/data/etc/
33+
# TODO there are probably others that should be updated as well
3034
else
3135
# Find an unpartitioned disk and create data-volume
3236
DISKS=$(lsblk --list --noheadings --output name,type | awk '$2 == "disk" {print $1}')

pkg/cidata/cidata.TEMPLATE.d/boot/50-alpine-fix.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)