-1

だから私は /etc/rc3.d にいて、すべての "S" スクリプトを開始し、すべての "K" スクリプトを強制終了したいと考えています。試し# ./S* startていますが、開始引数が表示されません。構文を調整して、開始を S に、終了を K に渡すにはどうすればよいですか?

4

1 に答える 1

2

I have to mention the most direct way: switch to runlevel 2.

telinit 2

If for some reason you don't want to do that, you could explicitly loop over the scripts.

for K in /etc/rc2.d/K*; do "$K" stop;  done
for S in /etc/rc2.d/S*; do "$S" start; done
于 2016-07-08T17:12:48.860 に答える