[Piuparts-commits] [SCM] piatti.debian.org configuration files branch, master, updated. 148332ef45997ba3aaf38cc2c9a28441083bad49
Holger Levsen
holger at layer-acht.org
Fri Dec 23 10:23:35 UTC 2011
The following commit has been merged in the master branch:
commit efb223a59fdfec35e5ba428d31bd77a88bbb06b2
Author: Holger Levsen <holger at layer-acht.org>
Date: Mon Sep 26 19:53:08 2011 +0200
fix scripts for dash as default shell. Thanks to Scott Schaefer for the patch. Closes 640649
diff --git a/home/piupartsm/bin/archive_old_logs b/home/piupartsm/bin/archive_old_logs
index a98ee92..3380d87 100755
--- a/home/piupartsm/bin/archive_old_logs
+++ b/home/piupartsm/bin/archive_old_logs
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright 2009-2010 Holger Levsen (holger at layer-acht.org)
#
@@ -22,7 +22,7 @@
TEMPFILE=`mktemp`
egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
rm $TEMPFILE
if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
diff --git a/home/piupartsm/bin/detect_archive_issues b/home/piupartsm/bin/detect_archive_issues
index 3bb8873..dc9adcb 100755
--- a/home/piupartsm/bin/detect_archive_issues
+++ b/home/piupartsm/bin/detect_archive_issues
@@ -23,7 +23,7 @@
[ -e /etc/piuparts/piuparts.conf ] || exit 0
TEMPFILE=`mktemp`
egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
rm $TEMPFILE
if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
diff --git a/home/piupartsm/bin/detect_network_issues b/home/piupartsm/bin/detect_network_issues
index cc9599f..37f4f7e 100755
--- a/home/piupartsm/bin/detect_network_issues
+++ b/home/piupartsm/bin/detect_network_issues
@@ -23,7 +23,7 @@
[ -e /etc/piuparts/piuparts.conf ] || exit 0
TEMPFILE=`mktemp`
egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
rm $TEMPFILE
if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
diff --git a/home/piupartsm/bin/detect_piuparts_issues b/home/piupartsm/bin/detect_piuparts_issues
index 701999c..5738ca8 100755
--- a/home/piupartsm/bin/detect_piuparts_issues
+++ b/home/piupartsm/bin/detect_piuparts_issues
@@ -23,7 +23,7 @@
[ -e /etc/piuparts/piuparts.conf ] || exit 0
TEMPFILE=`mktemp`
egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
rm $TEMPFILE
if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
diff --git a/home/piupartsm/bin/detect_slave_problems b/home/piupartsm/bin/detect_slave_problems
index 3630c47..17b136a 100755
--- a/home/piupartsm/bin/detect_slave_problems
+++ b/home/piupartsm/bin/detect_slave_problems
@@ -28,7 +28,7 @@ fi
[ -e /etc/piuparts/piuparts.conf ] || exit 0
TEMPFILE=`mktemp`
egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
rm $TEMPFILE
if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
diff --git a/home/piupartsm/bin/detect_well_known_errors b/home/piupartsm/bin/detect_well_known_errors
index 5424236..1d73e5d 100755
--- a/home/piupartsm/bin/detect_well_known_errors
+++ b/home/piupartsm/bin/detect_well_known_errors
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright 2009-2010 Holger Levsen (holger at layer-acht.org)
#
@@ -23,7 +23,7 @@
[ -e /etc/piuparts/piuparts.conf ] || exit 0
TEMPFILE=`mktemp`
egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
rm $TEMPFILE
if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
@@ -43,8 +43,8 @@ for SECTION in $SECTIONS ; do
cd $MASTER/$SECTION
for problem in `ls ~/bin/known_problems` ; do
# source files to get COMMAND, HELPTEXT and ISSUE
- source ~/bin/known_problems/$problem
- echo -n "$COMMAND" > $LOGS
+ . ~/bin/known_problems/$problem
+ printf "%b" "$COMMAND" > $LOGS
if [ -s $LOGS ] ; then
OUTPUT=$HTDOCS/$SECTION/${problem%.conf}.tpl
echo '<table class="righttable"><tr class="titlerow"><td class="titlecell">' > $OUTPUT
@@ -60,20 +60,20 @@ for SECTION in $SECTIONS ; do
for LOG in $(cat $LOGS|sort) ; do
PACKAGE=$(echo $LOG | cut -d "_" -f1|cut -d "/" -f2)
LATEST=$(ls -tr1 --color=none $MASTER/$SECTION/fail/${PACKAGE}_* $MASTER/$SECTION/bugged/${PACKAGE}_* $MASTER/$SECTION/pass/${PACKAGE}_* 2>/dev/null|tail -1|cut -d "/" -f7)
- if [ "${problem%_error.conf}_error.conf" == "$problem" ] ; then
+ if [ "${problem%_error.conf}_error.conf" = "$problem" ] ; then
LATESTFAIL=$(ls -tr1 --color=none $MASTER/$SECTION/fail/${PACKAGE}_* $MASTER/$SECTION/bugged/${PACKAGE}_* 2>/dev/null|tail -1|cut -d "/" -f7-8)
- if [ "$LATEST" != "pass" ] && [ "$LATESTFAIL" == "$LOG" ] ; then
+ if [ "$LATEST" != "pass" ] && [ "$LATESTFAIL" = "$LOG" ] ; then
echo "<li><a href='/$SECTION/$LOG'>$LOG</a> (<a href=\"http://bugs.debian.org/$PACKAGE?dist=unstable\" target=\"_blank\">BTS</a>)</li>" >> $OUTPUT
echo "$LOG" >> ${KNOWNLOGS[$NR]}
- let "COUNT += 1"
+ COUNT=$((COUNT+1))
fi
else
# this is an issue, not an error
LATESTSUCCESS=$(ls -tr1 --color=none $MASTER/$SECTION/pass/${PACKAGE}_* 2>/dev/null|tail -1|cut -d "/" -f7-8)
- if [ "$LATEST" == "pass" ] && [ "$LATESTSUCCESS" == "$LOG" ] ; then
+ if [ "$LATEST" = "pass" ] && [ "$LATESTSUCCESS" = "$LOG" ] ; then
echo "<li><a href='/$SECTION/$LOG'>$LOG</a> (<a href=\"http://bugs.debian.org/$PACKAGE?dist=unstable\" target=\"_blank\">BTS</a>)</li>" >> $OUTPUT
echo "$LOG" >> ${KNOWNLOGS[$NR]}
- let "COUNT += 1"
+ COUNT=$((COUNT+1))
fi
fi
done
@@ -83,7 +83,7 @@ for SECTION in $SECTIONS ; do
touch ${KNOWNLOGS[$NR]}
fi
done
- let "NR += 1"
+ NR=$((NR+1))
done
rm $LOGS
@@ -110,15 +110,15 @@ for SECTION in $SECTIONS ; do
PACKAGE=$(echo $LOG | cut -d "_" -f1|cut -d "/" -f2)
LATEST=$(ls -tr1 --color=none $MASTER/$SECTION/fail/${PACKAGE}_* $MASTER/$SECTION/bugged/${PACKAGE}_* $MASTER/$SECTION/pass/${PACKAGE}_* 2>/dev/null|tail -1|cut -d "/" -f7)
LATESTFAIL=$(ls -tr1 --color=none $MASTER/$SECTION/fail/${PACKAGE}_* $MASTER/$SECTION/bugged/${PACKAGE}_* 2>/dev/null|tail -1|cut -d "/" -f7-8)
- if [ "$LATEST" != "pass" ] && [ "$LATESTFAIL" == "$LOG" ] ; then
+ if [ "$LATEST" != "pass" ] && [ "$LATESTFAIL" = "$LOG" ] ; then
echo "<li><a href='/$SECTION/$LOG'>$LOG</a> (<a href=\"http://bugs.debian.org/$PACKAGE?dist=unstable\" target=\"_blank\">BTS</a>)</li>" >> $OUTPUT
- let "COUNT += 1"
+ COUNT=$((COUNT+1))
fi
done
echo "</ul>" >> $OUTPUT
echo "<p>Affected packages in $SECTION: $COUNT</p></td></tr></table>" >> $OUTPUT
fi
rm $LOGS ${KNOWNLOGS[$NR]} $UNKNOWNLOGS
- let "NR += 1"
+ NR=$((NR+1))
done
diff --git a/home/piupartsm/bin/prepare_backup b/home/piupartsm/bin/prepare_backup
index 9bf9a97..135f885 100755
--- a/home/piupartsm/bin/prepare_backup
+++ b/home/piupartsm/bin/prepare_backup
@@ -21,7 +21,7 @@
#
TEMPFILE=`mktemp`
egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
rm $TEMPFILE
if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
diff --git a/home/piupartsm/bin/report_stale_reserved_packages b/home/piupartsm/bin/report_stale_reserved_packages
index d2793cf..9cf9afc 100755
--- a/home/piupartsm/bin/report_stale_reserved_packages
+++ b/home/piupartsm/bin/report_stale_reserved_packages
@@ -22,7 +22,7 @@
TEMPFILE=`mktemp`
egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
rm $TEMPFILE
if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
diff --git a/home/piupartsm/bin/report_untestable_packages b/home/piupartsm/bin/report_untestable_packages
index cbc286a..a0bf143 100755
--- a/home/piupartsm/bin/report_untestable_packages
+++ b/home/piupartsm/bin/report_untestable_packages
@@ -22,7 +22,7 @@
TEMPFILE=`mktemp`
egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
rm $TEMPFILE
if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
diff --git a/home/piupartsm/bin/reschedule_oldest_logs b/home/piupartsm/bin/reschedule_oldest_logs
index bf319ab..833f918 100755
--- a/home/piupartsm/bin/reschedule_oldest_logs
+++ b/home/piupartsm/bin/reschedule_oldest_logs
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright 2009-2011 Holger Levsen (holger at layer-acht.org)
#
@@ -22,7 +22,7 @@
TEMPFILE=`mktemp`
egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
rm $TEMPFILE
if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
@@ -34,7 +34,7 @@ fi
#
for SECTION in $SECTIONS ; do
# only for sid and wheezy
- if [ "$SECTION" == "sid" ] || [ "$SECTION" == "wheezy" ] ; then
+ if [ "$SECTION" = "sid" ] || [ "$SECTION" = "wheezy" ] ; then
echo $SECTION
cd $MASTER/$SECTION
# we ignore bugged here - ptyhon-bts is really the way to go
diff --git a/home/piupartss/bin/detect_leftover_processes b/home/piupartss/bin/detect_leftover_processes
index 5935315..4fda80e 100755
--- a/home/piupartss/bin/detect_leftover_processes
+++ b/home/piupartss/bin/detect_leftover_processes
@@ -23,7 +23,7 @@
[ -e /etc/piuparts/piuparts.conf ] || exit 0
TEMPFILE=`mktemp`
egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
rm $TEMPFILE
if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
diff --git a/home/piupartss/bin/update-piuparts-setup b/home/piupartss/bin/update-piuparts-setup
index f33c54a..1e43bf2 100755
--- a/home/piupartss/bin/update-piuparts-setup
+++ b/home/piupartss/bin/update-piuparts-setup
@@ -73,6 +73,7 @@ sudo chown piupartsm.piuparts master htdocs
sudo chmod 775 master slave htdocs
cd /org/piuparts.debian.org/etc
# to support multiple host with this setup
+HOSTNAME=`hostname`
ln -sf piuparts.conf.$HOSTNAME piuparts.conf
#
diff --git a/org/piuparts.debian.org/etc/scripts/pre_upgrade_exceptions b/org/piuparts.debian.org/etc/scripts/pre_upgrade_exceptions
index 5491995..db0a126 100755
--- a/org/piuparts.debian.org/etc/scripts/pre_upgrade_exceptions
+++ b/org/piuparts.debian.org/etc/scripts/pre_upgrade_exceptions
@@ -10,7 +10,7 @@ case $PIUPARTS_OBJECTS in
# apt-listbugs is run on installations / upgrades
# and will them fail if packages have RC bugs
# (which is good and sensible)
- echo -e "#/bin/sh\nexit 0" > /usr/sbin/apt-listbugs
+ printf "%b\n" "#/bin/sh\nexit 0" > /usr/sbin/apt-listbugs
;;
esac
--
piatti.debian.org configuration files
More information about the Piuparts-commits
mailing list