On 17/06/2024 3:40 pm, Anthony PERARD wrote:
> diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
> index 3545f3fd..d974fea5 100644
> --- a/Osstest/Debian.pm
> +++ b/Osstest/Debian.pm
> @@ -972,7 +972,19 @@ END
>          # is going to be added to dom0's initrd, which is used by some guests
>          # (created with ts-debian-install).
>          preseed_hook_installscript($ho, $sfx,
> -            '/usr/lib/base-installer.d/', '05ifnamepolicy', <<'END');
> +            '/usr/lib/base-installer.d/', '05ifnamepolicy',
> +            $ho->{Flags}{'force-mac-address'} ? <<'END' : <<'END');

The conditional looks suspicious if both options are <<'END'.

Doesn't this just write 70-eth-keep-policy.link unconditionally?

~Andrew

> +#!/bin/sh -e
> +linkfile=/target/etc/systemd/network/70-eth-keep-policy.link
> +mkdir -p `dirname $linkfile`
> +cat > $linkfile <<EOF
> +[Match]
> +Type=ether
> +Driver=!vif
> +[Link]
> +NamePolicy=keep
> +EOF
> +END
>  #!/bin/sh -e
>  linkfile=/target/etc/systemd/network/90-eth-mac-policy.link
>  mkdir -p `dirname $linkfile`
>

Reply via email to