On Tue, 2014-08-19 at 14:15 +0000, Michele Hardy wrote:
> After upgrading from 1.4.0 to 1.4.2 on servers running SunOS 10.5, introduces 
> awk syntax error issues, e.g.:
> 
> # rkhunter --propupd
> awk: syntax error near line 1
> awk: bailing out near line 1
> awk: syntax error near line 1
> awk: bailing out near line 1
> [ Rootkit Hunter version 1.4.2 ]
> ^C
> #
> 
> This has occurred on multiple servers. To remedy this, I modified line number 
> 750  of /usr/local/bin/rkhunter from:
> 
> OPTVAR=`echo "${OPTVAR}" | awk -v l=\`echo ${RKHLINES}\` '/./ { if (a) { a = 
> a "\n" $0 } else a = $0 }; /^$/ { a = "" }; NR == l { print a }'`
> 
> to
> 
> OPTVAR=`echo "${OPTVAR}" | /usr/xpg4/bin/awk -v l=\`echo ${RKHLINES}\` '/./ { 
> if (a) { a = a "\n" $0 } else a = $0 }; /^$/ { a = "" }; NR == l { print a }'`
> 
> 
Sorry, that's a bug.

For Solaris the code looks for the 'gawk' command, and if not found then
for 'nawk', and if not found then the xpg4 'awk' command. Unfortunately
which command was found is not used in all places though.



John.

-- 
John Horne                   Tel: +44 (0)1752 587287
Plymouth University, UK


------------------------------------------------------------------------------
_______________________________________________
Rkhunter-users mailing list
Rkhunter-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkhunter-users

Reply via email to