1.1 --- a/user-postsetup Fri Apr 13 00:16:46 2012 +0200
1.2 +++ b/user-postsetup Mon May 07 00:32:42 2012 +0200
1.3 @@ -38,32 +38,30 @@
1.4 "$AS_USER" cp /etc/network/interfaces "$PACKAGEROOT/etc/network/"
1.5
1.6 echo "Copying package repository configuration..." 1>&2
1.7 +
1.8 +# For installations of the same distribution, copy the host's sources list.
1.9 +
1.10 if [ "$USERINSTALL_CODENAME" = "$DISTRIB_CODENAME" ]; then
1.11 "$AS_USER" cp /etc/apt/sources.list "$PACKAGEROOT/etc/apt/"
1.12 -elif [ -e "$USERINSTALL_CODENAME/sources.list" ]; then
1.13 - "$AS_USER" cp "$USERINSTALL_CODENAME/sources.list" "$PACKAGEROOT/etc/apt/"
1.14 +
1.15 +# Otherwise, attempt to make a new sources list.
1.16 +
1.17 else
1.18 echo "Attempting to generate a repository definition for $USERINSTALL_CODENAME." 1>&2
1.19 "$AS_USER" USERINSTALL_ID="$USERINSTALL_ID" USERINSTALL_CODENAME="$USERINSTALL_CODENAME" \
1.20 "$THIS_DIR/user-makesources" "$PACKAGEROOT/etc/apt/sources.list" "$COUNTRY"
1.21 fi
1.22
1.23 -if [ "$AS_ROOT" ]; then
1.24 - echo "Mounting filesystems..." 1>&2
1.25 - "$THIS_DIR/user-do" $AS_ROOT mount -t proc proc /proc
1.26 -fi
1.27 -
1.28 echo "Updating package details and upgrading..." 1>&2
1.29 "$THIS_DIR/user-do" $AS_ROOT apt-get update
1.30 "$THIS_DIR/user-do" $AS_ROOT apt-get upgrade
1.31
1.32 +# Root installations also need further configuration.
1.33 +
1.34 if [ "$AS_ROOT" ]; then
1.35 echo "Configuring a root installation..." 1>&2
1.36 "$THIS_DIR/user-do" $AS_ROOT apt-get install locales console-data
1.37 "$THIS_DIR/user-do" $AS_ROOT dpkg-reconfigure locales
1.38 "$THIS_DIR/user-do" $AS_ROOT dpkg-reconfigure tzdata
1.39 "$THIS_DIR/user-do" $AS_ROOT dpkg-reconfigure console-data
1.40 -
1.41 - echo "Unmounting filesystems..." 1>&2
1.42 - "$THIS_DIR/user-do" $AS_ROOT umount /proc
1.43 fi