でびあんパケジについて色々
ソースパケジを眺めていたのですが、バイナリの中身を見ないと微妙なの? と言いつつ lenny な仮想マシンにて
# apt-get install -d apache2
ってヤッてみて適当なトコにコピー後に以下。
# ar vx apache2.2-common_2.2.9-10_i386.deb x - debian-binary x - control.tar.gz x - data.tar.gz # tar zxvf control.tar.gz (略 #
で postinst の中身を見たらケツに以下なソレがある。
# Automatically added by dh_installinit
if [ -x "/etc/init.d/apache2" ]; then
update-rc.d apache2 defaults 91 09 >/dev/null || exit
fi
# End automatically added sectionこのあたりが redundant な所以かと。むむむ、と言いつつ unbound で同様のナニで、postinst が以下な形になっている。
#!/bin/sh -e
if [ "$1" = configure ]; then
if ! getent passwd unbound >/dev/null; then
adduser --quiet --system --group --no-create-home --home /var/lib/unbound unbound
chown unbound:unbound /var/lib/unbound
fi
fi
# Automatically add by dh_installinit
if [ -x "/etc/init.d/unbound" ]; then
update-rc.d unbound defaults >/dev/null
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d unbound start || exit $?
else
/etc/init.d/unbound start || exit $?
fi
fi
# End automatically added sectionなんとなく微妙。ただ、昨晩 apt-get source でオトした unbound.postinst のケツに自動で追加されてそげに見えるんですが、apache2 とは追加されてるソレが若干違う。