From: Nikos Mavrogiannopoulos Date: Sun, 24 May 2015 14:40:51 +0000 (+0200) Subject: luci-app-ocserv: list users with no group X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=1c57ea5d2299c7af7a199eeb63863a5417806781;ds=sidebyside luci-app-ocserv: list users with no group This was marked as "(none)" which was not caught by the regex. Signed-off-by: Nikos Mavrogiannopoulos --- diff --git a/applications/luci-app-ocserv/luasrc/controller/ocserv.lua b/applications/luci-app-ocserv/luasrc/controller/ocserv.lua index 91bddc73d..dbeaaf852 100644 --- a/applications/luci-app-ocserv/luasrc/controller/ocserv.lua +++ b/applications/luci-app-ocserv/luasrc/controller/ocserv.lua @@ -44,7 +44,7 @@ function ocserv_status() if not ln then break end local id, user, group, vpn_ip, ip, device, time, cipher, status = - ln:match("^%s*(%d+)%s+([-_%w]+)%s+([%.%*-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%(%)%:%.-_%w]+)%s+([%:%.-_%w]+).*") + ln:match("^%s*(%d+)%s+([-_%w]+)%s+([%(%)%.%*-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%(%)%:%.-_%w]+)%s+([%:%.-_%w]+).*") if id then fwd[#fwd+1] = { id = id, diff --git a/applications/luci-app-ocserv/luasrc/model/cbi/ocserv/users.lua b/applications/luci-app-ocserv/luasrc/model/cbi/ocserv/users.lua index c4be1818f..0fa997c8b 100644 --- a/applications/luci-app-ocserv/luasrc/model/cbi/ocserv/users.lua +++ b/applications/luci-app-ocserv/luasrc/model/cbi/ocserv/users.lua @@ -47,7 +47,7 @@ if fd then local ln if not ln then break end local id, user, group, vpn_ip, ip, device, time, cipher, status = - ln:match("^%s*(%d+)%s+([-_%w]+)%s+([%.%*-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%(%)%:%.-_%w]+)%s+([%:%.-_%w]+).*") + ln:match("^%s*(%d+)%s+([-_%w]+)%s+([%(%)%.%*-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%(%)%:%.-_%w]+)%s+([%:%.-_%w]+).*") if id then table.insert(lusers, {id, user, group, vpn_ip, ip, device, time, cipher, status}) end