main/postmarketos-base-ui: NetworkManager: hostname-mode=none (MR 2457)
Disable the hostname management feature of NetworkManager. This isn't useful for the postmarketOS use case, where we set one hostname in /etc/hostname via pmbootstrap and want it to be used. (It makes more sense for normal PCs, which may just have the hostname 'localhost' at the end of the installation and then not be unique in the network.) NetworkManager is supposed to only change the hostname if it is set to localhost, however this detection does not work properly in postmarketOS. I've skimmed through sources of elogind, NetworkManager and OpenRC a bit and found that in OpenRC the definitive location to put the hostname is /etc/hostname. The other path, /etc/conf.d/hostname, is just a fallback. Experiments show that setting something in /etc/conf.d/hostname does prevent NM from setting a hostname offered by the DHCP server, but it's not clear to my why this happens. I suspect elogind + dbus. Disabling this feature we don't need anyway seems like a good approach to me without wasting too much time here.
This commit is contained in:
parent
8bc434515f
commit
13a7778f94
2 changed files with 15 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
# Maintainer: Clayton Craft <clayton@craftyguy.net>
|
# Maintainer: Clayton Craft <clayton@craftyguy.net>
|
||||||
pkgname=postmarketos-base-ui
|
pkgname=postmarketos-base-ui
|
||||||
pkgver=4
|
pkgver=4
|
||||||
pkgrel=0
|
pkgrel=1
|
||||||
pkgdesc="Meta package for minimal postmarketOS UI base"
|
pkgdesc="Meta package for minimal postmarketOS UI base"
|
||||||
url="https://postmarketos.org"
|
url="https://postmarketos.org"
|
||||||
arch="noarch"
|
arch="noarch"
|
||||||
|
@ -24,6 +24,7 @@ subpackages="
|
||||||
$pkgname-x11
|
$pkgname-x11
|
||||||
$pkgname-pulseaudio
|
$pkgname-pulseaudio
|
||||||
$pkgname-bluez-obexd:_obexd
|
$pkgname-bluez-obexd:_obexd
|
||||||
|
$pkgname-networkmanager
|
||||||
"
|
"
|
||||||
install="$pkgname.post-install $pkgname.post-upgrade"
|
install="$pkgname.post-install $pkgname.post-upgrade"
|
||||||
replaces="
|
replaces="
|
||||||
|
@ -34,14 +35,15 @@ replaces="
|
||||||
replaces_priority=100 # leave plenty for alpine
|
replaces_priority=100 # leave plenty for alpine
|
||||||
|
|
||||||
_source644="
|
_source644="
|
||||||
|
etc/NetworkManager/conf.d/hostname-mode.conf
|
||||||
etc/chrony/chrony.conf
|
etc/chrony/chrony.conf
|
||||||
etc/conf.d/tinydm
|
etc/conf.d/tinydm
|
||||||
etc/conf.d/wpa_supplicant
|
etc/conf.d/wpa_supplicant
|
||||||
etc/elogind/logind.conf
|
etc/elogind/logind.conf
|
||||||
etc/pulse/daemon.conf.d/90-postmarketos.conf
|
etc/pulse/daemon.conf.d/90-postmarketos.conf
|
||||||
etc/pulse/postmarketos.pa
|
etc/pulse/postmarketos.pa
|
||||||
etc/sleep-inhibitor.conf
|
|
||||||
etc/skel/.profile
|
etc/skel/.profile
|
||||||
|
etc/sleep-inhibitor.conf
|
||||||
"
|
"
|
||||||
_source755="
|
_source755="
|
||||||
etc/tinydm.d/env-wayland.d/50-firefox-wayland.sh
|
etc/tinydm.d/env-wayland.d/50-firefox-wayland.sh
|
||||||
|
@ -112,14 +114,20 @@ _obexd() {
|
||||||
mkdir -p "$subpkgdir"
|
mkdir -p "$subpkgdir"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
networkmanager() {
|
||||||
|
install_if="$pkgname=$pkgver-r$pkgrel networkmanager"
|
||||||
|
amove etc/NetworkManager/conf.d/hostname-mode.conf
|
||||||
|
}
|
||||||
|
|
||||||
sha512sums="
|
sha512sums="
|
||||||
|
3c9ae7415f4891bee8595166ed6a42cb577a837f741c6b5409d193558626348b41516888a01d0c4895282c5f4e9a1ff838c19712888750b2ef68429bb4b42ee3 rootfs-etc-NetworkManager-conf.d-hostname-mode.conf
|
||||||
e5d049db1d82c510bab9246208b51b8ec2711d008d67792fc10d4c0b65ed4dece7b5ae3c3dd28a8539d177b6849c1f921cb9fef3d2c7bee0355451f7b4757ec6 rootfs-etc-chrony-chrony.conf
|
e5d049db1d82c510bab9246208b51b8ec2711d008d67792fc10d4c0b65ed4dece7b5ae3c3dd28a8539d177b6849c1f921cb9fef3d2c7bee0355451f7b4757ec6 rootfs-etc-chrony-chrony.conf
|
||||||
44e4283c6f77de83915977dd3bc2d8e2d96b3ed6cc68d3cc156304359ae649b5a8b0bac843e517ec6faa2066dd43ba85e313899b1eda04862f864fb9eb508aa0 rootfs-etc-conf.d-tinydm
|
44e4283c6f77de83915977dd3bc2d8e2d96b3ed6cc68d3cc156304359ae649b5a8b0bac843e517ec6faa2066dd43ba85e313899b1eda04862f864fb9eb508aa0 rootfs-etc-conf.d-tinydm
|
||||||
fe0651904c1f40ffa67d83daca190af199f63247e53642a59a1e1147cd06776fcf20b7b2fcc5373783d50b8bd6ce8d1354c8e5f4d582d319727b9ceefd1e8e16 rootfs-etc-conf.d-wpa_supplicant
|
fe0651904c1f40ffa67d83daca190af199f63247e53642a59a1e1147cd06776fcf20b7b2fcc5373783d50b8bd6ce8d1354c8e5f4d582d319727b9ceefd1e8e16 rootfs-etc-conf.d-wpa_supplicant
|
||||||
8d2c54fe3ca62c62f8337fb6be28479d0e02ea63f32abae81907f2768631e65c9e17485f8bc0854a013377f729b06dd1873e2b75f86f657ece866d00aecbbdb4 rootfs-etc-elogind-logind.conf
|
8d2c54fe3ca62c62f8337fb6be28479d0e02ea63f32abae81907f2768631e65c9e17485f8bc0854a013377f729b06dd1873e2b75f86f657ece866d00aecbbdb4 rootfs-etc-elogind-logind.conf
|
||||||
4afe8c5b70f4ca85f9348eb0df12e3152b76203a1a138daa5777f22b751ea431d3ee4113189d8606078f87a99c230b184bc73d53222e6e00581e46224bf5d39f rootfs-etc-pulse-daemon.conf.d-90-postmarketos.conf
|
4afe8c5b70f4ca85f9348eb0df12e3152b76203a1a138daa5777f22b751ea431d3ee4113189d8606078f87a99c230b184bc73d53222e6e00581e46224bf5d39f rootfs-etc-pulse-daemon.conf.d-90-postmarketos.conf
|
||||||
315598b67889b1f25f82b8269ed36af4fcee018a4edf2926ba966ab08e0a42e36676896d0a5636001b1eb7f16211dcf518123230049556dec9d03006e003a584 rootfs-etc-pulse-postmarketos.pa
|
315598b67889b1f25f82b8269ed36af4fcee018a4edf2926ba966ab08e0a42e36676896d0a5636001b1eb7f16211dcf518123230049556dec9d03006e003a584 rootfs-etc-pulse-postmarketos.pa
|
||||||
6b9c7bb73213187eb9ca8a94109b2b816f50c1158c90fec2e92b373864280d67741589e5bfbab8810945f031d2f4b535aad78a72e46e52ea50be5b85324da381 rootfs-etc-sleep-inhibitor.conf
|
|
||||||
90b30cbea660ef6cd4c0461b6935de0cd63a84a1a40edb24348a83044c97935b974bd8bafda9cd558e92d3eb69e22c5ccf55483b80f839e24f0eb57ae2df6fe3 rootfs-etc-skel-.profile
|
90b30cbea660ef6cd4c0461b6935de0cd63a84a1a40edb24348a83044c97935b974bd8bafda9cd558e92d3eb69e22c5ccf55483b80f839e24f0eb57ae2df6fe3 rootfs-etc-skel-.profile
|
||||||
|
6b9c7bb73213187eb9ca8a94109b2b816f50c1158c90fec2e92b373864280d67741589e5bfbab8810945f031d2f4b535aad78a72e46e52ea50be5b85324da381 rootfs-etc-sleep-inhibitor.conf
|
||||||
d1ddd43489e6016e3ffd716027ed2bae4a2ab5f213118bdbcb96750e267ab7c0367cd0e0e386300aa5550352653144f5caeddd790621fe0879f83ca1995bb65c rootfs-etc-tinydm.d-env-wayland.d-50-firefox-wayland.sh
|
d1ddd43489e6016e3ffd716027ed2bae4a2ab5f213118bdbcb96750e267ab7c0367cd0e0e386300aa5550352653144f5caeddd790621fe0879f83ca1995bb65c rootfs-etc-tinydm.d-env-wayland.d-50-firefox-wayland.sh
|
||||||
"
|
"
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
[main]
|
||||||
|
# Don't mess with the hostname, just let the system use the one from
|
||||||
|
# /etc/hostname (pmaports#768).
|
||||||
|
hostname-mode=none
|
Loading…
Reference in a new issue