* [PATCH] fixfiles: fix test for $LOGFILE
@ 2006-08-12 14:09 James Morris
2006-08-12 14:22 ` Joshua Brindle
0 siblings, 1 reply; 2+ messages in thread
From: James Morris @ 2006-08-12 14:09 UTC (permalink / raw)
To: selinux
Please apply.
---
--- fixfiles.orig 2006-08-12 00:52:22.000000000 -0400
+++ fixfiles 2006-08-12 10:07:30.000000000 -0400
@@ -48,7 +48,7 @@
# Log to either syslog or a LOGFILE
#
logit () {
-if [ -z $LOGFILE ]; then
+if [ ! -z $LOGFILE ]; then
echo $1 >> $LOGFILE
fi
}
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fixfiles: fix test for $LOGFILE
2006-08-12 14:09 [PATCH] fixfiles: fix test for $LOGFILE James Morris
@ 2006-08-12 14:22 ` Joshua Brindle
0 siblings, 0 replies; 2+ messages in thread
From: Joshua Brindle @ 2006-08-12 14:22 UTC (permalink / raw)
To: James Morris; +Cc: selinux
James Morris wrote:
> Please apply.
>
> ---
>
> --- fixfiles.orig 2006-08-12 00:52:22.000000000 -0400
> +++ fixfiles 2006-08-12 10:07:30.000000000 -0400
> @@ -48,7 +48,7 @@
> # Log to either syslog or a LOGFILE
> #
> logit () {
> -if [ -z $LOGFILE ]; then
> +if [ ! -z $LOGFILE ]; then
> echo $1 >> $LOGFILE
> fi
> }
>
Why not if [ -n $LOGFILE ]; then ?
From man bash:
-z string
True if the length of string is zero.
string
-n string
True if the length of string is non-zero.
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-08-12 14:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-12 14:09 [PATCH] fixfiles: fix test for $LOGFILE James Morris
2006-08-12 14:22 ` Joshua Brindle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.