# HG changeset patch # User Paul Boddie # Date 1269814233 -7200 # Node ID dce667a38f71e9c3089a4982d4c97540f6fae646 # Parent 9c1ab8d6c81767cd511801a4c4a4dec816c4bf25 Added --root options to the setup and enter scripts, invoking the underlying tools without fakechroot. diff -r 9c1ab8d6c817 -r dce667a38f71 user-enter --- a/user-enter Sun Mar 21 01:34:38 2010 +0100 +++ b/user-enter Mon Mar 29 00:10:33 2010 +0200 @@ -11,4 +11,8 @@ exit 1 fi -fakeroot fakechroot $FAKECHROOT_OPTIONS chroot $PACKAGEROOT +if [[ $1 == '--root' ]]; then + chroot $PACKAGEROOT +else + fakeroot fakechroot $FAKECHROOT_OPTIONS chroot $PACKAGEROOT +fi diff -r 9c1ab8d6c817 -r dce667a38f71 user-setup --- a/user-setup Sun Mar 21 01:34:38 2010 +0100 +++ b/user-setup Mon Mar 29 00:10:33 2010 +0200 @@ -1,5 +1,5 @@ #!/bin/bash -# Usage: user-setup [ ] +# Usage: user-setup [ --root ] [ ] # Configuration: if [ -e userinstall-defaults ]; then @@ -22,8 +22,28 @@ exit 1 fi -fakeroot fakechroot $FAKECHROOT_OPTIONS debootstrap --variant=fakechroot --include=gnupg,$KEYRING $USERINSTALL_CODENAME $PACKAGEROOT $1 +if [[ $1 && $1 == '--root' ]]; then + export AS_ROOT=true + export MIRROR=$2 +elif [[ $2 && $2 == '--root' ]]; then + export AS_ROOT=true + export MIRROR=$1 +else + export MIRROR=$1 +fi + +if [[ $AS_ROOT ]]; then + debootstrap --include=gnupg,$KEYRING $USERINSTALL_CODENAME $PACKAGEROOT $MIRROR +else + fakeroot fakechroot $FAKECHROOT_OPTIONS debootstrap --variant=fakechroot --include=gnupg,$KEYRING \ + $USERINSTALL_CODENAME $PACKAGEROOT $MIRROR +fi + echo echo "Don't forget to run the following before installing packages:" echo echo "user-apt-get update" + +if [[ $AS_ROOT ]]; then + echo "dpkg-reconfigure locales" +fi