aboutsummaryrefslogtreecommitdiff
path: root/net/unbound/files
diff options
context:
space:
mode:
authorPeter Wagner <tripolar@gmx.at>2018-05-01 13:56:26 +0200
committerPeter Wagner <tripolar@gmx.at>2018-05-01 14:05:30 +0200
commit14bc5b015a406943ad0b5cb678d9772419d1b780 (patch)
treed2c36e91208c0e11efef926f979e1d4d46518ee0 /net/unbound/files
parent3c7d2ae182e4e7c8ae782c850c9b63d70c79ca14 (diff)
unbound: don't use unitialised vars when UNBOUND_D_DHCP_LINK != odhcpd
Signed-off-by: Peter Wagner <tripolar@gmx.at>
Diffstat (limited to 'net/unbound/files')
-rw-r--r--net/unbound/files/unbound.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/net/unbound/files/unbound.sh b/net/unbound/files/unbound.sh
index 4b472ec34..002ce9fa4 100644
--- a/net/unbound/files/unbound.sh
+++ b/net/unbound/files/unbound.sh
@@ -408,16 +408,18 @@ bundle_private_interface() {
##############################################################################
unbound_mkdir() {
- local dhcp_origin=$( uci_get dhcp.@odhcpd[0].leasefile )
- local dhcp_dir=$( dirname $dhcp_origin )
local filestuff
+ if [ "$UNBOUND_D_DHCP_LINK" = "odhcpd" ] ; then
+ local dhcp_origin=$( uci_get dhcp.@odhcpd[0].leasefile )
+ local dhcp_dir=$( dirname $dhcp_origin )
- if [ "$UNBOUND_D_DHCP_LINK" = "odhcpd" -a ! -d "$dhcp_dir" ] ; then
- # make sure odhcpd has a directory to write (not done itself, yet)
- mkdir -p "$dhcp_dir"
- fi
+ if [ ! -d "$dhcp_dir" ] ; then
+ # make sure odhcpd has a directory to write (not done itself, yet)
+ mkdir -p "$dhcp_dir"
+ fi
+ fi
if [ -f $UNBOUND_KEYFILE ] ; then
filestuff=$( cat $UNBOUND_KEYFILE )