Re: ksvalidator - can't detect errors?
|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
Matt Rose <mrose@xxxxxxxxxx> wrote: >On Wed, 17 Aug 2011, whitivery wrote: > >> Sometimes ksvalidator will complain but not return an error, for >> instance: >> >> # ksvalidator -v RHEL5 /tmp/tmp.57yMAuel5v >> The following problem occurred on line 2 of the kickstart file: >> Unknown command: somesetting1 >> # echo $? >> 0 >> >> I want to be able to detect such problems. But when I try to >> redirect or pipe the output of ksvalidator, it produces no >> output. >> >> How can I detect such problems within a shell script? > >The error might be printed on stderr, which you would have to catch >specifically, most likely by redirecting the output to stdout, and >catching stdout. If this is the case, something like this might work. > >output=$(ksvalidator -v RHEL5 /tmp/tmp.57yMAuel5v 2>&1) > >In general, with shell scripts, if you see output in interactive mode, but >not when you run it and capture the output in a script, this is the case. > >Matt I was redirecting both stderr and stdout as you show - ksvalidator must be detecting this and for some reason doesn't put out anything. _______________________________________________ Kickstart-list mailing list Kickstart-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/kickstart-list
[Home] [Fedora Users] [Fedora Legacy] [Fedora Maintainers] [Fedora Desktop] [Fedora SELinux] [Big List of Linux Books] [Yosemite News] [Yosemite Photos] [KDE Users] [Fedora Tools]