Chinaunix首页 | 论坛 | 博客
  • 博客访问: 152714
  • 博文数量: 42
  • 博客积分: 852
  • 博客等级: 准尉
  • 技术积分: 430
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-10 09:59
文章分类

全部博文(42)

文章存档

2015年(2)

2013年(9)

2012年(21)

2011年(4)

2009年(6)

我的朋友

分类: LINUX

2012-02-07 15:41:26

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 ~]#
 
 
阅读(1216) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~