- if [ -r /etc/network/interfaces -a ! -r "${MNTPOINT}"/etc/network/interfaces ] ; then
- [ -d $MNTPOINT/etc/network ] || mkdir $MNTPOINT/etc/network
- cp $VERBOSE /etc/network/interfaces $MNTPOINT/etc/network/interfaces
+ if [ -n "$NOINTERFACES" ] ; then
+ einfo "Not installing /etc/network/interfaces as requested via --nointerfaces option" ; eend 0
+ elif [ -n "$VIRTUAL" ] ; then
+ einfo "Installing into Virtual Machine, skipping installation of /etc/network/interfaces" ; eend 0
+ elif [ -r /etc/network/interfaces ] ; then
+ einfo "Copying /etc/network/interfaces from host to target system"
+ cp $VERBOSE /etc/network/interfaces $MNTPOINT/etc/network/interfaces
+ eend $?
+ else
+ ewarn "Couldn't read /etc/network/interfaces, not copying to target system" ; eend 0