]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Support install less crap in chroots
authorPeter Palfrader <peter@palfrader.org>
Thu, 5 Sep 2013 13:27:12 +0000 (15:27 +0200)
committerPeter Palfrader <peter@palfrader.org>
Thu, 5 Sep 2013 13:27:12 +0000 (15:27 +0200)
modules/porterbox/files/setup-dchroot

index 61d91b2d4c9dc79b33022e6f70ae8f1f0e8912ff..7f9b117d82518cba40b8ad720fd95fd1ae93d997 100755 (executable)
@@ -39,6 +39,7 @@ OPTIONS:
     -a ARCH    debootstrap arch [$arch]
     -m MIRROR  http mirror to use [$mirror]
     -b basedir place where to put the tarball [$basedir]
+    -B         install less stuff into chroot
     -c         write config only
     -d dir     place where to build the chroot [${builddir:-$basedir}]
     -f         overwrite config and target tarball
@@ -152,6 +153,7 @@ sbuildnames=""
 ubuntu=""
 groupuser="Debian,guest"
 grouproot=""
+bare=""
 declare -a cleanup
 trap do_cleanup EXIT
 
@@ -164,6 +166,9 @@ do
         b)
             basedir="$OPTARG"
             ;;
+        B)
+            bare="1"
+            ;;
         c)
             configonly="1"
             ;;
@@ -276,7 +281,8 @@ done
 EOF
 chmod +x "$rootdir/usr/local/sbin/policy-rc.d"
 [ -z "$ubuntu" ] && chroot "$rootdir" apt-get install -y --force-yes --no-install-recommends locales-all
-chroot "$rootdir" apt-get install -y --force-yes --no-install-recommends zsh build-essential less vim fakeroot devscripts gdb
+chroot "$rootdir" apt-get install -y --force-yes --no-install-recommends build-essential
+[ -z "$bare" ] && chroot "$rootdir" apt-get install -y --force-yes --no-install-recommends zsh less vim fakeroot devscripts gdb
 rm -f "$rootdir/etc/apt/sources.list" "$rootdir/etc/apt/sources.list.d/*"
 chroot "$rootdir" apt-get clean
 umount "$rootdir/sys" || true