2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 09:36:41 +00:00

Actually set up ifcfg correctly in SLE15

xcatroot is actually responsible, not prepivot.sh
This commit is contained in:
Jarrod Johnson 2018-08-11 20:51:30 -04:00 committed by Markus Hilger
parent c5f4918c0c
commit 74daba97ee
2 changed files with 11 additions and 11 deletions

View File

@ -153,11 +153,11 @@ function getdevfrommac() {
done
}
for lf in /tmp/dhclient.*.lease; do
netif=${lf#*.}
netif=${netif%.*}
cp $lf "$NEWROOT/var/lib/dhclient/dhclient-$netif.leases"
done
bootif=$(ls /tmp/net.*.conf|sed -e s/.*net\.// -e s/\.conf//)
cat <<EOF > $NEWROOT/etc/sysconfig/network/ifcfg-$bootif
BOOTPROTO='dhcp'
STARTMODE='auto'
EOF
if [ -f $NEWROOT/etc/hostname ]; then
echo `hostname -s` > $NEWROOT/etc/hostname

View File

@ -295,12 +295,12 @@ function getdevfrommac() {
if [ -z $STATEMNT ]; then
for lf in /tmp/dhclient.*.lease; do
netif=${lf#*.}
netif=${netif%.*}
cp $lf "$NEWROOT/var/lib/dhclient/dhclient-$netif.leases"
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "saving $NEWROOT/var/lib/dhclient/dhclient-$netif.leases"
done
bootif=$(ls /tmp/net.*.conf|sed -e s/.*net\.// -e s/\.conf//)
cat <<EOF > $NEWROOT/etc/sysconfig/network/ifcfg-$bootif
BOOTPROTO='dhcp'
STARTMODE='auto'
EOF
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "saving $NEWROOT/etc/sysconfig/network/ifcfg-$bootif"
if [ ! -z "$ifname" ]; then
MACX=${ifname#*:}