以前に ”/etc/rc.d/rc.inet2”で named の 起動部分に 触れました その部 分は 再掲すると
sv:/etc/rc.d# cat rc.inet2 .... # bind #BINDDIR=/var/named #NCPU=`grep '^processor' /proc/cpuinfo | wc -l` #SERV="$SERV named:-c:$BINDDIR/named.conf:-t:$BINDDIR:-u:named:-n:$NCPU" ....
man named の 抜粋
SYNOPSIS named [-4] [-6] [-c config-file] [-d debug-level] [-f] [-g] [-n #cpus] [-p port] [-s] [-t directory] [-u user] [-v] [-x cache-file]
さて named は いずこに
# which named /usr/local/sbin/named
さすれば
/usr/local/sbin/named
named.conf は
# pwd /var/data/jail/named/etc # ls localtime named.conf rndc.conf rndc.key
さすれば
/usr/local/sbin/named -c /var/data/jail/named/etc/named.conf
directory は
# cd ../var/named/ # pwd /var/data/jail/named/var/named # ls bcnet.hosts bcnet.hosts.rev localhost.rev localhost.zone root.hints
さすれば
/usr/local/sbin/named -c /var/data/jail/named/etc/named.conf -t /var/data/jail/named/var/named
user は named そうして -n #cpus は この計算機では 1個 であるから
/usr/local/sbin/named -c /var/data/jail/named/etc/named.conf -t /var/data/jail/named/var/named -u named -n 1
にて 起動するのであろう
では 修正
# cd /etc/rc.d/ # cp rc.inet2 20070914_rc.inet2 # vi rc.inet2 # diff -s rc.inet2 20070914_rc.inet2 21,22d20 < # Fri Sep 14 23:24:13 JST 2007 ADD ONE LINE < /usr/local/sbin/named -c /var/data/jail/named/etc/named.conf -t /var/data/jail/named/var/named -u named -n 1
まあ 再起動すべえ
# shutdown -r now Broadcast message from root (pts/0) (Fri Sep 14 23:40:40 2007): The system is going down for reboot NOW! sv:/var/log# Connection to 192.168.0.9 closed by remote host. Connection to 192.168.0.9 closed. fdopstm@lx:~$ ssh -l aite 192.168.0.9 Password: # cat /var/log/syslog | grep named Sep 14 23:42:11 sv named[170]: none:0: open: /var/data/jail/named/etc/named.conf: file not found Sep 14 23:42:11 sv named[170]: loading configuration: file not found Sep 14 23:42:11 sv named[170]: exiting (due to fatal error)
ワオーーーー!! あきまへんがな??
にゃんたろう 拝!
2007年 9月14日 (金) 23:20:44 JST 作成