dnsmasq: clean up white space in dnsmasq.init

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
lede-17.01
Eric Luehrsen 2016-12-22 13:24:12 -05:00 committed by Hans Dedecker
parent 1fef80f29c
commit 06e26363d8
1 changed files with 13 additions and 13 deletions

View File

@ -23,22 +23,22 @@ xappend() {
}
hex_to_hostid() {
local var="$1"
local hex="${2#0x}" # strip optional "0x" prefix
local var="$1"
local hex="${2#0x}" # strip optional "0x" prefix
if [ -n "${hex//[0-9a-fA-F]/}" ]; then
# is invalid hex literal
return 1
fi
if [ -n "${hex//[0-9a-fA-F]/}" ]; then
# is invalid hex literal
return 1
fi
# convert into host id
export "$var=$(
printf "%0x:%0x" \
$(((0x$hex >> 16) % 65536)) \
$(( 0x$hex % 65536))
)"
# convert into host id
export "$var=$(
printf "%0x:%0x" \
$(((0x$hex >> 16) % 65536)) \
$(( 0x$hex % 65536))
)"
return 0
return 0
}
dhcp_calc() {