<div dir="ltr"><div dir="ltr"><div dir="ltr">I had tried this approach, to add /etc/dhcp/dhclient-enter-hooks.d/resolved </div><div dir="ltr">to excludefiles, however it didn't work.<div>As far as I know, this hook is included in the base image and according</div><div>to [1], the current implementation does not apply excludefiles to the base</div><div>image.</div><div><br></div><div>Jo</div><div><br></div><div>[1] <a href="https://github.com/libguestfs/supermin/blob/b2401285cd3e3d42006fc164ef1f046cc35a50c4/src/mode_build.ml#L137">https://github.com/libguestfs/supermin/blob/b2401285cd3e3d42006fc164ef1f046cc35a50c4/src/mode_build.ml#L137</a> </div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 18, 2019 at 10:58 AM Pino Toscano <<a href="mailto:ptoscano@redhat.com">ptoscano@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thursday, 18 April 2019 11:53:39 CEST Richard W.M. Jones wrote:<br>
> Workaround for Ubuntu which uses this script to try to start a systemd<br>
> service.  That won't work because systemd is not used inside the<br>
> appliance.  See:<br>
> <br>
> <a href="https://bugs.launchpad.net/ubuntu/+source/supermin/+bug/1824236" rel="noreferrer" target="_blank">https://bugs.launchpad.net/ubuntu/+source/supermin/+bug/1824236</a><br>
> <br>
> Thanks: Ioanna Alifieraki<br>
> ---<br>
>  appliance/init | 4 +++-<br>
>  1 file changed, 3 insertions(+), 1 deletion(-)<br>
> <br>
> diff --git a/appliance/init b/appliance/init<br>
> index 4f2b55822..b1c4d09ea 100755<br>
> --- a/appliance/init<br>
> +++ b/appliance/init<br>
> @@ -122,7 +122,9 @@ ip link set dev lo up<br>
>  <br>
>  if test "$guestfs_network" = 1; then<br>
>      iface=$(ls -I all -I default -I lo /proc/sys/net/ipv4/conf)<br>
> -    touch /etc/fstab   # Workaround for Ubuntu.<br>
> +    # Two workarounds for Ubuntu:<br>
> +    touch /etc/fstab<br>
> +    rm -f /etc/dhcp/dhclient-enter-hooks.d/resolved<br>
>      if dhclient --version >/dev/null 2>&1; then<br>
<br>
Why not add it as excludefile when building the supermin appliance,<br>
instead?  This way, Ubuntu would not even need to do any changes in<br>
libguestfs itself, and that excludefile can be shipped by the same<br>
package installing that dhclient hook.<br>
<br>
-- <br>
Pino Toscano_______________________________________________<br>
Libguestfs mailing list<br>
<a href="mailto:Libguestfs@redhat.com" target="_blank">Libguestfs@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/libguestfs" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/libguestfs</a></blockquote></div>