您尚未登录。

楼主 #1 2020-06-02 17:28:48

我思故我在
会员
注册时间: 2019-09-03
已发帖子: 244
积分: 243.5

如何让 /etc/init.d/ 这个目录里面的脚本能自动开机跑起来?

/etc/init.d/

S01syslogd
S02sysctl   
S40network   
S50dropbear
S02klogd
S20urandom
S41dhcpcd
S80dnsmasq

手动执行才会跑:

#
# /etc/init.d/S41dhcpcd restart
Stopping dhcpcd...
stopped /sbin/dhcpcd (pid 226)
Starting dhcpcd...
no interfaces have a carrier
forked to background, child pid 255
# 
# 
# 
# /etc/init.d/S01syslogd restart
Stopping syslogd: OK
Starting syslogd: OK
# 
# 
# 
#  /etc/init.d/S50dropbear restart
Stopping dropbear sshd: OK
Starting dropbear sshd: OK
# 
# 
# 
# ps
PID   USER     COMMAND
    1 root     init
    2 root     [kthreadd]
    3 root     [rcu_gp]
    4 root     [rcu_par_gp]
    5 root     [kworker/0:0-pm]
    6 root     [kworker/0:0H-kb]
    7 root     [kworker/u8:0-br]
    8 root     [mm_percpu_wq]
    9 root     [ksoftirqd/0]
   10 root     [rcu_sched]
   11 root     [migration/0]
   12 root     [cpuhp/0]
   13 root     [cpuhp/1]
   14 root     [migration/1]
   15 root     [ksoftirqd/1]
   16 root     [kworker/1:0-pm]
   17 root     [kworker/1:0H-kb]
   18 root     [cpuhp/2]
   19 root     [migration/2]
   20 root     [ksoftirqd/2]
   21 root     [kworker/2:0-eve]
   22 root     [kworker/2:0H-kb]
   23 root     [cpuhp/3]
   24 root     [migration/3]
   25 root     [ksoftirqd/3]
   26 root     [kworker/3:0-pm]
   27 root     [kworker/3:0H-kb]
   28 root     [kdevtmpfs]
   29 root     [netns]
   30 root     [kworker/0:1-eve]
   31 root     [kworker/1:1-rcu]
   32 root     [kworker/2:1-mm_]
   33 root     [oom_reaper]
   34 root     [writeback]
   35 root     [kcompactd0]
   36 root     [crypto]
   37 root     [kblockd]
   38 root     [ata_sff]
   39 root     [watchdogd]
   40 root     [rpciod]
   41 root     [kworker/u9:0]
   42 root     [xprtiod]
   43 root     [kswapd0]
   44 root     [nfsiod]
   46 root     [kworker/u8:1-ev]
   68 root     [spi0]
   69 root     [kworker/3:1-mm_]
   70 root     [irq/23-sunxi-mm]
   71 root     [irq/24-sunxi-mm]
   72 root     [kworker/1:2-eve]
   73 root     [irq/25-sunxi-mm]
   74 root     [kworker/1:3-mm_]
   75 root     [kworker/1:4]
   76 root     [kworker/1:1H-kb]
   77 root     [kworker/0:1H-kb]
   79 root     [kworker/3:2-mm_]
   80 root     [kworker/3:1H-kb]
   81 root     [kworker/3:2H]
   82 root     [jbd2/mmcblk0p2-]
   83 root     [ext4-rsv-conver]
   84 root     [kworker/0:2H]
   86 root     [kworker/2:1H-kb]
  104 root     /sbin/klogd -n
  131 root     [kworker/u8:2-ev]
  134 root     [kworker/u8:3]
  144 root     [cfg80211]
  152 root     -/bin/sh
  155 root     [kworker/2:2H]
  156 root     [kworker/0:2-eve]
  157 root     [kworker/2:2]
  159 root     [brcmf_wq/mmc1:0]
  161 root     [brcmf_wdog/mmc1]
  162 root     [ksdioirqd/mmc1]
  183 root     wpa_supplicant -i wlan0 -D wext -c /etc/wpa_supplicant.conf -B
  255 root     /sbin/dhcpcd -f /etc/dhcpcd.conf
  263 root     /sbin/syslogd -n
  274 root     /usr/sbin/dropbear -R
  276 root     ps
# 

如何让他开机就执行?

离线

楼主 #3 2020-06-02 19:38:44

我思故我在
会员
注册时间: 2019-09-03
已发帖子: 244
积分: 243.5

Re: 如何让 /etc/init.d/ 这个目录里面的脚本能自动开机跑起来?

感谢楼上朋友提醒, 刚刚再次确认, 确实是开机自动执行的.

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn