Jeff Gehlbach wrote:
> On Mar 28, 2008, at 6:15 AM, Phil Stringer wrote:
>> I've just installed 1.5.90 on Solaris and have had problems with a
>> syntax error in the
>> bin/opennms startup script. Probably because /bin/sh is not bash in
>> Solaris.
>
> Good catch, thanks! Would you mind trying this new version of
> checkXmlFiles() for me?
>
> checkXmlFiles(){
> XMLLINT=`which xmllint 2>/dev/null || :`
> FAILED_XML=0
>
> if [ -n "$XMLLINT" ] && [ -x "$XMLLINT" ]; then
> for FILE in `find "$OPENNMS_HOME/etc" -type f -name
> \*.xml`; do
> $XMLLINT "$FILE" >/dev/null 2>&1
> if [ $? != 0 ]; then
> echo "ERROR: XML validation failed:
> $FILE"
> FAILED_XML=`expr $FAILED_XML + 1 2>/
> dev/null || echo 1`
> fi
> done
> fi
>
> if [ $FAILED_XML -gt 0 ]; then
> echo "$FAILED_XML XML file(s) failed validation.
> Exiting."
> exit $FAILED_XML
> fi
> return 0
> }
>
> Thanks,
> -jeff
>
Yes that works fine on Solaris.
thanks,
phil
--
Phil Stringer, Infrastructure & Operations, Phone +44 161 275 6057
IT Services Division, email Phil.Stringer@...
The University of Manchester UK Genealogy - http://www.genuki.org.uk/
|