Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: restore resolv.conf for armbian/ubuntu images #38

Merged
merged 3 commits into from
Mar 3, 2025

Conversation

meteyou
Copy link
Contributor

@meteyou meteyou commented Mar 1, 2025

This PR adds a routine to restore the original /etc/resolv.conf in the end_chroot_script. Because this file is a symlink in Armbian > 24.5, we have to store the absolute path of the target file instead of just moving the file.

I tested it in this run: https://github.com/meteyou/MainsailOS-dev/actions/runs/13609432940/job/38044755707#step:12:4048

# workaround for Armbian > 24.5, because it uses a symlink for /etc/resolv.conf
if [ -h /etc/resolv.conf ]; then
link_target="$(readlink /etc/resolv.conf.orig)"
echo "${link_target}" > /etc/resolv.conf.link
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be /etc/resolv.conf? The orig version doesn't yet exist at this point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep! you're absolutely right! i must have made a mistake when copy&paste from my test branch. i fixed it.

@foosel foosel merged commit 29b1d1a into OctoPrint:main Mar 3, 2025
@meteyou meteyou deleted the fix/fix-resolv-conf branch March 3, 2025 11:23
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants