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:
parent
c5f4918c0c
commit
74daba97ee
@ -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
|
||||
|
@ -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#*:}
|
||||
|
Loading…
x
Reference in New Issue
Block a user