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

Harden network management and configuration #170

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions lib/armbian-configng/config.ng.functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ function set_runtime_variables() {
fi

# Determine which network renderer is in use for NetPlan
if systemctl is-active systemd-networkd 1> /dev/null; then
renderer=networkd
if systemctl is-active NetworkManager 1> /dev/null; then
NETWORK_RENDERER=NetworkManager
else
renderer=NetworkManager
NETWORK_RENDERER=networkd
fi

DIALOG_CANCEL=1
Expand Down
21 changes: 4 additions & 17 deletions lib/armbian-configng/config.ng.jobs.json
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@
"sub": [
{
"id": "N02",
"description": "Add interface",
"description": "Add / change interface",
"command": [
"network_config armbian"
],
Expand All @@ -419,17 +419,17 @@
},
{
"id": "N03",
"description": "Revert to defaults",
"description": "Revert to Armbian defaults",
"command": [
"default_network_config"
],
"status": "Preview",
"author": "Igor Pecovnik",
"condition": "[[ -f /etc/netplan/armbian.yaml ]] && ! cat /etc/netplan/armbian.yaml | diff -q 1>/dev/null <(netplan get all) - || [[ ! -f /etc/netplan/10-dhcp-all-interfaces.yaml ]] && ! cat /etc/netplan/10-dhcp-all-interfaces.yaml 2>/dev/null | diff -q 1>/dev/null <(netplan get all) -"
"condition": ""
},
{
"id": "N04",
"description": "Show draft configuration",
"description": "Show configuration",
"command": [
"show_message <<< \"$(netplan get all)\""
],
Expand All @@ -439,19 +439,6 @@
"author": "Igor Pecovnik",
"condition": "[[ -f /etc/netplan/armbian.yaml ]]"
},
{
"id": "N05",
"description": "Apply changes",
"prompt": "This will apply new network configuration\n\nwould you like to continue?",
"command": [
"netplan apply"
],
"status": "Preview",
"doc_link": "",
"src_reference": "",
"author": "Igor Pecovnik",
"condition": "[[ -f /etc/netplan/armbian.yaml ]] && ! cat /etc/netplan/armbian.yaml | diff -q 1>/dev/null <(netplan get all) - || [[ -f /etc/netplan/10-dhcp-all-interfaces.yaml ]]"
},
{
"id": "N06",
"description": "Show active status",
Expand Down
Loading
Loading