Skip to content

Commit 72456b3

Browse files
committed
CLASS SYSTEMD_NETWORKD
* Add systemd-networkd class and a default dhcp-fallback configuration to catch any unconfigured network interfaces which might likely be the case.
1 parent 8ec7758 commit 72456b3

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# We will match any ethernet adapter that is left unconfigured.
2+
[Match]
3+
Type=ether
4+
5+
[Network]
6+
DHCP=yes
7+
8+
[DHCPv4]
9+
# In our DHCP we trust
10+
UseDomains=true
11+
# Don't use duid
12+
ClientIdentifier=mac
13+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
# Filename: ${GRML_FAI_CONFIG}/scripts/GRMLBASE/00-networkd-dhcp-fallback
3+
# Purpose: configure systemd-networkd for the live-system
4+
# Authors: (c) Christopher Bock <[email protected]>
5+
# Bug-Reports: see http://grml.org/bugs/
6+
# License: This file is licensed under the GPL v2 or any later version.
7+
################################################################################
8+
9+
set -u
10+
set -e
11+
12+
fcopy -M -v /etc/systemd/network/99-dhcp-fallback.network
13+
14+
## END OF FILE #################################################################
15+
# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
# Filename: ${GRML_FAI_CONFIG}/scripts/SYSTEMD_NETWORKD/05-enable-networkd
3+
# Purpose: configure systemd-networkd for the live-system
4+
# Authors: (c) Christopher Bock <[email protected]>
5+
6+
# Bug-Reports: see http://grml.org/bugs/
7+
# License: This file is licensed under the GPL v2 or any later version.
8+
################################################################################
9+
10+
set -u
11+
set -e
12+
13+
# FAI sets $target, but shellcheck does not know that.
14+
target=${target:?}
15+
16+
# shellcheck source=/dev/null
17+
. "$GRML_LIVE_CONFIG"
18+
19+
systemd_setup() {
20+
fcopy -M -i -B -v -r /etc/systemd
21+
22+
$ROOTCMD systemctl enable systemd-networkd
23+
24+
}
25+
26+
systemd_setup
27+
28+
## END OF FILE #################################################################
29+
# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2

0 commit comments

Comments
 (0)