1 #!/bin/bash 2 # Usage: user-postsetup [ <country> ] 3 4 # Configuration: 5 if [ -e userinstall-defaults ]; then 6 source userinstall-defaults 7 elif [ -e /etc/default/userinstall ]; then 8 source /etc/default/userinstall 9 else 10 echo "No defaults found for userinstall." 11 exit 1 12 fi 13 14 echo "Copying host DNS configuration..." 15 cp /etc/resolv.conf $PACKAGEROOT/etc/ 16 17 echo "Copying filesystems configuration..." 18 cp /etc/fstab $PACKAGEROOT/etc/ 19 20 echo "Copying network configuration..." 21 cp /etc/hosts $PACKAGEROOT/etc/ 22 cp /etc/network/interfaces $PACKAGEROOT/etc/network/ 23 24 echo "Copying package repository configuration..." 25 if [[ $USERINSTALL_CODENAME == $DISTRIB_CODENAME ]]; then 26 cp /etc/apt/sources.list $PACKAGEROOT/etc/apt/ 27 elif [ -e $USERINSTALL_CODENAME/sources.list ]; then 28 cp $USERINSTALL_CODENAME/sources.list $PACKAGEROOT/etc/apt/ 29 else 30 echo "Attempting to generate a repository definition for $USERINSTALL_CODENAME." 31 `dirname $0`/user-makesources $PACKAGEROOT/etc/apt/sources.list $1 32 fi