{{{
cd /srv/chroot &&
mkdir $DIST &&
- debootstrap --keyring /usr/share/keyrings/debian-archive-keyring.gpg --variant=buildd $DIST ./$DIST http://$MIRROR/debian &&
+ debootstrap --keyring /usr/share/keyrings/debian-archive-keyring.gpg --include="apt" --variant=buildd $DIST ./$DIST http://$MIRROR/debian &&
cp /etc/hosts $DIST/etc/
}}}
echo $DIST > /etc/debian_chroot
# change root's .bashrc:
- patch /root/.bashrc << 'EOF'
+ grep -q debian.chroot /etc/bash.bashrc || patch /root/.bashrc << 'EOF'
@@ -3,2 +3,6 @@
export PS1='\h:\w\$ '
+if [ -e /etc/debian_chroot ]; then
#
#*) setup nsswitch.conf to properly use the ldap stuff
apt-get install libnss-db &&
- sed -i -e 's/^passwd:[[:space:]]\+compat$/passwd: compat db/;
- s/^group:[[:space:]]\+compat$/group: db compat/;
- s/^shadow:[[:space:]]\+compat$/shadow: compat db/' \
+ sed -i -e 's/^passwd:\[[:space:]]\+compat$/passwd: compat db/;
+ s/^group:\[[:space:]]\+compat$/group: db compat/;
+ s/^shadow:\[[:space:]]\+compat$/shadow: compat db/' \
/etc/nsswitch.conf
#
#
apt-get update && apt-get upgrade
#
# *)
- mount /proc && debfoster && umount /proc
+ mount -t proc none /proc && debfoster ; umount /proc
#
# *)
# exit the chroot