阿骁 回复于:2002-03-24 18:07:29 |
你可以使用命令: init 5 或 shutdown -i 5 now |
fancy 回复于:2002-03-24 20:40:43 |
init 5不太安全,在有些SUN的机器上会HANG,还是shutdown -y -g0 -i0安全 |
czc9 回复于:2002-03-25 08:58:53 |
你用的是sparc或是intel的,如果是for sparc的,用fancy的建议比较好,如果是用intel的,用init 0比较好,我试过,如果用shutdown -y -g0 -i0 是不能装机的, |
mmmmn 回复于:2002-03-25 09:43:58 |
请问楼上,shutdown和init都是调用init进程读取/etc/rc*.d的内容来进行关机的,到底那里不同?为什么说shutdown比init好? |
joy 回复于:2002-03-26 19:09:35 |
同意 mmmmn 的,都用脚本关机,有什么不一样??? |
bear 回复于:2002-03-26 19:23:28 |
[这个贴子最后由bear在 2002/03/26 07:29pm 编辑] 我碰到过一次,在rc2.d下的一个脚本运行有问题,导致shutdown -y -g0 -i0无法运行结束,而init 0却可以将挂起的脚本或应用kill掉,关掉机器,区别应该就在这里了. "朽木可雕"对不起,我编辑了帖子的主题,因为想放入精华区,让大家更容易分辨内容 |
zhangbin 回复于:2002-03-26 21:03:18 |
init 0执行关机脚本,退到ok. shutdown -y -g0 -i0 产生关机提示,调用init 0. |
bear 回复于:2002-03-27 08:57:01 |
我想应该不是简单的调用init 0. |
czc9 回复于:2002-03-27 09:17:25 |
现把sa238中关于关闭命令的定义帖出来,希望大家有所收获 You can use the init command to shutdown, poweroff, or reboot a system in a clean and orderly manner. It executes the rc0 kill scripts, however, this command does not warn logged in users that the system is being shutdown, and there is no delay. The shutdown command is a script that invokes init to shutdown, poweroff, or reboot the system. It does execute the rc0 kill scripts to shutdown processes and applications gracefully. Unlike the init command, the shutdown command does the following: The halt command performs an immediate shutdown. It does not execute the rc0 kill scripts, it does not notify logged in users, and there is no delay. To shut down the system to stop the Solaris Operating Environment and display the ok prompt: The poweroff command performs an immediate shutdown. It does not execute the rc0 kill scripts, no logged in users are notified, and there is no delay. The reboot command performs an immediate shutdown and brings the system to run level 3 by default. The reboot command differs from the init 6 command because it does not execute the rc0 kill scripts, and it does not notify logged in users. |
mmmmn 回复于:2002-03-27 09:26:57 |
???楼上你看清楚了吗? |
czc9 回复于:2002-03-27 09:40:08 |
有啊,只不过多把halt,reboot poweroff帖出来而已,难道有什么不正确吗,请指正 |
mmmmn 回复于:2002-03-27 10:06:44 |
我们在讨论shutdown命令和init命令的区别,你贴 halt reboot poweroff干什么??? |
czc9 回复于:2002-03-27 10:14:27 |
你太那个了吧,我没有得罪你吧,你何必这样呢,我这样做只不过是想让更多的人了解关闭命令而已 |
joy 回复于:2002-03-27 14:16:12 |
是讨论两位大哥。 你们俩到此为止。 |
newboy 回复于:2002-03-27 14:36:15 |
其实这也没什么,有机会你多试几次就明白了。 不过我个人建议用#/usr/sbin/shutdown -i5 -g0 -y 。 因为这样系统会自动断电,而i0这还需手动断电…… |