[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[debian-users:41781] Re: bind9 の起動について
- From: Hideki Yamane <henrich@xxxxxxxxxxxxxx>
- Subject: [debian-users:41781] Re: bind9 の起動について
- Date: Sun, 24 Oct 2004 02:33:22 +0900
- List-help: <mailto:debian-users-ctl@debian.or.jp?body=help>
- List-id: debian-users.debian.or.jp
- List-owner: <mailto:debian-users-admin@debian.or.jp>
- List-post: <mailto:debian-users@debian.or.jp>
- List-software: fml [fml 4.0.3 release (20011202/4.0.3)]
- List-unsubscribe: <mailto:debian-users-ctl@debian.or.jp?body=unsubscribe>
- X-ml-info: If you have a question, send e-mail with the body "help" (without quotes) to the address debian-users-ctl@debian.or.jp; help=<mailto:debian-users-ctl@debian.or.jp?body=help>
- X-ml-name: debian-users
- X-mlserver: fml [fml 4.0.3 release (20011202/4.0.3)]; post only (only members can post)
- X-original-to: debian-users@debian.or.jp
- X-spam-level:
- X-spam-status: No, hits=-0.8 required=10.0 tests=IN_REP_TO,ISO2022JP_BODY,ISO2022JP_CHARSET, PATCH_UNIFIED_DIFF,RCVD_IN_ORBS,RCVD_IN_OSIRUSOFT_COM, REFERENCES,SIGNATURE_SHORT_SPARSE,SPAM_PHRASE_00_01, X_OSIRU_OPEN_RELAY version=2.44
- References: <20041023.144509.730552068.free-zep@xxxxxxxxxxxxxxxxx> <20041023210715.FFAC.JPKODAKSAN@xxxxxxxxxxx> <20041023.225002.424243897.free-zep@xxxxxxxxxxxxxxxxx>
- Message-id: <200410231733.i9NHXJuM029409@xxxxxxxxxxxxxxxxx>
- X-mail-count: 41781
- X-mailer: Datula version 1.52.01 for Windows
やまね です。
"Sat, 23 Oct 2004 22:50:16 +0900", "joe"
"[debian-users:41779] Re: bind9 の起動について"
>rpm 系のディストロでは、/var/run/named/ に pid ファイルを書くので、
>/var/run/named/ のパーミッションが適正なら大丈夫だったのです。
woody だとそうみたいですが、今の bind9 では
if start-stop-daemon --start --quiet --exec /usr/sbin/named \
--pidfile /var/run/bind/run/named.pid -- $OPTIONS; then
とあるので、少なくとも Debian (sid) では /var/run/bind/run/named.pid
だと思います。init.d の差分をとりましたが、結構変わってる
ようです。
----------------------------------------------------------------------------------
--- bind9-9.2.1/debian/init.d Sun Oct 24 02:23:50 2004
+++ bind9-9.2.4/debian/init.d Sun Oct 24 02:28:11 2004
@@ -2,21 +2,43 @@
PATH=/sbin:/bin:/usr/sbin:/usr/bin
-# for a chrooted server: "-u nobody -t /var/lib/named"
-OPTS=""
+# for a chrooted server: "-u bind -t /var/lib/named"
+# Don't modify this line, change or create /etc/default/bind9.
+OPTIONS=""
-test -x /usr/sbin/named || exit 0
+test -f /etc/default/bind9 && . /etc/default/bind9
+
+test -x /usr/sbin/rndc || exit 0
case "$1" in
start)
echo -n "Starting domain name service: named"
- start-stop-daemon --start --quiet \
- --pidfile /var/run/named.pid --exec /usr/sbin/named -- $OPTS
+
+ modprobe capability >/dev/null 2>&1 || true
+
+ # dirs under /var/run can go away on reboots.
+ mkdir -p /var/run/bind/run
+ chmod 775 /var/run/bind/run
+ chown root:bind /var/run/bind/run >/dev/null 2>&1 || true
+
+ if [ ! -x /usr/sbin/named ]; then
+ echo "named binary missing - not starting"
+ exit 1
+ fi
+ if start-stop-daemon --start --quiet --exec /usr/sbin/named \
+ --pidfile /var/run/bind/run/named.pid -- $OPTIONS; then
+ if [ -x /sbin/resolvconf ] ; then
+ echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo
+ fi
+ fi
echo "."
;;
stop)
echo -n "Stopping domain name service: named"
+ if [ -x /sbin/resolvconf ]; then
+ /sbin/resolvconf -d lo
+ fi
/usr/sbin/rndc stop
echo "."
;;
--
Regards,
Hideki Yamane <henrich @ samba.gr.jp/iijmio-mail.jp>
Key fingerprint = 4555 82ED 38B6 C870 E099 388C 22ED 21CB C4C7 264B