From 01851966b8de69309fa2df53159c319fb8db505f Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Fri, 22 May 2015 21:56:00 +0200 Subject: [PATCH] ocserv: silence warnings and set group default value Signed-off-by: Nikos Mavrogiannopoulos --- net/ocserv/files/ocserv.init | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/net/ocserv/files/ocserv.init b/net/ocserv/files/ocserv.init index fe0718b3b8..d4d014dd8a 100644 --- a/net/ocserv/files/ocserv.init +++ b/net/ocserv/files/ocserv.init @@ -37,7 +37,7 @@ setup_config() { test $auth = "plain" && authsuffix="\[passwd=/var/etc/ocpasswd\]" dyndns="false" - hostname=`uci show ddns|grep domain|head -1|cut -d '=' -f 2 2>/dev/null` + hostname=`uci show ddns 2>/dev/null|grep domain|head -1|cut -d '=' -f 2` [ -n "$hostname" ] && dyndns="true" mkdir -p /var/etc @@ -67,10 +67,9 @@ setup_users() { local password config_get name $1 name - config_get group $1 group + config_get group $1 group '*' config_get password $1 password - [ -z "$group" ] && group='*' [ -z "$name" -o -z "$password" ] && return echo "$name:$group:$password" >> /var/etc/ocpasswd @@ -100,7 +99,7 @@ setup_dns() { start() { local hostname iface - hostname=`uci show ddns|grep domain|head -1|cut -d '=' -f 2 2>/dev/null` + hostname=`uci show ddns 2>/dev/null|grep domain|head -1|cut -d '=' -f 2` [ -z "$hostname" ] && hostname=`uci get system.@system[0].hostname 2>/dev/null` [ -f /etc/config/ocserv-dir/ca-key.pem ] && mv /etc/config/ocserv-dir/ca-key.pem /etc/ocserv/ca-key.pem -- 2.30.2