[Ubuntu-zh] 帮我核对一下/etc/rc.local文件的内容好吗?

listofx listofx在gmail.com
星期五 五月 28 10:30:32 BST 2010


我在rc.local中添加了一点东西。见下面代码,touch一行的结果,可以在tmp目录
下找到,表明该文件被执行
但是下一行的环境变量设置就有问题:重新启动后,是没有该环境变量的。为什么
呢?



#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
touch /tmp/hell123.test
export MyVar3344='just a try'
exit 0


On 五, 2010-05-28 at 09:51 +0800, Ivan wrote:
> 默认是没有INIT_HALT=HALT
> --
> Ivan Chen
> Twitter | https://twitter.com/fireshort
> 
> 
> 
> 2010/5/28 listofx <listofx在gmail.com>
> 
> > 我怀疑自己曾经添加了一行(INIT_HALT=HALT). 且不说改行前面没有export语
> > 句。
> > 原来的脚本是没有这一行的,我不知道是不是,帮我核对一下好不好
> >
> > #!/bin/sh -e
> > #
> > # rc.local
> > #
> > # This script is executed at the end of each multiuser runlevel.
> > # Make sure that the script will "exit 0" on success or any other
> > # value on error.
> > #
> > # In order to enable or disable this script just change the execution
> > # bits.
> > #
> > # By default this script does nothing.
> > INIT_HALT=HALT
> > exit 0
> >
> >
> >
> > --
> > ubuntu-zh mailing list
> > ubuntu-zh在lists.ubuntu.com
> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-zh
> >
> -------------- 涓涓ㄥ --------------
> 一个HTML附件被移除...
> URL: https://lists.ubuntu.com/archives/ubuntu-zh/attachments/20100528/26cf5c49/attachment.htm 





关于邮件列表 ubuntu-zh 的更多信息