by hand.
This works around a bug where init scripts are started before Python
modules have been fully installed.
svn path=/trunk/packages/invirt-dev/; revision=2630
mkdir -p /srv/git
fi
- invirt-build-conf
-
cat >>/etc/sudoers <<EOF
### BEGIN invirt-dev
%repo ALL=(repository) ALWAYS_SET_HOME,NOPASSWD: /usr/bin/reprepro
### END invirt-dev
EOF
+
echo "-----"
echo "invirt-dev: run"
echo " adduser --disabled-password \$user"
exit 1
;;
esac
+
+if [ -x /etc/init.d/invirt-dev ]; then
+ if hash invoke-rc.d 2>/dev/null; then
+ invoke-rc.d invirt-dev start
+ else
+ /etc/init.d/invirt-dev start
+ fi
+fi
case "$1" in
remove|upgrade|deconfigure)
- perl -i.bak -ne 's%^### (BEGIN|END) invirt-dev\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers
+ perl -i.bak -ne 's%^### (BEGIN|END) invirt-dev\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers
;;
failed-upgrade)
;;
esac
+if [ -x /etc/init.d/invirt-dev ]; then
+ if hash invoke-rc.d 2>/dev/null; then
+ invoke-rc.d invirt-dev stop
+ else
+ /etc/init.d/invirt-dev stop
+ fi
+fi
+
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
DEB_PYTHON_SYSTEM=pysupport
+# We use --no-start instead of letting dh_installinit do its thing
+# because, in the postinst, dh_installinit's automatically added code
+# runs before dh_pysupport's automatically added code.
+#
+# This means that when the initscript is started, Python modules
+# installed by the package haven't been fully installed yet.
+DEB_DH_INSTALLINIT_ARGS += --no-start
+
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk