Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coreos-teardown-initramfs: propagate NM configs in /etc #808

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,15 @@ propagate_initramfs_networking() {
echo "info: will not attempt to propagate initramfs networking"
else
echo "info: no networking config is defined in the real root"
if [ -n "$(ls -A /run/NetworkManager/system-connections/)" ]; then
if [ -n "$(ls -A /etc/NetworkManager/system-connections/)" ]; then
echo "info: propagating /etc initramfs networking config to the real root"
cp -v /etc/NetworkManager/system-connections/* /sysroot/etc/NetworkManager/system-connections/
selinux_relabel /etc/NetworkManager/system-connections/
elif [ -n "$(ls -A /run/NetworkManager/system-connections/)" ]; then
if are_default_NM_configs; then
echo "info: skipping propagation of default networking configs"
else
echo "info: propagating initramfs networking config to the real root"
echo "info: propagating /run initramfs networking config to the real root"
cp -v /run/NetworkManager/system-connections/* /sysroot/etc/NetworkManager/system-connections/
selinux_relabel /etc/NetworkManager/system-connections/
fi
Expand Down