From ff18822caa91cad3143f1bc37f7b5e3039f78280 Mon Sep 17 00:00:00 2001 From: fgerlits Date: Sat, 13 Aug 2005 10:07:51 +0000 Subject: [PATCH] changed from dh_installinit to manual init script installation because invoke-rc.d does not work on the knoppix hdd install (it is linked to /bin/true, so 'command -v invoke-rc.d' returns true, but it does not do anything, of course) --- .../livesupport-station.init => bin/livesupport-station} | 0 livesupport/etc/Makefile.in | 3 ++- livesupport/etc/debian/livesupport-station.postinst | 5 +++++ livesupport/etc/debian/livesupport-station.postrm | 4 ++++ livesupport/etc/debian/livesupport-station.preinst | 9 ++------- livesupport/etc/debian/livesupport-station.prerm | 9 +++++++-- livesupport/etc/debian/rules | 6 +++++- 7 files changed, 25 insertions(+), 11 deletions(-) rename livesupport/{etc/debian/livesupport-station.init => bin/livesupport-station} (100%) mode change 100644 => 100755 diff --git a/livesupport/etc/debian/livesupport-station.init b/livesupport/bin/livesupport-station old mode 100644 new mode 100755 similarity index 100% rename from livesupport/etc/debian/livesupport-station.init rename to livesupport/bin/livesupport-station diff --git a/livesupport/etc/Makefile.in b/livesupport/etc/Makefile.in index d72da9519..0bea94f96 100644 --- a/livesupport/etc/Makefile.in +++ b/livesupport/etc/Makefile.in @@ -21,7 +21,7 @@ # # # Author : $Author: fgerlits $ -# Version : $Revision: 1.18 $ +# Version : $Revision: 1.19 $ # Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/etc/Makefile.in,v $ #------------------------------------------------------------------------------- @@ -431,6 +431,7 @@ install: setup compile create_database install_modules install_products ${CP} ${ETC_DIR}/apache/*.conf ${USR_ETC_DIR}/apache ${MKDIR} ${USR_BIN_DIR} ${CP} ${BIN_DIR}/postInstallStation.sh ${USR_BIN_DIR} + ${CP} ${BIN_DIR}/livesupport-station ${USR_BIN_DIR} ${CP} ${ETC_DIR}/pg_hba.conf ${USR_ETC_DIR} create_database: diff --git a/livesupport/etc/debian/livesupport-station.postinst b/livesupport/etc/debian/livesupport-station.postinst index bff8df8b9..f68a401db 100644 --- a/livesupport/etc/debian/livesupport-station.postinst +++ b/livesupport/etc/debian/livesupport-station.postinst @@ -30,6 +30,11 @@ case "$1" in $installdir/bin/postInstallStation.sh --directory $installdir \ --apache-group $apache_group \ --www-root $apache_docroot + + # register and start the livesupport scheduler daemon + cp -f $installdir/bin/livesupport-station /etc/init.d + update-rc.d livesupport-station defaults 92 || true + /etc/init.d/livesupport-station start || true ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/livesupport/etc/debian/livesupport-station.postrm b/livesupport/etc/debian/livesupport-station.postrm index e96b5769c..1ff5f56e8 100644 --- a/livesupport/etc/debian/livesupport-station.postrm +++ b/livesupport/etc/debian/livesupport-station.postrm @@ -46,6 +46,10 @@ check_exe() { case "$1" in remove|upgrade|failed-upgrade|abort-install|abort-upgrade) + # remove the init script + rm -f /etc/init.d/livesupport-station + update-rc.d livesupport-station remove + # remove the symlink to the livesupport web pages rm -f $apache_docroot/livesupport diff --git a/livesupport/etc/debian/livesupport-station.preinst b/livesupport/etc/debian/livesupport-station.preinst index 71a696479..08d0b4758 100644 --- a/livesupport/etc/debian/livesupport-station.preinst +++ b/livesupport/etc/debian/livesupport-station.preinst @@ -92,13 +92,8 @@ case "$1" in check_group_permission $apache_group || exit 1; if [ "$1" = "upgrade" ]; then - if command -v invoke-rc.d >/dev/null 2>&1 ; then - invoke-rc.d livesupport-station stop || true - invoke-rc.d livesupport-station kill || true - else - /etc/init.d/livesupport-station stop || true - /etc/init.d/livesupport-station kill || true - fi + /etc/init.d/livesupport-station stop || true + /etc/init.d/livesupport-station kill || true fi ;; diff --git a/livesupport/etc/debian/livesupport-station.prerm b/livesupport/etc/debian/livesupport-station.prerm index 289ffa79c..7387047cb 100644 --- a/livesupport/etc/debian/livesupport-station.prerm +++ b/livesupport/etc/debian/livesupport-station.prerm @@ -19,9 +19,14 @@ set -e case "$1" in remove|upgrade|deconfigure) - ;; + # stop the livesupport scheduler daemon + /etc/init.d/livesupport-station stop || true + /etc/init.d/livesupport-station kill || true + ;; + failed-upgrade) - ;; + ;; + *) echo "prerm called with unknown argument \`$1'" >&2 exit 1 diff --git a/livesupport/etc/debian/rules b/livesupport/etc/debian/rules index 43098340e..9ba7e54dd 100755 --- a/livesupport/etc/debian/rules +++ b/livesupport/etc/debian/rules @@ -98,6 +98,7 @@ install-arch: mv -f $(CURDIR)/debian/livesupport/opt/livesupport/bin/scheduler \ $(CURDIR)/debian/livesupport/opt/livesupport/bin/scheduler.sh \ $(CURDIR)/debian/livesupport/opt/livesupport/bin/postInstallStation.sh \ + $(CURDIR)/debian/livesupport/opt/livesupport/bin/livesupport-station \ $(CURDIR)/debian/livesupport-station/opt/livesupport/bin mv -f $(CURDIR)/debian/livesupport/opt/livesupport/etc/scheduler.xml* \ $(CURDIR)/debian/livesupport/opt/livesupport/etc/odbc* \ @@ -156,7 +157,10 @@ binary-common: # dh_installemacsen # dh_installpam # dh_installmime - dh_installinit --update-rcd-params="defaults 92" +# Replaced dh_installinit with manual init script installation +# because invoke.rc-d is linked to /bin/true in the knoppix hdd install. +# Should be changed back when/if knoppix is fixed. +# dh_installinit --update-rcd-params="defaults 92" # dh_installcron # dh_installinfo # dh_installman