projects
/
grml-live.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SW: remove ophcrack
[grml-live.git]
/
buildd
/
functions.sh
diff --git
a/buildd/functions.sh
b/buildd/functions.sh
index
1db5a41
..
db93bbb
100755
(executable)
--- a/
buildd/functions.sh
+++ b/
buildd/functions.sh
@@
-26,9
+26,7
@@
which mutt >/dev/null 2>&1 || die "mutt binary not found. Exiting."
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
DATE=$(date +'%Y%m%d_%H%M%S')
TMP_DIR="$(mktemp -d)"
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
DATE=$(date +'%Y%m%d_%H%M%S')
TMP_DIR="$(mktemp -d)"
-MUTT_HEADERS="$(mktemp)"
[ -n "$TMP_DIR" ] || die "Could not create \$TMP_DIR. Exiting."
[ -n "$TMP_DIR" ] || die "Could not create \$TMP_DIR. Exiting."
-[ -n "$MUTT_HEADERS" ] || die "Could not create $\MUTT_HEADERS. Exiting."
# make sure we have same safe defaults:
[ -n "$OUTPUT_DIR" ] || OUTPUT_DIR="${STORAGE}/grml-live_${DATE}.$$"
# make sure we have same safe defaults:
[ -n "$OUTPUT_DIR" ] || OUTPUT_DIR="${STORAGE}/grml-live_${DATE}.$$"
@@
-45,7
+43,6
@@
else
fi
[ -n "$FAI_LOGFILES" ] || FAI_LOGFILES=/var/log/fai/grml/last
fi
[ -n "$FAI_LOGFILES" ] || FAI_LOGFILES=/var/log/fai/grml/last
-echo "my_hdr From: grml-live autobuild daemon <$FROM>" > $MUTT_HEADERS
# execute grml-live:
grml_live_run() {
# execute grml-live:
grml_live_run() {
@@
-84,7
+81,7
@@
grml_live_run() {
# create log archive:
create_logs() {
# create log archive:
create_logs() {
- ( cd / && tar zcf $ATTACHMENT $FAI_LOGFILES /var/log/grml-buildd.stderr /var/log/grml-buildd.stdout $GRML_LOGFILE >/dev/null )
+ ( cd / && tar zcf
h
$ATTACHMENT $FAI_LOGFILES /var/log/grml-buildd.stderr /var/log/grml-buildd.stdout $GRML_LOGFILE >/dev/null )
}
# store logs on remote server:
}
# store logs on remote server:
@@
-125,6
+122,10
@@
The following errors have been noticed (several might be warnings only):
$(grep -i error $FAI_LOGFILES/* /var/log/grml-buildd.std* | grep -ve liberror -ve libgpg-error || echo "* nothing")
$(grep -i error $FAI_LOGFILES/* /var/log/grml-buildd.std* | grep -ve liberror -ve libgpg-error || echo "* nothing")
+The following errors have been noticed in FAI scripts:
+
+$(grep -B2 "FAILED with exit code" $FAI_LOGFILES/* | echo "* nothing")
+
The following warnings have been noticed:
$(grep -i warn $FAI_LOGFILES/* /var/log/grml-buildd.std* || echo "* nothing")
The following warnings have been noticed:
$(grep -i warn $FAI_LOGFILES/* /var/log/grml-buildd.std* || echo "* nothing")
@@
-137,11
+138,11
@@
The following packages could not be installed:
$(grep -i "Couldn't find.*package" $FAI_LOGFILES/software.log | sed 's/\(.*\)"\(.*\)"\(.*\)/\2/' | sort -u || echo "* nothing")
$(grep -i "Couldn't find.*package" $FAI_LOGFILES/software.log | sed 's/\(.*\)"\(.*\)"\(.*\)/\2/' | sort -u || echo "* nothing")
-See attached files:
-/var/log/grml-buildd.stderr $ATTACHMENT
+See attached files for further details.
EOF" | \
EOF" | \
- mutt -s "$SCRIPTNAME [${DATE}] - $RC_INFO" -a /var/log/grml-buildd.stderr $MUTT_ATTACH -- "$RECIPIENT"
+ mutt -e "my_hdr From: grml-live autobuild daemon <$FROM>" -s "$SCRIPTNAME [${DATE}] - $RC_INFO" \
+ -a /var/log/grml-buildd.stderr $MUTT_ATTACH -- "$RECIPIENT"
}
# make sure we store the final iso:
}
# make sure we store the final iso:
@@
-161,9
+162,9
@@
store_iso() {
# allow clean exit:
bailout() {
if [ "$RC" = "0" ] ; then
# allow clean exit:
bailout() {
if [ "$RC" = "0" ] ; then
- rm -rf "$ATTACHMENT" "$TMP_DIR" "$OUTPUT_DIR"
"$MUTT_HEADERS"
+ rm -rf "$ATTACHMENT" "$TMP_DIR" "$OUTPUT_DIR"
else
else
- rm -f "$ATTACHMENT"
"$MUTT_HEADERS"
+ rm -f "$ATTACHMENT"
echo "building ISO failed, keeping build files [${OUTPUT_DIR} / ${TMP_DIR}]">&2
fi
echo "building ISO failed, keeping build files [${OUTPUT_DIR} / ${TMP_DIR}]">&2
fi