Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mkimage-profiles
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
mkimage-profiles
Commits
a0068021
Commit
a0068021
authored
Dec 04, 2021
by
Konstantin A. Lepikhov
Committed by
Anton Midyukov
Dec 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use/net-eth: add dhcp ipv4 only support for networkd
parent
7d631a48
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
config.mk
features.in/net-eth/config.mk
+3
-0
50-net-eth
features.in/net-eth/rootfs/image-scripts.d/50-net-eth
+17
-2
No files found.
features.in/net-eth/config.mk
View file @
a0068021
...
@@ -25,4 +25,7 @@ use/net-eth/dhcp/timeout/%: use/net-eth/dhcp
...
@@ -25,4 +25,7 @@ use/net-eth/dhcp/timeout/%: use/net-eth/dhcp
use/net-eth/networkd-dhcp: use/net-eth/networkd
use/net-eth/networkd-dhcp: use/net-eth/networkd
@$(call add,NET_ETH,eth0:dhcp)
@$(call add,NET_ETH,eth0:dhcp)
use/net-eth/networkd-dhcp4: use/net-eth/networkd
@$(call add,NET_ETH,eth0:dhcp4)
# use e.g. eth0:static:10.0.0.2/24:10.0.0.1 for predefined static configuration
# use e.g. eth0:static:10.0.0.2/24:10.0.0.1 for predefined static configuration
features.in/net-eth/rootfs/image-scripts.d/50-net-eth
View file @
a0068021
...
@@ -22,7 +22,7 @@ SYSTEMD_IFDIR="/etc/systemd/network"
...
@@ -22,7 +22,7 @@ SYSTEMD_IFDIR="/etc/systemd/network"
write_iface
()
{
write_iface
()
{
case
"
$proto
"
in
case
"
$proto
"
in
dhcp
)
dhcp
*
)
;;
;;
static
)
static
)
[
-n
"
$ipv4addr
"
]
||
fatal
"ipv4addr missing"
[
-n
"
$ipv4addr
"
]
||
fatal
"ipv4addr missing"
...
@@ -41,7 +41,7 @@ write_etcnet_iface() {
...
@@ -41,7 +41,7 @@ write_etcnet_iface() {
mkdir
-p
"
$dir
"
mkdir
-p
"
$dir
"
append
=
append
=
case
"
$proto
"
in
case
"
$proto
"
in
dhcp
)
dhcp
*
)
append
=
"DHCP_TIMEOUT=
$GLOBAL_NET_ETH_TIMEOUT
"
append
=
"DHCP_TIMEOUT=
$GLOBAL_NET_ETH_TIMEOUT
"
;;
;;
static
)
static
)
...
@@ -62,6 +62,21 @@ write_etcnet_iface() {
...
@@ -62,6 +62,21 @@ write_etcnet_iface() {
write_systemd_iface
()
{
write_systemd_iface
()
{
case
"
$proto
"
in
case
"
$proto
"
in
dhcp4
)
echo
"[Match]"
echo
"Name=
$iface
"
echo
echo
"[Network]"
echo
"DHCP=ipv4"
echo
"IPv6AcceptRA=no"
echo
"LinkLocalAddressing=ipv4"
echo
echo
"[DHCP]"
echo
"UseMTU=yes"
echo
"UseDomains=yes"
echo
"UseNTP=yes"
echo
;;
dhcp
)
dhcp
)
echo
"[Match]"
echo
"[Match]"
echo
"Name=
$iface
"
echo
"Name=
$iface
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment