<title> </titel>
-c オプションでchrootさせるようにした named は、SIGHUP を送ると設定ファイルの再読み込みができなくてコケる。
ある意味あたり前なんだが、普段は daemontools 下で動かすようにしているためコケても勝手に再起動して、 そういう挙動について今まで気にする必要がなかった。
FreeBSD標準の/etc/rc.confでの指定だけで動かしていたとあるところで、
土曜の0時過ぎにコケるのを nagios 監視で検出することで発見できた。
ネットワークなだけにがんばって適用。
NetCommunity X7000 も対応する予定。
N900iLは 802.11b なので無線LANアクセスポイントが別に必要。 なんだか間抜けな構成だ。
WinMerge 日本語版で困ってないけど、3画面以上必要な時に。 Subversionリポジトリも直接対象にできるのが便利。
SELinux よりも優先度高くして勉強せねば。
randomデバイスが devfs になったりしているので、そのへんは /etc/rc.d/named からパクって run スクリプトを作成してみた。
#!/bin/sh
PATH=/usr/sbin:/usr/local/bin:/usr/bin:/bin:/sbin
export PATH
named_chrootdir=/var/named
chroot_autoupdate()
{
# Create (or update) the chroot directory structure
#
if [ -f /etc/mtree/BIND.chroot.dist ]; then
mtree -deU -f /etc/mtree/BIND.chroot.dist \
-p ${named_chrootdir}
else
warn "/etc/mtree/BIND.chroot.dist missing,"
warn "chroot directory structure not updated"
fi
# Create /etc/namedb symlink
#
if [ ! -L /etc/namedb ]; then
if [ -d /etc/namedb ]; then
warn "named chroot: /etc/namedb is a directory!"
elif [ -e /etc/namedb ]; then
warn "named chroot: /etc/namedb exists!"
else
ln -s ${named_chrootdir}/etc/namedb /etc/namedb
fi
fi
# Mount a devfs in the chroot directory if needed
#
if [ ! -c ${named_chrootdir}/dev/random -o \
! -c ${named_chrootdir}/dev/null ]; then
umount ${named_chrootdir}/dev 2>/dev/null
mount_devfs devfs ${named_chrootdir}/dev
fi
devfs -m ${named_chrootdir}/dev rule apply hide
devfs -m ${named_chrootdir}/dev rule apply path null unhide
devfs -m ${named_chrootdir}/dev rule apply path random unhide
# Copy local timezone information if it is not up to date.
#
if [ -f /etc/localtime ]; then
cmp -s /etc/localtime "${named_chrootdir}/etc/localtime" || \
cp -p /etc/localtime "${named_chrootdir}/etc/localtime"
fi
}
chroot_autoupdate
exec 2>&1
exec softlimit -c 0 \
envdir ./env \
named -f -c ${named_chrootdir}/named.conf -u bind -t ${named_chrootdir}
マシン移転をする時によく出ていて、昔はよく消していた。 最近はサーバ側の ssh_host*key も移転するようにしてるけど。 今でも ssh_host*key のbit数を増やしたいなと思うことはある。
あとはあれだ、ssh 2段重ねで localhost に ssh する時は、~/.ssh/known_hosts から localhost のエントリを消すな。
……「~/.ssh/known_hostsを消せ」ってファイルそのものを消去しろってことか。今気付いた。ありえねえ〜(俺がよく消しているのは該当する行)
Tigerにあわせて買うかなー