Don't initially change network settings for generic image
This commit is contained in:
parent
4202582083
commit
ace1114013
|
@ -97,6 +97,7 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_networking() {
|
configure_networking() {
|
||||||
|
if [[ $GENERIC_IMAGE == "no" ]]; then
|
||||||
echo "# This file describes the network interfaces available on your system
|
echo "# This file describes the network interfaces available on your system
|
||||||
# and how to activate them. For more information, see interfaces(5).
|
# and how to activate them. For more information, see interfaces(5).
|
||||||
|
|
||||||
|
@ -141,6 +142,7 @@ iface eth0 inet static
|
||||||
e=${hexarray[$RANDOM%16]}${hexarray[$RANDOM%16]}
|
e=${hexarray[$RANDOM%16]}${hexarray[$RANDOM%16]}
|
||||||
sed -i "s|#hwaddress ether.*|hwaddress ether de:$a:$b:$c:$d:$e|g" \
|
sed -i "s|#hwaddress ether.*|hwaddress ether de:$a:$b:$c:$d:$e|g" \
|
||||||
$rootdir/etc/network/interfaces
|
$rootdir/etc/network/interfaces
|
||||||
|
fi
|
||||||
|
|
||||||
sed -i "s/nameserver.*/nameserver $NAMESERVER1/g" $rootdir/etc/resolv.conf
|
sed -i "s/nameserver.*/nameserver $NAMESERVER1/g" $rootdir/etc/resolv.conf
|
||||||
sed -i "/nameserver $NAMESERVER1/a\nameserver $NAMESERVER2" $rootdir/etc/resolv.conf
|
sed -i "/nameserver $NAMESERVER1/a\nameserver $NAMESERVER2" $rootdir/etc/resolv.conf
|
||||||
|
|
Loading…
Reference in New Issue