diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/99-org.freedesktop.hostname1.rules b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/99-org.freedesktop.hostname1.rules new file mode 100644 index 0000000000..70bec0f868 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/99-org.freedesktop.hostname1.rules @@ -0,0 +1,6 @@ +polkit.addRule(function(action, subject) { + if (action.id == "org.freedesktop.hostname1.set-hostname" && + subject.user == "systemd-network") { + return polkit.Result.YES; + } +}); diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-215-r9.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-215-r10.ebuild similarity index 99% rename from sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-215-r9.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-215-r10.ebuild index 8861ca885e..a1feadf44f 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-215-r9.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-215-r10.ebuild @@ -383,6 +383,10 @@ multilib_src_install_all() { systemd_enable_service multi-user.target systemd-networkd.service systemd_enable_service multi-user.target systemd-resolved.service systemd_enable_service network-online.target systemd-networkd-wait-online.service + + # Grant networkd access to set the transient host name + insinto /usr/share/polkit-1/rules.d + doins "${FILESDIR}"/99-org.freedesktop.hostname1.rules } migrate_locale() {