mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-11 02:41:33 +00:00
Merge lp:~codyshepherd/livecd-rootfs/xenial-proposed-resolvconf
This commit is contained in:
commit
f292ab1847
9
debian/changelog
vendored
9
debian/changelog
vendored
@ -1,3 +1,12 @@
|
|||||||
|
livecd-rootfs (2.408.40) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
|
[ Cody Shepherd ]
|
||||||
|
* Increasing modularity in relocation of /etc/resolv.conf to enable users
|
||||||
|
of live-build/functions to manipulate /etc/resolv.conf in a more
|
||||||
|
granular and future-proof way.
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Thu, 01 Nov 2018 10:10:12 -0700
|
||||||
|
|
||||||
livecd-rootfs (2.408.39) xenial; urgency=medium
|
livecd-rootfs (2.408.39) xenial; urgency=medium
|
||||||
|
|
||||||
* Backport support for building ubuntu-core images with ubuntu-image (using
|
* Backport support for building ubuntu-core images with ubuntu-image (using
|
||||||
|
@ -77,6 +77,17 @@ mount_image() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setup_resolvconf() {
|
||||||
|
local mountpoint=${1}
|
||||||
|
mv "${mountpoint}/etc/resolv.conf" resolv.conf.tmp
|
||||||
|
cp /etc/resolv.conf "${mountpoint}/etc/resolv.conf"
|
||||||
|
}
|
||||||
|
|
||||||
|
recover_resolvconf() {
|
||||||
|
local mountpoint=${1}
|
||||||
|
mv resolv.conf.tmp "${mountpoint}/etc/resolv.conf"
|
||||||
|
}
|
||||||
|
|
||||||
setup_mountpoint() {
|
setup_mountpoint() {
|
||||||
local mountpoint="$1"
|
local mountpoint="$1"
|
||||||
|
|
||||||
@ -86,8 +97,7 @@ setup_mountpoint() {
|
|||||||
mount -t tmpfs none "$mountpoint/tmp"
|
mount -t tmpfs none "$mountpoint/tmp"
|
||||||
mount -t tmpfs none "$mountpoint/var/lib/apt"
|
mount -t tmpfs none "$mountpoint/var/lib/apt"
|
||||||
mount -t tmpfs none "$mountpoint/var/cache/apt"
|
mount -t tmpfs none "$mountpoint/var/cache/apt"
|
||||||
mv "$mountpoint/etc/resolv.conf" resolv.conf.tmp
|
setup_resolvconf "${mountpoint}"
|
||||||
cp /etc/resolv.conf "$mountpoint/etc/resolv.conf"
|
|
||||||
chroot "$mountpoint" apt-get update
|
chroot "$mountpoint" apt-get update
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -103,7 +113,7 @@ teardown_mountpoint() {
|
|||||||
{ print \$2 }" | LC_ALL=C sort -r); do
|
{ print \$2 }" | LC_ALL=C sort -r); do
|
||||||
umount $submount
|
umount $submount
|
||||||
done
|
done
|
||||||
mv resolv.conf.tmp "$mountpoint/etc/resolv.conf"
|
recover_resolvconf "${mountpoint}"
|
||||||
}
|
}
|
||||||
|
|
||||||
mount_partition() {
|
mount_partition() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user