Author: mvidner Date: Mon Aug 10 14:13:17 2009 New Revision: 58309 URL: http://svn.opensuse.org/viewcvs/yast?rev=58309&view=rev Log: save_y2logs: print usage to stderr This is to notify users who use "$0 > l.tgz" instead of "$0 l.tgz" (bnc#522842) Modified: trunk/yast2/package/yast2.changes trunk/yast2/scripts/save_y2logs Modified: trunk/yast2/package/yast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=58309&r1=58308&r2=58309&view=diff ============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Mon Aug 10 14:13:17 2009 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon Aug 10 14:12:33 CEST 2009 - mvidner@suse.cz + +- save_y2logs: print usage to stderr (bnc#522842). + This is to notify users who use "$0 > l.tgz" instead of "$0 l.tgz" + +------------------------------------------------------------------- Wed Jul 29 14:44:48 CEST 2009 - jsrain@suse.cz - select kernel-desktop by default if exists Modified: trunk/yast2/scripts/save_y2logs URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/scripts/save_y2logs?rev=58309&r1=58308&r2=58309&view=diff ============================================================================== --- trunk/yast2/scripts/save_y2logs (original) +++ trunk/yast2/scripts/save_y2logs Mon Aug 10 14:13:17 2009 @@ -7,9 +7,9 @@ usage() { - echo "Usage: $0 <tgz-file-name>|<bzip2-file-name>" - echo "" - echo "Copies the YaST2 logs to a compressed tar archive." + echo "Usage: $0 <tgz-file-name>|<bzip2-file-name>" >&2 + echo "" >&2 + echo "Copies the YaST2 logs to a compressed tar archive." >&2 exit 1 } @@ -42,7 +42,7 @@ exit 4 esac -TMPDIR=`mktemp -d` || ( echo "FATAL: Failed to create a temporary directory"; exit 5 ); +TMPDIR=`mktemp -d` || ( echo "FATAL: Failed to create a temporary directory" >&2; exit 5 ); LIST=YaST2 if [ -f /var/log/evms-engine.log ]; then @@ -83,10 +83,9 @@ LIST="$LIST $RPM_LIST" fi -echo "Saving y2logs to $TARGET" +echo "Saving y2logs to $TARGET" >&2 tar cf "$TARGET" $COMPRESSION --directory=/var/log $LIST && rm -rf $TMPDIR && exit 0 echo "FATAL: Error creating archive $TARGET" >&2 exit 2 - -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org