summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-11-08 23:31:15 +0000
committerHolger Levsen <holger@layer-acht.org>2014-11-08 23:31:15 +0000
commit51ac850cbb9071efba6e4813618456bfd597563d (patch)
tree28761dca90d7c73c81dcf4f14f61f4bdef480e83
parent409e7174ff6e69c903eb9d1e22ad47826bd041d0 (diff)
downloadjenkins.debian.net-51ac850cbb9071efba6e4813618456bfd597563d.tar.xz
chroot-i: write commands executed into logfile
-rwxr-xr-xbin/chroot-installation.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/chroot-installation.sh b/bin/chroot-installation.sh
index cda141b1..4473f853 100755
--- a/bin/chroot-installation.sh
+++ b/bin/chroot-installation.sh
@@ -46,26 +46,31 @@ execute_ctmpfile() {
prepare_bootstrap() {
cat >> $CTMPFILE <<-EOF
$SCRIPT_HEADER
+set -x
mount /proc -t proc /proc
echo -e '#!/bin/sh\nexit 101' > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
echo 'Acquire::http::Proxy "http://localhost:3128";' > /etc/apt/apt.conf.d/80proxy
echo "deb-src $MIRROR $1 main contrib non-free" >> /etc/apt/sources.list
apt-get update
+set +x
EOF
}
prepare_install_packages() {
cat >> $CTMPFILE <<-EOF
$SCRIPT_HEADER
+set -x
apt-get -y install $@
apt-get clean
+set +x
EOF
}
prepare_install_build_depends() {
cat >> $CTMPFILE <<-EOF
$SCRIPT_HEADER
+set -x
apt-get -y install build-essential
apt-get clean
EOF
@@ -73,12 +78,14 @@ for PACKAGE in $@ ; do
echo apt-get -y build-dep $PACKAGE >> $CTMPFILE
echo apt-get clean >> $CTMPFILE
done
+echo "set +x" >> $CTMPFILE
}
prepare_upgrade2() {
cat >> $CTMPFILE <<-EOF
echo "deb $MIRROR $1 main contrib non-free" >> /etc/apt/sources.list
$SCRIPT_HEADER
+set -x
apt-get update
apt-get -y upgrade
apt-get clean
@@ -87,6 +94,7 @@ apt-get clean
apt-get -yf dist-upgrade
apt-get clean
apt-get -y autoremove
+set +x
EOF
}