summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-04-25 12:53:00 +0200
committerHolger Levsen <holger@layer-acht.org>2014-04-25 12:53:00 +0200
commite2b6e2adbad9013c0a355aa90d2a69724b9932fa (patch)
treeb71e8411196e3db1d20fafc261b91abb43c76421 /bin
parent91630a67830c8f279e72f338536ec28a3829928b (diff)
downloadjenkins.debian.net-e2b6e2adbad9013c0a355aa90d2a69724b9932fa.tar.xz
Revert "Use sudo tee trick..." as it causes " parse error in /etc/sudoers.d/jenkins near line 3"
This reverts commit 8f2f36225a254ccd177b77d8ba197c9a95180b82.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/schroot-create.sh16
1 files changed, 10 insertions, 6 deletions
diff --git a/bin/schroot-create.sh b/bin/schroot-create.sh
index 30292e9d..181b3972 100755
--- a/bin/schroot-create.sh
+++ b/bin/schroot-create.sh
@@ -60,12 +60,16 @@ export CURDIR=$(pwd)
bootstrap() {
sudo debootstrap $DISTRO $CHROOT_TARGET $MIRROR
- echo -e '#!/bin/sh\nexit 101' | sudo tee $CHROOT_TARGET/usr/sbin/policy-rc.d >/dev/null
- sudo chmod +x $CHROOT_TARGET/usr/sbin/policy-rc.d
- echo 'Acquire::http::Proxy "$http_proxy";' | sudo tee $CHROOT_TARGET/etc/apt/apt.conf.d/80proxy >/dev/null
- echo "deb-src $MIRROR $DISTRO main" | sudo tee -a $CHROOT_TARGET/etc/apt/sources.list > /dev/null
- echo "${BACKPORTS}" | sudo tee -a $CHROOT_TARGET/etc/apt/sources.list >/dev/null
- echo "${BACKPORTSSRC}" | sudo tee -a $CHROOT_TARGET/etc/apt/sources.list >/dev/null
+ sudo -s <<-EOF
+ set -e
+ set -x
+ echo -e '#!/bin/sh\nexit 101' > $CHROOT_TARGET/usr/sbin/policy-rc.d
+ chmod +x $CHROOT_TARGET/usr/sbin/policy-rc.d
+ echo 'Acquire::http::Proxy "$http_proxy";' > $CHROOT_TARGET/etc/apt/apt.conf.d/80proxy
+ echo "deb-src $MIRROR $DISTRO main" >> $CHROOT_TARGET/etc/apt/sources.list
+ echo "${BACKPORTS}" >> $CHROOT_TARGET/etc/apt/sources.list
+ echo "${BACKPORTSSRC}" >> $CHROOT_TARGET/etc/apt/sources.list
+ EOF
}
cleanup() {