aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Prindeville <philipp@redfish-solutions.com>2023-09-23 17:09:30 -0600
committerPhilip Prindeville <philipp@redfish-solutions.com>2023-10-15 22:17:51 -0600
commit96e720bb6b3944b0a0c551eff16d50ab6f884cc9 (patch)
treedb029ed6efb6199a3fef83643eae4f996e1bf682
parenta6d6475cd58317b2bb6135b1d821befa639eafd4 (diff)
isc-dhcp: Use 'append' instead of manually appending
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
-rw-r--r--net/isc-dhcp/Makefile2
-rwxr-xr-xnet/isc-dhcp/files/dhcpd.init18
2 files changed, 10 insertions, 10 deletions
diff --git a/net/isc-dhcp/Makefile b/net/isc-dhcp/Makefile
index d7c4a1566..81fd97681 100644
--- a/net/isc-dhcp/Makefile
+++ b/net/isc-dhcp/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=isc-dhcp
UPSTREAM_NAME:=dhcp
PKG_VERSION:=4.4.3-P1
-PKG_RELEASE:=6
+PKG_RELEASE:=7
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
diff --git a/net/isc-dhcp/files/dhcpd.init b/net/isc-dhcp/files/dhcpd.init
index 111201009..498cf7882 100755
--- a/net/isc-dhcp/files/dhcpd.init
+++ b/net/isc-dhcp/files/dhcpd.init
@@ -151,7 +151,7 @@ append_routes() {
octets=$((($prefix + 7) / 8))
compacted="$(echo "$network" | cut -d. -f1-$octets)"
- routes="$routes${routes:+, }$(explode "$prefix${compacted:+.$compacted}.$router")"
+ append routes "$(explode "$prefix${compacted:+.$compacted}.$router")" ", "
}
append_dhcp_options() {
@@ -174,7 +174,7 @@ append_dhcp_options() {
value="\"$value\""
;;
esac
- formatted="$formatted${formatted:+, }$value"
+ append formatted "$value" ", "
done
echo " option $tag $formatted;"
}
@@ -294,17 +294,17 @@ static_host_add() {
for option in $force_send; do
case "$option" in
hostname)
- extra_options="$extra_options${extra_options:+,}0c" ;;
+ append extra_options "0c" "," ;;
domain-name)
- extra_options="$extra_options${extra_options:+,}0f" ;;
+ append extra_options "0f" "," ;;
renewal-time)
- extra_options="$extra_options${extra_options:+,}3a" ;;
+ append extra_options "3a" "," ;;
rebinding-time)
- extra_options="$extra_options${extra_options:+,}3b" ;;
+ append extra_options "3b" "," ;;
fqdn)
- extra_options="$extra_options${extra_options:+,}51" ;;
+ append extra_options "51" "," ;;
routes)
- extra_options="$extra_options${extra_options:+,}79" ;;
+ append extra_options "79" "," ;;
*)
echo "unknown option: $option" >&2 ;;
esac
@@ -435,7 +435,7 @@ dhcpd_add() {
local octets="$(rfc1918_prefix "$subnet")"
- [ -n "$octets" ] && rfc1918_nets="$rfc1918_nets${rfc1918_nets:+ }$octets"
+ [ -n "$octets" ] && append rfc1918_nets "$octets"
[ $synthesize -eq 0 ] && return