[systemd] disable default systemd udev rules for interfaces (#7369)

Fix #7364

99-default.link - was always in SONiC, but previous systemd (<247) had an issue and it did not work due to issue systemd/systemd#3374. Now systemd 247 works.

However, such policy overrides teamd provided mac address which causes teamd netdev to use a random mac
address. Therefore, needs to be disabled.

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
This commit is contained in:
Stepan Blyshchak 2021-04-22 03:50:00 +03:00 committed by GitHub
parent ee98b17281
commit ae339c95d2
No account linked to committer's email address
2 changed files with 10 additions and 0 deletions

View File

@ -399,6 +399,9 @@ sudo cp files/dhcp/90-dhcp6-systcl.conf.j2 $FILESYSTEM_ROOT_USR_SHARE_SONIC_TEMP
sudo cp $IMAGE_CONFIGS/interfaces/init_interfaces $FILESYSTEM_ROOT/etc/network/interfaces sudo cp $IMAGE_CONFIGS/interfaces/init_interfaces $FILESYSTEM_ROOT/etc/network/interfaces
sudo mkdir -p $FILESYSTEM_ROOT/etc/network/interfaces.d sudo mkdir -p $FILESYSTEM_ROOT/etc/network/interfaces.d
# System'd network udev rules
sudo cp $IMAGE_CONFIGS/systemd/network/* $FILESYSTEM_ROOT_ETC/systemd/network/
# copy core file uploader files # copy core file uploader files
sudo cp $IMAGE_CONFIGS/corefile_uploader/core_uploader.service $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM sudo cp $IMAGE_CONFIGS/corefile_uploader/core_uploader.service $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl disable core_uploader.service sudo LANG=C chroot $FILESYSTEM_ROOT systemctl disable core_uploader.service

View File

@ -0,0 +1,7 @@
[Match]
OriginalName=*
[Link]
# Override default systemd policy
MACAddressPolicy=none