- 论坛徽章:
- 0
|
本帖最后由 wqszyl 于 2011-11-15 08:39 编辑
今天到单位开机,在系统中改过的hostid仍然健在,我把原来的S20sysetup文件和修改后的贴上来,大家帮看看分析一下
原来的:#!/sbin/sh
#
# Copyright (c) 1984-1998 by Sun Microsystems, Inc.
# All rights reserved.
#
#ident "@(#)sysetup 1.18 98/10/09 SMI"
if [ -z "$_INIT_PREV_LEVEL" ]; then
set -- `/usr/bin/who -r`
_INIT_PREV_LEVEL="$9"
fi
[ $_INIT_PREV_LEVEL != S -a $_INIT_PREV_LEVEL != 1 ] && exit 0
# Uncomment this line to print the complete system configuration on startup
#[ -x /usr/sbin/prtconf ] && /usr/sbin/prtconf
# If there are trademark files, print them.
[ -d /etc/tm ] && /usr/bin/cat /etc/tm/* 2>/dev/null
#
# Savecore is enabled by default.
# See dumpadm(1M) on how to customize
# system dump configuration.
#
修改后的:
#!/sbin/sh
#
# Copyright (c) 1984-1998 by Sun Microsystems, Inc.
# All rights reserved.
#
#ident "@(#)sysetup 1.18 98/10/09 SMI"
if [ -z "$_INIT_PREV_LEVEL" ]; then
set -- `/usr/bin/who -r`
_INIT_PREV_LEVEL="$9"
fi
[ $_INIT_PREV_LEVEL != S -a $_INIT_PREV_LEVEL != 1 ] && exit 0
# Uncomment this line to print the complete system configuration on startup
#[ -x /usr/sbin/prtconf ] && /usr/sbin/prtconf
# If there are trademark files, print them.
[ -d /etc/tm ] && /usr/bin/cat /etc/tm/* 2>/dev/null
#
# Savecore is enabled by default.
# See dumpadm(1M) on how to customize
# system dump configuration.
#
#hostid--2011/11/11
adb -w -k /dev/ksyms /dev/mem <<END>/dev/null
hw_serial/W 0x32323031
hw_serial+4/W 0x36313935
hw_serial+8/W 0x32390000
END
就是在最后加了一段,我也不是很明白,是不是还修改了其他的文件,只是那片文章说只要把原来的/etc/rc2.d/S20setup文件覆盖回去就可以在系统中恢复原hostid,我做了却不行 |
|