Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc Set the redirection correctly, so that stderr gets duped...



details:   https://anonhg.NetBSD.org/src/rev/94bac520556b
branches:  trunk
changeset: 807734:94bac520556b
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Mon Apr 20 22:46:35 2015 +0000

description:
Set the redirection correctly, so that stderr gets duped to the
already redirected stdout, rather than duping stdout to stderr!

Without this fix, the disklabel output is included in the log file
rather than being discarded as intended.  (The purpose of running
disklabel this first time is only to check for success.)

diffstat:

 etc/security |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 9c44d367b4b0 -r 94bac520556b etc/security
--- a/etc/security      Mon Apr 20 21:48:47 2015 +0000
+++ b/etc/security      Mon Apr 20 22:46:35 2015 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#      $NetBSD: security,v 1.119 2015/02/14 19:46:55 nakayama Exp $
+#      $NetBSD: security,v 1.120 2015/04/20 22:46:35 pgoyette Exp $
 #      from: @(#)security      8.1 (Berkeley) 6/9/93
 #
 
@@ -918,7 +918,7 @@
                [cfm]d[0-9]*|dk[0-9]*|st[0-9]*|nfs[0-9]*|device)
                        ;;
                *)
-                       if disklabel $i > /dev/null 1>&2; then
+                       if disklabel $i > /dev/null 2>&1; then
                                disklabel $i > "$work_dir/disklabel.$i"
                        fi
                        ;;



Home | Main Index | Thread Index | Old Index