diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2014-04-16 17:25:18 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2014-04-27 19:49:48 +0200 |
commit | 6a243e39a69b4352c76515a490d735fe256524f7 (patch) | |
tree | a51bd8d81b737be4636eb9e6d6522da60b787cb8 | |
parent | 8e3b14d2d0d8ce074dc941b0246feaaf00e67edf (diff) | |
download | jenkins.debian.net-6a243e39a69b4352c76515a490d735fe256524f7.tar.xz |
Use sudo tee trick to write files as root
merge conflicts:
bin/schroot-create.sh
-rwxr-xr-x | bin/schroot-create.sh | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/bin/schroot-create.sh b/bin/schroot-create.sh index d39502e9..d44cedc3 100755 --- a/bin/schroot-create.sh +++ b/bin/schroot-create.sh @@ -49,16 +49,12 @@ bootstrap() { echo "Bootstraping $DISTRO into $CHROOT_TARGET now." sudo debootstrap $DISTRO $CHROOT_TARGET $MIRROR - echo 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 + 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 } cleanup() { |