SuSE Enterprise网络安装(三)

[| 不指定 2008/10/09 23:13]
| |
过完十一有些累,研究了一下节前剩下的尾巴。找到了问题的解决方案。那就是在autoyast里面执行一个脚本。下面是关于几个阶段执行的脚本。选择chroot-scripts这个时候进行网卡模块的安装。这样在第一次系统启动前完成驱动的加载。从而进入系统配置环节,完成系统的安装。

参考URL:http://www.suse.com/~ug/autoyast_doc/createprofile.scripts.html

pre-scripts (very early, before anything else really happened)
chroot-scripts (after the package installation, before the first boot)
post-scripts (during the first boot of the installed system, no services running)
init-scripts (during the first boot of the installed system, all servies up and running)



......
</runlevel>

<scripts>
<chroot-scripts config:type="list">
<script>
<filename>instBCM.sh</filename>
<debug config:type="boolean">true</debug>
<location></location>
<interpreter>shell</interpreter>
<source><![CDATA[
#!/bin/bash
#
# After installation, the logfile from this script can be found in
# /var/adm/autoinstall/logs
#
echo "========================================="
echo "... Starting AutoYAST included script ..."
echo "========================================="
rpm -ivh --root=/mnt http://192.168.65.100/brcm-bnx2-kmp-default-1.7.1c_2.6.16.46_0.12-0.i586.rpm
]]>
</source>
</script>
</chroot-scripts>
</scripts>

......


后来客户又有了新的要求,需要添加用户。故而又添加了一个初始化脚本,用于用户的创建。

<scripts>

<chroot-scripts config:type="list">
<script>
<filename>instBCM.sh</filename>
<debug config:type="boolean">true</debug>
<location></location>
<interpreter>shell</interpreter>
<source><![CDATA[
#!/bin/bash
#
# After installation, the logfile from this script can be found in
# /var/adm/autoinstall/logs
#
echo "========================================="
echo "... Starting AutoYAST included script ..."
echo "========================================="
rpm -ivh --root=/mnt http://192.168.65.100/brcm-bnx2-kmp-default-1.7.1c_2.6.16.46_0.12-0.i586.rpm
]]>
</source>
</script>
</chroot-scripts>



<init-scripts config:type="list">
<script>
<filename>initUser.sh</filename>
<debug config:type="boolean">true</debug>
<location></location>
<interpreter>shell</interpreter>
<source><![CDATA[
#!/bin/bash
#
# After installation, the logfile from this script can be found in
# /var/adm/autoinstall/logs
#
echo "========================================="
echo "... Starting AutoYAST included script ..."
echo "========================================="
groupadd -g 1000 admin
groupadd -g 2000 sybase
groupadd -g 2010 oracle
groupadd -g 2020 weblogic
groupadd -g 2030 postfix
groupadd -g 2040 vsftpd
useradd -m -g 2000 -u 2000 sybase
useradd -m -g 2010 -u 2010 oracle
useradd -m -g 2020 -u 2020 weblogic
useradd -m -g 2030 -u 2030 postfix
useradd -m -g 2040 -u 2040 vsftpd
for i in $(seq 1 30)
do
  echo $[999+$i]  $(printf %.2d $i)
  useradd -m -g 1000 -u $[999+$i] kook$(printf %.2d $i)
done
]]>
</source>
</script>
</init-scripts>

</scripts>


本文链接:http://www.52zhe.cn/read.php/200.htm
本文作者:kook(若就博客内所涉及的技术问题交流,请用下面的MSN或Gmail联系我)
联系方式:(MSN:kook#live.com) (Google talk:kookliu)
没有版权:GNU,转载时请注明“转载人”欠本人一顿饭,来日见面之时兑现!谢谢合作!
Tags: ,
by kook | 分类: SuSE | 评论(1) | 引用(0) | 阅读(1203)
xin
2009/06/12 12:26
你好,能给个邮箱么,遇到了和你相同的SuSE问题,有些问题想请教一下。谢谢你。magicsky@gmail.com

ps:你的kook@52zhe.cn邮箱不对...发布过去邮件
kook 回复于 2009/06/12 17:12
那个不是我的邮箱。在google talk上加了你。
分页: 1/1 第一页 1 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]