summaryrefslogtreecommitdiffstats
path: root/source/n/network-scripts/0003-76218fa6e7c097c875af2a29cc7670995bef2ae4.patch
blob: 7be077718b99ca10e3b7ed3dab4015ae763058b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 76218fa6e7c097c875af2a29cc7670995bef2ae4 Mon Sep 17 00:00:00 2001
From: Darren 'Tadgy' Austin <darren@afterdark.org.uk>
Date: Wed, 21 Jun 2023 14:36:55 +0100
Subject: Re-add support for the DHCP_IPADDR parameter from rc.inet1.conf.

During the last major updates, somehow the DHCP_IPADDR option
got missed while I re-implemented the options handling.
This commit re-adds the support for that option.

Note that this commit changes the previously used '-s' dhcpcd
option with the '-r' option as this seems more appropriate.
---
 rc.inet1 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rc.inet1 b/rc.inet1
index dc853fb..f998a21 100644
--- a/rc.inet1
+++ b/rc.inet1
@@ -398,6 +398,7 @@ if_up() {
         [ "${DHCP_KEEPRESOLV[$i]}" = "yes" ] && DHCP_OPTIONS+=("-C" "resolv.conf")
         [ "${DHCP_KEEPNTP[$i]}" = "yes" ] && DHCP_OPTIONS+=("-C" "ntp.conf")
         [ "${DHCP_KEEPGW[$i]}" = "yes" ] && DHCP_OPTIONS+=("-G")
+        [ -n "${DHCP_IPADDR[$i]}" ] && DHCP_OPTIONS+=("-r" "${DHCP_IPADDR[$i]}")
         [ "${DHCP_DEBUG[$i]}" = "yes" ] && DHCP_OPTIONS+=("-d")
         # The -L option used to be hard coded into the dhcpcd command line in -current.  It was added to assist ARM users
         # get networking up and running.  Previous versions of Slackware did not have -L hard coded - the code here keeps
-- 
cgit v1.2.3