From e7aedc3aa7e08f3337c86085c6da10ca83445024 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Mon, 2 Dec 2013 23:40:22 +0000 Subject: rescue: Move files around and introduce proper dep tracking. This moves any perl files into bin and sbin folders which will be directly installed in /usr/bin and /usr/sbin. This is done such that the extract modes in list.xml still work and the files end up in the right places. All other files have been moved into the tree folder in their final destination. --- rescue/grabjournallogs | 51 -------------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100755 rescue/grabjournallogs (limited to 'rescue/grabjournallogs') diff --git a/rescue/grabjournallogs b/rescue/grabjournallogs deleted file mode 100755 index ef2ea4a1d..000000000 --- a/rescue/grabjournallogs +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -if ! mountpoint -q /mnt ; then - echo "I do not seem to see a Mageia install mounted on /mnt. You need to mount it first!" >&2 - exit 1 -fi - -if [ ! -f /mnt/etc/machine-id ]; then - echo "Cannot find machine-id file (/mnt/etc/machine-id)" >&2 - exit 1 -fi - -MID=$(cat /mnt/etc/machine-id) -echo -echo "Found machine-id: $MID" -if [ ! -d /mnt/var/log/journal/$MID ]; then - echo "Cannot find journal log directory (/mnt/var/log/journal/)" >&2 - exit 1 -fi - -TIMEFRAME=24 -if [ -n "$1" ]; then - NEWTIMEFRAME=$(( 0 + $1 )) - if [ $NEWTIMEFRAME -gt 0 ]; then - TIMEFRAME=$NEWTIMEFRAME - fi -fi -SINCE="$(LC_ALL=c date --date=$TIMEFRAME' hours ago' +'%F %T')" -echo "Will collect logs from the last $TIMEFRAME hour(s)" -echo " NB give numeric argument to override capture period" - -TEMPFILE=$(mktemp /tmp/grabjournallogs.XXXXXX) -echo -n "Extracting logs... " -journalctl -D /mnt/var/log/journal/$MID --since "$SINCE" -o short >$TEMPFILE -echo "done" - -if [ $(cat $TEMPFILE | wc -l) -lt 2 ]; then - rm -f $TEMPFILE - echo >&2 - echo "Cannot find any logs. Consider increasing the capture period by passing a" >&2 - echo "numeric argument larger than $TIMEFRAME." >&2 - exit 1 -fi - -echo -n "Compressing logs... " -cat $TEMPFILE | xz >/journallogs.xz -rm -f $TEMPFILE -echo "done" - -echo -echo "Your logs have been extracted to the file 'journallogs.xz'" -- cgit v1.2.1