话说比尔盖子转换完文件系统之后,发现开机的时候有一些Warning。具体内容如下:

Use of the opts variable is deprecated and will 
be removed in the future. Please use extra_commands or extra_started_commands.

也就是说,只要把init启动脚本中的”opts=”改成”extra_commands=”就OK了。但是,这项工作也太繁琐了。最终在Gentoo论坛上找到了解决方法,翻译过来,比尔盖子再修改一下,大致是:

注意,这个方法很快捷,同时也很脏。容易出现问题!

用root执行:

cd /etc/init.d
mkdir /root/init.d_backups
cp * /root/init.d_backups
sed -e 's:opts=:extra_commands=:g' -e 's:${opts}:${extra_commands}:g' -e 's:$opts:$extra_commands:g' /etc/init.d/* -i

重启。如果系统没挂,而且启动之后的Warning都消失了,就继续用root执行:

rm -r /root/init.d_backups

如果系统挂了,很简单,用LiveCD启动系统,chroot之后(方法你应该懂得),root执行:

rm -r /etc/init.d
cp /root/init.d_backups /etc/init.d

重启,进入系统吧,有Warning就有吧。反正不影响正常使用。最好别再试验了。

反正比尔盖子是一次成功了,重启之后,Warning都消失了!如果你有兴趣,不妨看看原帖:http://forums.gentoo.org/viewtopic-t-465367-start-175.html。