diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-01-01 14:27:34 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-01-01 14:27:34 +0100 |
commit | 42a8d479eb46fd3129cbbebecf937ce43360bcd8 (patch) | |
tree | 12c2c6017be18afd3e5eff61d4d4b9f12607f28b | |
parent | 0559ec25ce0d8019e417ca5f408dc4cfbfe06799 (diff) | |
download | jenkins.debian.net-42a8d479eb46fd3129cbbebecf937ce43360bcd8.tar.xz |
mount /proc /dev and /dev/pts inside chroot when installing additional packages
-rwxr-xr-x | bin/schroot-create.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/schroot-create.sh b/bin/schroot-create.sh index 85901093..656ba006 100755 --- a/bin/schroot-create.sh +++ b/bin/schroot-create.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2012-2014 Holger Levsen <holger@layer-acht.org> +# Copyright 2012-2015 Holger Levsen <holger@layer-acht.org> # Copyright 2013 Antonio Terceiro <terceiro@debian.org> # Copyright 2014 Joachim Breitner <nomeata@debian.org> # released under the GPLv=2 @@ -57,7 +57,14 @@ bootstrap() { sudo chroot $CHROOT_TARGET apt-get update if [ -n "$1" ] ; then + DEVICES="proc dev dev/pts" + for d in $DEVICES ; do + sudo mount --bind /$d $CHROOT_TARGET/$d + done sudo chroot $CHROOT_TARGET apt-get install -y --no-install-recommends "$@" + for d in $DEVICES ; do + sudo umount $CHROOT_TARGET/$d + done fi } |