View | Details | Raw Unified | Return to bug 116365
Collapse All | Expand All

(-)save_y2logs.orig (-6 / +15 lines)
Lines 4-23 Link Here
4
#		to attach it to a Bugzilla bug report
4
#		to attach it to a Bugzilla bug report
5
#
5
#
6
# Author: Stefan Hundhammer <sh@suse.de>
6
# Author: Stefan Hundhammer <sh@suse.de>
7
# rewritten by: Christian Boltz <http://www.cboltz.de>
7
8
8
if [ $# != 1 ]; then
9
function usage() {
9
    echo "Usage: $0 <tgz-file-name>"
10
    echo "Usage: $0 <tgz-file-name>"
10
    echo ""
11
    echo ""
11
    echo "Copies the YaST2 logs to a compressed tar archive."
12
    echo "Copies the YaST2 logs to a compressed tar archive."
12
    exit 1
13
    exit 1
13
fi
14
}
14
15
15
TARGET=$1
16
test $# != 1 && usage
16
17
17
LIST=YaST2
18
case "$1" in
19
	-*)
20
		usage
21
		;;
22
esac	
18
23
19
[ -f /var/log/evms-engine.log ] && LIST="$LIST evms-engine.*"
24
TARGET="$1"
20
25
21
cd /var/log && tar czf $TARGET $LIST && exit 0
26
LIST=/var/log/YaST2
27
28
[ -f /var/log/evms-engine.log ] && LIST="$LIST /var/log/evms-engine.*"
29
30
tar czf "$TARGET" $LIST && exit 0
22
exit 2
31
exit 2
23
32

Return to bug 116365