2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-09-06 10:18:20 +00:00

polish code

This commit is contained in:
bybai
2017-03-09 04:27:52 -05:00
committed by Jarrod Johnson
parent fc61a6d229
commit 2763a7229d

View File

@@ -134,7 +134,15 @@ function getdevfrommac() {
done
}
echo `hostname -s` > $NEWROOT/etc/HOSTNAME
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#*:}