diff options
| -rw-r--r-- | meta/recipes-core/systemd/systemd_257.8.bb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/meta/recipes-core/systemd/systemd_257.8.bb b/meta/recipes-core/systemd/systemd_257.8.bb index 174372be03..6399c57640 100644 --- a/meta/recipes-core/systemd/systemd_257.8.bb +++ b/meta/recipes-core/systemd/systemd_257.8.bb | |||
| @@ -400,15 +400,8 @@ do_install() { | |||
| 400 | ${D}/${sysconfdir}/systemd/system.conf | 400 | ${D}/${sysconfdir}/systemd/system.conf |
| 401 | fi | 401 | fi |
| 402 | 402 | ||
| 403 | if ${@bb.utils.contains('PACKAGECONFIG', 'pni-names', 'true', 'false', d)}; then | 403 | # Actively disable Predictable Network Interface Names |
| 404 | if ! grep -q '^NamePolicy=.*mac' ${D}${nonarch_libdir}/systemd/network/99-default.link; then | 404 | if ${@ 'true' if not bb.utils.contains('PACKAGECONFIG', 'pni-names', 'true', 'false', d) else 'false'}; then |
| 405 | sed -i '/^NamePolicy=/s/$/ mac/' ${D}${nonarch_libdir}/systemd/network/99-default.link | ||
| 406 | fi | ||
| 407 | if ! grep -q 'AlternativeNamesPolicy=.*mac' ${D}${nonarch_libdir}/systemd/network/99-default.link; then | ||
| 408 | sed -i '/AlternativeNamesPolicy=/s/$/ mac/' ${D}${nonarch_libdir}/systemd/network/99-default.link | ||
| 409 | fi | ||
| 410 | else | ||
| 411 | # Actively disable Predictable Network Interface Names | ||
| 412 | sed -i 's/^NamePolicy=.*/NamePolicy=/;s/^AlternativeNamesPolicy=.*/AlternativeNamesPolicy=/' ${D}${nonarch_libdir}/systemd/network/99-default.link | 405 | sed -i 's/^NamePolicy=.*/NamePolicy=/;s/^AlternativeNamesPolicy=.*/AlternativeNamesPolicy=/' ${D}${nonarch_libdir}/systemd/network/99-default.link |
| 413 | fi | 406 | fi |
| 414 | } | 407 | } |
