[PATCH] appliance: Remove /etc/dhcp/dhclient-enter-hooks.d/resolved.
Workaround for Ubuntu which uses this script to try to start a systemd service. That won't work because systemd is not used inside the appliance. See: https://bugs.launchpad.net/ubuntu/+source/supermin/+bug/1824236 Thanks: Ioanna Alifieraki --- appliance/init | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appliance/init b/appliance/init index 4f2b55822..b1c4d09ea 100755 --- a/appliance/init +++ b/appliance/init @@ -122,7 +122,9 @@ ip link set dev lo up if test "$guestfs_network" = 1; then iface=$(ls -I all -I default -I lo /proc/sys/net/ipv4/conf) - touch /etc/fstab # Workaround for Ubuntu. + # Two workarounds for Ubuntu: + touch /etc/fstab + rm -f /etc/dhcp/dhclient-enter-hooks.d/resolved if dhclient --version >/dev/null 2>&1; then dhclient $iface else -- 2.20.1
On Thursday, 18 April 2019 11:53:39 CEST Richard W.M. Jones wrote:
Workaround for Ubuntu which uses this script to try to start a systemd service. That won't work because systemd is not used inside the appliance. See:
https://bugs.launchpad.net/ubuntu/+source/supermin/+bug/1824236
Thanks: Ioanna Alifieraki --- appliance/init | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/appliance/init b/appliance/init index 4f2b55822..b1c4d09ea 100755 --- a/appliance/init +++ b/appliance/init @@ -122,7 +122,9 @@ ip link set dev lo up
if test "$guestfs_network" = 1; then iface=$(ls -I all -I default -I lo /proc/sys/net/ipv4/conf) - touch /etc/fstab # Workaround for Ubuntu. + # Two workarounds for Ubuntu: + touch /etc/fstab + rm -f /etc/dhcp/dhclient-enter-hooks.d/resolved if dhclient --version >/dev/null 2>&1; then
Why not add it as excludefile when building the supermin appliance, instead? This way, Ubuntu would not even need to do any changes in libguestfs itself, and that excludefile can be shipped by the same package installing that dhclient hook. -- Pino Toscano
I had tried this approach, to add /etc/dhcp/dhclient-enter-hooks.d/resolved to excludefiles, however it didn't work. As far as I know, this hook is included in the base image and according to [1], the current implementation does not apply excludefiles to the base image. Jo [1] https://github.com/libguestfs/supermin/blob/b2401285cd3e3d42006fc164ef1f046c... On Thu, Apr 18, 2019 at 10:58 AM Pino Toscano <ptoscano@redhat.com> wrote:
On Thursday, 18 April 2019 11:53:39 CEST Richard W.M. Jones wrote:
Workaround for Ubuntu which uses this script to try to start a systemd service. That won't work because systemd is not used inside the appliance. See:
https://bugs.launchpad.net/ubuntu/+source/supermin/+bug/1824236
Thanks: Ioanna Alifieraki --- appliance/init | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/appliance/init b/appliance/init index 4f2b55822..b1c4d09ea 100755 --- a/appliance/init +++ b/appliance/init @@ -122,7 +122,9 @@ ip link set dev lo up
if test "$guestfs_network" = 1; then iface=$(ls -I all -I default -I lo /proc/sys/net/ipv4/conf) - touch /etc/fstab # Workaround for Ubuntu. + # Two workarounds for Ubuntu: + touch /etc/fstab + rm -f /etc/dhcp/dhclient-enter-hooks.d/resolved if dhclient --version >/dev/null 2>&1; then
Why not add it as excludefile when building the supermin appliance, instead? This way, Ubuntu would not even need to do any changes in libguestfs itself, and that excludefile can be shipped by the same package installing that dhclient hook.
-- Pino Toscano_______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs
On Thu, Apr 18, 2019 at 12:17:18PM +0100, Ioanna Alifieraki wrote:
I had tried this approach, to add /etc/dhcp/dhclient-enter-hooks.d/resolved to excludefiles, however it didn't work. As far as I know, this hook is included in the base image and according to [1], the current implementation does not apply excludefiles to the base image.
Yes I think that is right. It doesn't apply to config files in base.tar.gz (which may itself be a bug, but here we are). Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
Hi, Is there any chance you will merge the suggested patch? Thanks, Jo On Thu, Apr 18, 2019 at 2:01 PM Richard W.M. Jones <rjones@redhat.com> wrote:
I had tried this approach, to add /etc/dhcp/dhclient-enter-hooks.d/resolved to excludefiles, however it didn't work. As far as I know, this hook is included in the base image and according to [1], the current implementation does not apply excludefiles to the
On Thu, Apr 18, 2019 at 12:17:18PM +0100, Ioanna Alifieraki wrote: base
image.
Yes I think that is right. It doesn't apply to config files in base.tar.gz (which may itself be a bug, but here we are).
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
On Wed, May 29, 2019 at 04:14:06PM +0100, Ioanna Alifieraki wrote:
Hi,
Is there any chance you will merge the suggested patch?
It's this one right? https://www.redhat.com/archives/libguestfs/2019-April/msg00129.html Yes I can push this. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
Yes, this is the one. Thank you very much! Jo On Wed, May 29, 2019 at 5:05 PM Richard W.M. Jones <rjones@redhat.com> wrote:
On Wed, May 29, 2019 at 04:14:06PM +0100, Ioanna Alifieraki wrote:
Hi,
Is there any chance you will merge the suggested patch?
It's this one right?
https://www.redhat.com/archives/libguestfs/2019-April/msg00129.html
Yes I can push this.
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
participants (3)
-
Ioanna Alifieraki -
Pino Toscano -
Richard W.M. Jones