LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1042|回复: 10

我用openrc后,每次启动,网络总是会自动关闭

[复制链接]
发表于 2008-11-15 11:22:11 | 显示全部楼层 |阅读模式
这是我的启动提示

[HTML]
INIT: Entering runlevel: 3
* get_list: `//lib/splash/cache/svcs_stop': No such file or directory
* [color="Red"]Bringing down interface ppp0
*   Removing addresses
*     60.185.186.67/32

[/HTML]

很奇怪,为什么ppp会down掉。
我的网络配置

  1. cat /etc/conf.d/net
  2. config_eth0=( "adsl" )
  3. dns_domain_lo="home"
复制代码


我的rc.conf
cat /etc/rc.conf

  1. # Global OpenRC configuration settings

  2. # Set to "YES" if you want the rc system to try and start services
  3. # in parallel for a slight speed improvement. When running in parallel we
  4. # prefix the service output with it's name as the output will get        
  5. # jumbled up.                                                            
  6. # WARNING: whilst we have improved parallel, it can still potentially lock
  7. # the boot process. Don't file bugs about this unless you can supply      
  8. # patches that fix it without breaking other things!                     
  9. rc_parallel="NO"                                                         

  10. # Set rc_interactive to "YES" and you'll be able to press the I key during
  11. # boot so you can choose to start specific services. Set to "NO" to disable
  12. # this feature.                                                            
  13. rc_interactive="YES"                                                      

  14. # Do we allow any started service in the runlevel to satisfy the depedency
  15. # or do we want all of them regardless of state? For example, if net.eth0
  16. # and net.eth1 are in the default runlevel then with rc_depend_strict="NO"
  17. # both will be started, but services that depend on 'net' will work if either
  18. # one comes up. With rc_depend_strict="YES" we would require them both to   
  19. # come up.                                                                  
  20. rc_depend_strict="YES"                                                      

  21. # Do we allow services to be hotplugged? If not, set to rc_hotplug="NO"
  22. # NOTE: This does not affect anything hotplug/udev/devd related, just the
  23. # starting/stopping of the init.d service triggered by it.               
  24. rc_hotplug="YES"                                                         

  25. # Dynamic /dev managers can trigger coldplug events which cause services to
  26. # start before we are ready for them. If this happens, we can defer these  
  27. # services to start in the boot runlevel. Set rc_coldplug="NO" if you don't
  28. # want this.                                                               
  29. # NOTE: This also affects module coldplugging in udev-096 and higher      
  30. # If you want module coldplugging but not coldplugging of services then you
  31. # can set rc_coldplug="YES" and rc_plug_services="!*"                     
  32. rc_coldplug="YES"                                                         

  33. # Some people want a finer grain over hotplug/coldplug. rc_plug_services is a
  34. # list of services that are matched in order, either allowing or not. By     
  35. # default we allow services through as rc_coldplug/rc_hotplug has to be YES  
  36. # anyway.                                                                    
  37. # Example - rc_plug_services="net.wlan !net.*"                              
  38. # This allows net.wlan and any service not matching net.* to be plugged.     
  39. rc_plug_services="net.*"                                                     

  40. # rc_logger launches a logging daemon to log the entire rc process to
  41. # /var/log/rc.log                                                   
  42. rc_logger="NO"                                                      

  43. # By default we filter the environment for our running scripts. To allow other
  44. # variables through, add them here. Use a * to allow all variables through.   
  45. # rc_env_allow="VAR1 VAR2"                                                   

  46. # By default we assume that all daemons will start correctly.
  47. # However, some do not - a classic example is that they fork and return 0 AND
  48. # then child barfs on a configuration error. Or the daemon has a bug and the
  49. # child crashes. You can set the number of milliseconds start-stop-daemon   
  50. # waits to check that the daemon is still running after starting here.      
  51. # The default is 0 - no checking.                                            
  52. # rc_start_wait=100                                                         

  53. ##############################################################################
  54. # MISC CONFIGURATION VARIABLES                                                
  55. # There variables are shared between many init scripts                        

  56. # Set unicode to YES to turn on unicode support for keyboards and screens.
  57. unicode="YES"                                                            

  58. # Network fstypes. Below is the default.
  59. net_fs_list="afs cifs coda davfs fuse gfs ncpfs nfs nfs4 ocfs2 shfs smbfs"

  60. ##############################################################################
  61. # SERVICE CONFIGURATION VARIABLES                                             
  62. # These variables are documented here, but should be configured in            
  63. # /etc/conf.d/foo for service foo and NOT enabled here unless you            
  64. # really want them to work on a global basis.                                 

  65. # Some daemons are started and stopped via start-stop-daemon.
  66. # We can set some things on a per service basis, like the nicelevel.
  67. #export SSD_NICELEVEL="-19"                                         

  68. # Pass ulimit parameters
  69. #rc_ulimit="-u 30"      

  70. # It's possible to define extra dependencies for services like so
  71. #rc_config="/etc/foo"                                            
  72. #rc_need="openvpn"                                               
  73. #rc_use="net.eth0"                                               
  74. #rc_after="clock"                                                
  75. #rc_before="local"                                               
  76. #rc_provide="!net"                                               

  77. # You can also enable the above commands here for each service. Below is an
  78. # example for service foo.
  79. #rc_foo_config="/etc/foo"
  80. #rc_foo_need="openvpn"
  81. #rc_foo_after="clock"

  82. # You can also remove dependencies.
  83. # This is mainly used for saying which servies do NOT provide net.
  84. #rc_net_tap0_provide="!net"

  85. ##############################################################################
  86. # LINUX SPECIFIC OPTIONS

  87. # This is the number of tty's used in most of the rc-scripts (like
  88. # consolefont, numlock, etc ...)
  89. rc_tty_number=12

  90. # Use this variable to control the /dev management behavior.
  91. #  devfs  - use devfs (requires sys-fs/devfsd)
  92. #  mdev   - use mdev (requires sys-apps/busybox)
  93. #  udev   - use udev (requires sys-fs/udev)
  94. #  static - let the user manage /dev (YOU need to create ALL device nodes)
  95. # Leave it blank to let rc work it out (udev, mdev, devfs, static)
  96. #rc_devices=""

  97. # UDEV OPTION:
  98. # Set to "yes" if you want to save /dev to a tarball on shutdown
  99. # and restore it on startup.  This is useful if you have a lot of
  100. # cu# Global OpenRC configuration settings

  101. # Set to "YES" if you want the rc system to try and start services
  102. # in parallel for a slight speed improvement. When running in parallel we
  103. # prefix the service output with it's name as the output will get        
  104. # jumbled up.                                                            
  105. # WARNING: whilst we have improved parallel, it can still potentially lock
  106. # the boot process. Don't file bugs about this unless you can supply      
  107. # patches that fix it without breaking other things!                     
  108. rc_parallel="NO"                                                         

  109. # Set rc_interactive to "YES" and you'll be able to press the I key during
  110. # boot so you can choose to start specific services. Set to "NO" to disable
  111. # this feature.                                                            
  112. rc_interactive="YES"                                                      

  113. # Do we allow any started service in the runlevel to satisfy the depedency
  114. # or do we want all of them regardless of state? For example, if net.eth0
  115. # and net.eth1 are in the default runlevel then with rc_depend_strict="NO"
  116. # both will be started, but services that depend on 'net' will work if either
  117. # one comes up. With rc_depend_strict="YES" we would require them both to   
  118. # come up.                                                                  
  119. rc_depend_strict="YES"                                                      

  120. # Do we allow services to be hotplugged? If not, set to rc_hotplug="NO"
  121. # NOTE: This does not affect anything hotplug/udev/devd related, just the
  122. # starting/stopping of the init.d service triggered by it.               
  123. rc_hotplug="YES"                                                         

  124. # Dynamic /dev managers can trigger coldplug events which cause services to
  125. # start before we are ready for them. If this happens, we can defer these  
  126. # services to start in the boot runlevel. Set rc_coldplug="NO" if you don't
  127. # want this.                                                               
  128. # NOTE: This also affects module coldplugging in udev-096 and higher      
  129. # If you want module coldplugging but not coldplugging of services then you
  130. # can set rc_coldplug="YES" and rc_plug_services="!*"                     
  131. rc_coldplug="YES"                                                         

  132. # Some people want a finer grain over hotplug/coldplug. rc_plug_services is a
  133. # list of services that are matched in order, either allowing or not. By     
  134. # default we allow services through as rc_coldplug/rc_hotplug has to be YES  
  135. # anyway.                                                                    
  136. # Example - rc_plug_services="net.wlan !net.*"                              
  137. # This allows net.wlan and any service not matching net.* to be plugged.     
  138. rc_plug_services="net.*"                                                     

  139. # rc_logger launches a logging daemon to log the entire rc process to
  140. # /var/log/rc.log                                                   
  141. rc_logger="NO"                                                      

  142. # By default we filter the environment for our running scripts. To allow other
  143. # variables through, add them here. Use a * to allow all variables through.   
  144. # rc_env_allow="VAR1 VAR2"                                                   

  145. # By default we assume that all daemons will start correctly.
  146. # However, some do not - a classic example is that they fork and return 0 AND
  147. # then child barfs on a configuration error. Or the daemon has a bug and the
  148. # child crashes. You can set the number of milliseconds start-stop-daemon   
  149. # waits to check that the daemon is still running after starting here.      
  150. # The default is 0 - no checking.                                            
  151. # rc_start_wait=100                                                         

  152. ##############################################################################
  153. # MISC CONFIGURATION VARIABLES                                                
  154. # There variables are shared between many init scripts                        

  155. # Set unicode to YES to turn on unicode support for keyboards and screens.
  156. unicode="YES"                                                            

  157. # Network fstypes. Below is the default.
  158. net_fs_list="afs cifs coda davfs fuse gfs ncpfs nfs nfs4 ocfs2 shfs smbfs"

  159. ##############################################################################
  160. # SERVICE CONFIGURATION VARIABLES                                             
  161. # These variables are documented here, but should be configured in            
  162. # /etc/conf.d/foo for service foo and NOT enabled here unless you            
  163. # really want them to work on a global basis.                                 

  164. # Some daemons are started and stopped via start-stop-daemon.
  165. # We can set some things on a per service basis, like the nicelevel.
  166. #export SSD_NICELEVEL="-19"                                         

  167. # Pass ulimit parameters
  168. #rc_ulimit="-u 30"      

  169. # It's possible to define extra dependencies for services like so
  170. #rc_config="/etc/foo"                                            
  171. #rc_need="openvpn"                                               
  172. #rc_use="net.eth0"                                               
  173. #rc_after="clock"                                                
  174. #rc_before="local"                                               
  175. #rc_provide="!net"                                               

  176. # You can also enable the above commands here for each service. Below is an
  177. # example for service foo.
  178. #rc_foo_config="/etc/foo"
  179. #rc_foo_need="openvpn"
  180. #rc_foo_after="clock"

  181. # You can also remove dependencies.
  182. # This is mainly used for saying which servies do NOT provide net.
  183. #rc_net_tap0_provide="!net"

  184. ##############################################################################
  185. # LINUX SPECIFIC OPTIONS

  186. # This is the number of tty's used in most of the rc-scripts (like
  187. # consolefont, numlock, etc ...)
  188. rc_tty_number=12

  189. # Use this variable to control the /dev management behavior.
  190. #  devfs  - use devfs (requires sys-fs/devfsd)
  191. #  mdev   - use mdev (requires sys-apps/busybox)
  192. #  udev   - use udev (requires sys-fs/udev)
  193. #  static - let the user manage /dev (YOU need to create ALL device nodes)
  194. # Leave it blank to let rc work it out (udev, mdev, devfs, static)
  195. #rc_devices=""

  196. # UDEV OPTION:
  197. # Set to "yes" if you want to save /dev to a tarball on shutdown
  198. # and restore it on startup.  This is useful if you have a lot of
  199. # custom device nodes that udev does not handle/know about.
  200. rc_device_tarball="NO"

  201. # Sets the level at which logging of messages is done to the
  202. # console.  See dmesg(8) for more info.
  203. dmesg_level="1"stom device nodes that udev does not handle/know about.
  204. rc_device_tarball="NO"

  205. # Sets the level at which logging of messages is done to the
  206. # console.  See dmesg(8) for more info.
  207. dmesg_level="1"
复制代码
发表于 2008-11-15 13:25:15 | 显示全部楼层
楼主可以去#gentoo-bsd 问一问 uberlord.
回复 支持 反对

使用道具 举报

发表于 2008-11-15 16:23:31 | 显示全部楼层
config_eth0=( "adsl" )


改成 config_eth0="adsl"
试试(有括号的是未升级前的老式的脚步格式),
另外你可以参考: /usr/share/doc/openrc/net.example里面的内容。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-16 21:47:41 | 显示全部楼层
Post by shellworld;1908936
config_eth0=( "adsl" )


改成 config_eth0="adsl"
试试(有括号的是未升级前的老式的脚步格式),
另外你可以参考: /usr/share/doc/openrc/net.example里面的内容。


/usr/share/doc/openrc/net.example的内容我已经仔细看过了有关adsl的章节。而且去掉括号也没有用,还是老样子。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-28 21:33:29 | 显示全部楼层
问题尚未解决,顶一下。
回复 支持 反对

使用道具 举报

发表于 2008-11-30 01:27:52 | 显示全部楼层
怀疑你的openrc没有安装完整。
可以重新安装一次openrc。

查看//lib/splash/cache/svcs_stop是什么东西来的。
确认错误提示,可能会你有很大帮助。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-30 19:28:09 | 显示全部楼层
Post by SCys;1916522
怀疑你的openrc没有安装完整。
可以重新安装一次openrc。

查看//lib/splash/cache/svcs_stop是什么东西来的。
确认错误提示,可能会你有很大帮助。


相应路径下根本没这个文件。自建一个同样的出错提示。
回复 支持 反对

使用道具 举报

发表于 2008-11-30 20:13:43 | 显示全部楼层

  1. /${中间有个变量,可是变量无法被openrc解释}/lib/splash/cache/svcs_stop
复制代码


问题出现上面,你可以换一个版本openrc试试,如果是bug就等下修正。
换了还是不行,就说明你写的配置中间一些字母出现问题。


  1. ...
  2. #rc_plug_services="net.*"
  3. rc_plug_services="net.lo  net.eth0 net.ppp0" # 试试修改成一步步来的形式,或是
  4. #rc_plug_services=" net.* "                            # 前后加一个空格。
  5. ...
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-12-15 18:06:48 | 显示全部楼层
安装openrc的时候,开机出现ppp0的一个错误,提示我需要创建 一个 net.ppp0->net.lo的链接 。创建好后ppp0就能起来了。我的问题会不会和这个有关?
回复 支持 反对

使用道具 举报

发表于 2008-12-15 18:23:35 | 显示全部楼层
LZ你那个是adsl的ppp连接吧?
你还不如直接进adsl的cat! 直接让他支持dhcp!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表