the first way:
[root@isfdev ~]# head -n 3 /etc/rc.d/init.d/network
#! /bin/bash
sed -i "s/DHCP_HOSTNAME=.*/DHCP_HOSTNAME=`hostname`.asia.corp.platform.com/g" /etc/sysconfig/network-scripts/ifcfg-eth0
#
[root@isfdev ~]#
the second way:
echo "send host-name \"`hostname`\""\; > /etc/dhclient.conf
[root@rhvm1 ~]# cat /etc/dhclient.conf
send host-name "rhvm1.asia.corp.platform.com";
[root@rhvm1 ~]#
阅读(1247) | 评论(0) | 转发(0) |