Merge "simple-init: allow for NetworkManager support"
This commit is contained in:
commit
8d3fa3a85c
@ -58,3 +58,13 @@ Then set your DIB env vars like this before running DIB::
|
|||||||
DIB_INSTALLTYPE_simple_init=repo
|
DIB_INSTALLTYPE_simple_init=repo
|
||||||
DIB_REPOLOCATION_glean=/tmp/glean
|
DIB_REPOLOCATION_glean=/tmp/glean
|
||||||
DIB_REPOREF_glean=my-test-ref
|
DIB_REPOREF_glean=my-test-ref
|
||||||
|
|
||||||
|
NetworkManager
|
||||||
|
--------------
|
||||||
|
|
||||||
|
By default, this uses the "legacy" scripts on each platform. To use
|
||||||
|
NetworkManager instead, set ``DIB_SIMPLE_INIT_NETWORKMANAGER`` to
|
||||||
|
non-zero. See the glean documentation for what the implications for
|
||||||
|
this are on each platform.
|
||||||
|
|
||||||
|
This is currently only implemented for CentOS and Fedora platforms.
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
export DIB_SIMPLE_INIT_NETWORKMANAGER=${DIB_SIMPLE_INIT_NETWORKMANAGER:-0}
|
@ -24,4 +24,9 @@ SCRIPTDIR=$(dirname $0)
|
|||||||
# Ensure the 8021q module is loaded so that glean can support tagged interfaces
|
# Ensure the 8021q module is loaded so that glean can support tagged interfaces
|
||||||
echo "8021q" >> /etc/modules
|
echo "8021q" >> /etc/modules
|
||||||
|
|
||||||
glean-install
|
enable_nm=""
|
||||||
|
if [[ ${DIB_SIMPLE_INIT_NETWORKMANAGER} != 0 ]]; then
|
||||||
|
enable_nm="--use-nm"
|
||||||
|
fi
|
||||||
|
|
||||||
|
glean-install ${enable_nm}
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
dhcp-client:
|
dhcp-client:
|
||||||
net-tools:
|
net-tools:
|
||||||
ifupdown:
|
ifupdown:
|
||||||
|
network-scripts:
|
||||||
|
when: DIB_SIMPLE_INIT_NETWORKMANAGER = 0
|
||||||
|
NetworkManager:
|
||||||
|
when: DIB_SIMPLE_INIT_NETWORKMANAGER != 0
|
||||||
|
@ -5,7 +5,8 @@
|
|||||||
},
|
},
|
||||||
"debian": {
|
"debian": {
|
||||||
"dhcp-client": "isc-dhcp-client",
|
"dhcp-client": "isc-dhcp-client",
|
||||||
"ifupdown": "ifupdown"
|
"ifupdown": "ifupdown",
|
||||||
|
"NetworkManager": "network-manager"
|
||||||
},
|
},
|
||||||
"gentoo": {
|
"gentoo": {
|
||||||
"dhcp-client": "net-misc/dhcp",
|
"dhcp-client": "net-misc/dhcp",
|
||||||
@ -16,8 +17,16 @@
|
|||||||
"dhcp-client": "dhcp-client"
|
"dhcp-client": "dhcp-client"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"release": {
|
||||||
|
"fedora": {
|
||||||
|
"29": {
|
||||||
|
"network-scripts": "network-scripts"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"dhcp-client": "isc-dhcp-client",
|
"dhcp-client": "isc-dhcp-client",
|
||||||
"ifupdown": ""
|
"ifupdown": "",
|
||||||
|
"network-scripts": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,9 +13,11 @@ case "$DIB_INIT_SYSTEM" in
|
|||||||
;;
|
;;
|
||||||
systemd)
|
systemd)
|
||||||
if [[ ${DISTRO_NAME} =~ (centos|rhel7|fedora) ]]; then
|
if [[ ${DISTRO_NAME} =~ (centos|rhel7|fedora) ]]; then
|
||||||
# NOTE(pabelanger): Glean requires network.service for
|
if [[ ${DIB_SIMPLE_INIT_NETWORKMANAGER} != 1 ]]; then
|
||||||
# these platforms.
|
# NOTE(pabelanger): Glean requires network.service for
|
||||||
systemctl enable network.service
|
# these platforms when not using networkmanager
|
||||||
|
systemctl enable network.service
|
||||||
|
fi
|
||||||
elif [[ ${DISTRO_NAME} =~ (opensuse) ]]; then
|
elif [[ ${DISTRO_NAME} =~ (opensuse) ]]; then
|
||||||
# on suse, this is named wicked.service, but it's the same
|
# on suse, this is named wicked.service, but it's the same
|
||||||
# as network.service.
|
# as network.service.
|
||||||
|
5
releasenotes/notes/simple-init-nm-f0896124dee92a03.yaml
Normal file
5
releasenotes/notes/simple-init-nm-f0896124dee92a03.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The `simple-init` element can now use NetworkManager instead of
|
||||||
|
legacy scripts on Red Hat platforms.
|
Loading…
Reference in New Issue
Block a user