I have some concern about the patch being more or less suggested by upstream, but never merged upstream. I see they previously merge a workaround for Ubuntu, can you discuss with them and see if that can be merged again upstream ? I'm trying to avoid to have to carry a patch in Ubuntu for libguestfs forever because upstream didn't merge it.
As I read the code so far, the workaround does (and only needed in ubuntu FWIU):
touch /etc/fstab
rm -f /etc/dhcp/dhclient-enter-hooks.d/resolved
but the workaround is applied to all, regardless of the Linux distribution.
If we PR something upstream, would it be possible to suggest a separate if statement which will detect if it's ubuntu and/or debian
What would you think of something like this (or something along those line, so that the workaround is only applied in a ubuntu context) it would look like cleaner IMHO:
-----
++ # Workarounds for ubuntu/debian
++ ubuntu = <SOMETHING>
++ if test "$guestfs_network" = 1 and ubuntu = <SOMETHING>; then
++ touch /etc/fstab
++ rm -f /etc/dhcp/dhclient-enter-hooks.d/resolved
fi
+ 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
-----
I don't feel comfortable to sponsor this in Eoan, before further discussion with upstream to merged the change.
[sts-sponsor]
I have some concern about the patch being more or less suggested by upstream, but never merged upstream. I see they previously merge a workaround for Ubuntu, can you discuss with them and see if that can be merged again upstream ? I'm trying to avoid to have to carry a patch in Ubuntu for libguestfs forever because upstream didn't merge it.
As I read the code so far, the workaround does (and only needed in ubuntu FWIU): dhclient- enter-hooks. d/resolved
touch /etc/fstab
rm -f /etc/dhcp/
but the workaround is applied to all, regardless of the Linux distribution.
If we PR something upstream, would it be possible to suggest a separate if statement which will detect if it's ubuntu and/or debian
What would you think of something like this (or something along those line, so that the workaround is only applied in a ubuntu context) it would look like cleaner IMHO: dhclient- enter-hooks. d/resolved
-----
++ # Workarounds for ubuntu/debian
++ ubuntu = <SOMETHING>
++ if test "$guestfs_network" = 1 and ubuntu = <SOMETHING>; then
++ touch /etc/fstab
++ rm -f /etc/dhcp/
fi
+ if test "$guestfs_network" = 1; then net/ipv4/ conf) dhclient- enter-hooks. d/resolved
+ iface=$(ls -I all -I default -I lo /proc/sys/
+- touch /etc/fstab # Workaround for Ubuntu.
-- # Two workarounds for Ubuntu:
-- touch /etc/fstab
-- rm -f /etc/dhcp/
+ if dhclient --version >/dev/null 2>&1; then
+ dhclient $iface
+ else
-----
I don't feel comfortable to sponsor this in Eoan, before further discussion with upstream to merged the change.