2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-14 15:20:29 +00:00

polish code

This commit is contained in:
bybai
2017-03-09 04:27:52 -05:00
parent a2b365dc75
commit 97018513c1

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#*:}