ldapscripts 2.0.1 awk errors in runtime.debian
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ldapscripts (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I had ldap setup and ldapscripts working in 10.04LTS. After upgrading to 12.04LTS, ldapscripts (all commands) bork out with these errors:
sudo ldapaddgroup testgroup
awk: cmd. line:1: /^[ \t]*host/ sub(/^[ \t]*host[ \t]*/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*host/ ""); sub(/[ \t]*(#.*)?$/
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: cmd. line:1: /^[ \t]*host/ ""); sub(/[ \t]*(#.*)?$/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*host/ ""); print $0
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: /^[ \t]*host/ ""); print $0
awk: ^ syntax error
awk: cmd. line:1: /^[ \t]*uri/ sub(/^[ \t]*uri[ \t]*/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*uri/ ""); sub(/[ \t]*(#.*)?$/
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: cmd. line:1: /^[ \t]*uri/ ""); sub(/[ \t]*(#.*)?$/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*uri/ ""); print $0
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: /^[ \t]*uri/ ""); print $0
awk: ^ syntax error
awk: cmd. line:1: /^[ \t]*rootbinddn/ sub(/^[ \t]*rootbinddn[ \t]*/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*rootbinddn/ ""); sub(/[ \t]*(#.*)?$/
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: cmd. line:1: /^[ \t]*rootbinddn/ ""); sub(/[ \t]*(#.*)?$/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*rootbinddn/ ""); print $0
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: /^[ \t]*rootbinddn/ ""); print $0
awk: ^ syntax error
awk: cmd. line:1: /^[ \t]*base/ sub(/^[ \t]*base[ \t]*/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*base/ ""); sub(/[ \t]*(#.*)?$/
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: cmd. line:1: /^[ \t]*base/ ""); sub(/[ \t]*(#.*)?$/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*base/ ""); print $0
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: /^[ \t]*base/ ""); print $0
awk: ^ syntax error
awk: cmd. line:1: /^[ \t]*nss_base_group/ sub(/^[ \t]*nss_base_group[ \t]*/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*nss_base_group/ ""); sub(/[ \t]*(#.*)?$/
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: cmd. line:1: /^[ \t]*nss_base_group/ ""); sub(/[ \t]*(#.*)?$/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*nss_base_group/ ""); print $0
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: /^[ \t]*nss_base_group/ ""); print $0
awk: ^ syntax error
awk: cmd. line:1: /^[ \t]*nss_
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*nss_
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: cmd. line:1: /^[ \t]*nss_
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*nss_
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: /^[ \t]*nss_
awk: ^ syntax error
awk: cmd. line:1: /^[ \t]*nss_base_hosts/ sub(/^[ \t]*nss_base_hosts[ \t]*/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*nss_base_hosts/ ""); sub(/[ \t]*(#.*)?$/
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: cmd. line:1: /^[ \t]*nss_base_hosts/ ""); sub(/[ \t]*(#.*)?$/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*nss_base_hosts/ ""); print $0
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: /^[ \t]*nss_base_hosts/ ""); print $0
awk: ^ syntax error
Error adding group testgroup to LDAP
After that I purged ldapscripts, reinstalled/
I also removed gawk package (falled back to mawk package), and errors changed verbosity but did not clear up.
I found a fix - edit file /usr/share/ ldapscripts/ runtime. debian
find line:
local value="$(awk "/^[ \t]*$field/ {sub(/^[ \t]*$field[ \t]*/,\"\"); sub(/[ \t]*(#.*)?\$/, \"\"); print \$0}" "$conffile")"
and replace with:
local value=$(awk "/^[ \t]*$field/ {sub(/^[ \t]*$field[ \t]*/,\"\"); sub(/[ \t]*(#.*)?\$/, \"\"); print \$0}" "$conffile")
(remove quotes around "$(...)")