diff options
author | Philip Prindeville <philipp@redfish-solutions.com> | 2022-03-15 12:39:16 -0600 |
---|---|---|
committer | Philip Prindeville <philipp@redfish-solutions.com> | 2022-03-15 12:55:21 -0600 |
commit | aa490f0279ae3ecb50b71ff7354210c228b8fc57 (patch) | |
tree | 7043b1bdd13d0c930e1c5be9d5ee4d9df37cf33d /net/isc-dhcp | |
parent | f951f610050a5013df7f11b71797bbbfb2ec637f (diff) |
isc-dhcp: don't leak mktemp files
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Diffstat (limited to 'net/isc-dhcp')
-rw-r--r-- | net/isc-dhcp/Makefile | 2 | ||||
-rwxr-xr-x | net/isc-dhcp/files/dhcpd.init | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/net/isc-dhcp/Makefile b/net/isc-dhcp/Makefile index d89b4ca2e..101f58192 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.1 -PKG_RELEASE:=19 +PKG_RELEASE:=20 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 ab25b3258..4309d5af5 100755 --- a/net/isc-dhcp/files/dhcpd.init +++ b/net/isc-dhcp/files/dhcpd.init @@ -16,8 +16,6 @@ conf_local_file=$dyndir/named.conf.local session_key_name=local-ddns session_key_file=/var/run/named/session.key -dyn_file=$(mktemp -u /tmp/dhcpd.XXXXXX) - time2seconds() { local timestring=$1 local multiplier number suffix @@ -548,6 +546,8 @@ start_service() { else . /lib/functions/network.sh + local dyn_file=$(mktemp -u /tmp/dhcpd.XXXXXX) + config_load dhcp local rfc1918_nets="" @@ -584,10 +584,10 @@ EOF if [ $dynamicdns -eq 1 ]; then nsupdate -l -v $dyn_file - - rm -f $dyn_file fi + rm -f $dyn_file + [ -z "$dhcp_ifs" ] && return 0 fi |