回文章列表
作者ThinkerYzu.bbs@bbs.sayya.org (Thinker), 信區: 386bsd
標題Re: =?Big5?Q?=BD=D0=B1=D0=A4@=AD=D3=B2=C2=B0=DD=C3D=C3=F6=A9=F3/etc/rc.conf?=
時間SayYA 資訊站 (Sat Nov 11 02:07:32 2006)
轉信站: GIBBS!ccnews.ncku!news.ccns.ncku!news.mksh.phc!news.nsysu!news.cis.nctu
Origin: kenduest.math.nctu.edu.tw

※ 引述《parus1974@kkcity.com.tw (被當的法師學徒)》之銘言:
> RC.CONF本來就是執行指令
> ※ 引述《chiouss.bbs@ptt.cc (Alive a Life)》之銘言:
> > 我一直不懂,rc.conf 幾時可以放 command 進去執行了?
> > NAME
> >      rc.conf -- system configuration information

來解釋一下好了...
/etc/rc.conf 是一個 script 檔,只是其用途是專門手以設定一些變數。
其它 script (/etc/rc.d/*) 則是執行這個 /etc/rc.conf 以讀取變數值。
在任何一個 /bin/sh 的 shell script 執行下面指令
    . /etc/rc.conf
則會使 shell 在目前的 namespace 執行 /etc/rc.conf 這個 script,也就是
/etc/rc.conf 執行中所產生的變數都會出現在呼叫者的變數空間中。

結束~~~

--
thinker@branda.to thinker.li@gmail.com
http://heaven.branda.to/~thinker/GinGin_CGI.py
--
※ Origin: SayYA 資訊站 <bbs.sayya.org> 
◆ From: 219-84-9-197-adsl-tpe.dynamic.so-net.net.tw
文章選讀←離開[主題上]主題下(k)上篇(j)下篇S/a搜尋 G串列 TAB精華 ↑↓捲 Pg/Space翻