mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-22 03:32:04 +00:00
Merge pull request #2621 from bybai/hostname
fix hostname linux in statelite sles12.2
This commit is contained in:
commit
1dd6255ee4
@ -76,6 +76,7 @@ This is the minimal list of files needed, you can add additional files to the li
|
||||
"ALL","/etc/ntp.conf","tmpfs",,
|
||||
"ALL","/etc/ntp.conf.org","tmpfs",,
|
||||
"ALL","/etc/resolv.conf","tmpfs",,
|
||||
"ALL","/etc/hostname","tmpfs",,
|
||||
"ALL","/etc/ssh/","tmpfs",,
|
||||
"ALL","/etc/sysconfig/","tmpfs",,
|
||||
"ALL","/etc/syslog-ng/","tmpfs",,
|
||||
|
@ -134,13 +134,16 @@ function getdevfrommac() {
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
for lf in /tmp/dhclient.*.lease; do
|
||||
netif=${lf#*.}
|
||||
netif=${netif%.*}
|
||||
cp $lf "$NEWROOT/var/lib/dhclient/dhclient-$netif.leases"
|
||||
done
|
||||
|
||||
if [ -f $NEWROOT/etc/hostname ]; then
|
||||
echo `hostname -s` > $NEWROOT/etc/hostname
|
||||
fi
|
||||
|
||||
if [ ! -z "$ifname" ]; then
|
||||
MACX=${ifname#*:}
|
||||
ETHX=${ifname%:$MACX*}
|
||||
|
Loading…
x
Reference in New Issue
Block a user