From 71f53a24be086f76230c63036b69b2b586450f89 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Sun, 18 Jan 2015 12:20:56 +0100 Subject: [PATCH] ocserv: don't print needless warnings Signed-off-by: Nikos Mavrogiannopoulos --- net/ocserv/files/ocserv.init | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/ocserv/files/ocserv.init b/net/ocserv/files/ocserv.init index 15dbb6868..b07b62ad5 100644 --- a/net/ocserv/files/ocserv.init +++ b/net/ocserv/files/ocserv.init @@ -31,7 +31,7 @@ setup_config() { test $auth = "plain" && authsuffix="\[/var/etc/ocpasswd\]" dyndns="false" - hostname=`uci show ddns|grep domain|head -1|cut -d '=' -f 2` + hostname=`uci show ddns|grep domain|head -1|cut -d '=' -f 2 2>/dev/null` [ -n "$hostname" ] && dyndns="true" mkdir -p /var/etc @@ -91,8 +91,8 @@ setup_dns() { start() { local hostname iface - hostname=`uci show ddns|grep domain|head -1|cut -d '=' -f 2` - [ -z "$hostname" ] && hostname=`uci get system.@system[0].hostname` + hostname=`uci show ddns|grep domain|head -1|cut -d '=' -f 2 2>/dev/null` + [ -z "$hostname" ] && hostname=`uci get system.@system[0].hostname 2>/dev/null` [ -d /etc/config/ocserv-dir ] || mkdir -p /etc/config/ocserv-dir [ -f /etc/ocserv/ca-key.pem ] && mv /etc/ocserv/ca-key.pem /etc/config/ocserv-dir/ca-key.pem