svn commit: r766227 - in /ofbiz/trunk/debian: ofbiz-applications.postinst ofbiz-framework.postinst ofbiz-framework.triggers

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r766227 - in /ofbiz/trunk/debian: ofbiz-applications.postinst ofbiz-framework.postinst ofbiz-framework.triggers

doogie-3
Author: doogie
Date: Sat Apr 18 06:05:15 2009
New Revision: 766227

URL: http://svn.apache.org/viewvc?rev=766227&view=rev
Log:
Remove ofbiz-upgrade trigger support; all packages now activate
ofbiz-install trigger, and each package must stop ofbiz itself.

Modified:
    ofbiz/trunk/debian/ofbiz-applications.postinst
    ofbiz/trunk/debian/ofbiz-framework.postinst
    ofbiz/trunk/debian/ofbiz-framework.triggers

Modified: ofbiz/trunk/debian/ofbiz-applications.postinst
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/ofbiz-applications.postinst?rev=766227&r1=766226&r2=766227&view=diff
==============================================================================
--- ofbiz/trunk/debian/ofbiz-applications.postinst (original)
+++ ofbiz/trunk/debian/ofbiz-applications.postinst Sat Apr 18 06:05:15 2009
@@ -1,13 +1,19 @@
 #!/bin/sh
 
 . /usr/share/debconf/confmodule
-case "$1" in
- (configure|reconfigure)
- if [ "z" = "z$2" ]; then
- dpkg-trigger --no-await ofbiz-install
+ofbiz_init_invoke() {
+ if [ -x "/etc/init.d/ofbiz" ]; then
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d ofbiz $1 || exit $?
  else
- dpkg-trigger --no-await ofbiz-upgrade
+ /etc/init.d/ofbiz $1 || exit $?
  fi
+ fi
+}
+case "$1" in
+ (configure|reconfigure)
+ ofbiz_init_invoke stop
+ dpkg-trigger --no-await ofbiz-install
  ;;
 esac
 #DEBHELPER#

Modified: ofbiz/trunk/debian/ofbiz-framework.postinst
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/ofbiz-framework.postinst?rev=766227&r1=766226&r2=766227&view=diff
==============================================================================
--- ofbiz/trunk/debian/ofbiz-framework.postinst (original)
+++ ofbiz/trunk/debian/ofbiz-framework.postinst Sat Apr 18 06:05:15 2009
@@ -180,7 +180,7 @@
  (ofbiz-start)
  ofbiz_init_invoke start
  ;;
- (ofbiz-install|ofbiz-upgrade)
+ (ofbiz-install)
  ofbiz_reseed=""
  if [ "$trigger" = "ofbiz-install" ]; then
  ofbiz_reseed=1
@@ -194,7 +194,6 @@
  fi
  ofbiz_readers="$(fix_readers "$ofbiz_readers")"
  get ofbiz_admin_port ofbiz/admin-port
- ofbiz_init_invoke stop
  if [ "z" != "z$ofbiz_reseed" ]; then
  echo "Need to modify ofbiz data." 1>&2
  configure_ofbiz
@@ -210,10 +209,9 @@
 ofbiz_reseed=""
 case "$1" in
  (configure|reconfigure)
- if [ "$2" ]; then
- dpkg-trigger --no-await ofbiz-upgrade
- else
- dpkg-trigger --no-await ofbiz-install
+ ofbiz_init_invoke stop
+ dpkg-trigger --no-await ofbiz-install
+ if [ -z "$2" ]; then
  if ! getent passwd ofbiz 2>/dev/null >/dev/null; then
  adduser --quiet --group --no-create-home --system --shell /bin/sh --home /var/lib/ofbiz ofbiz
  fi

Modified: ofbiz/trunk/debian/ofbiz-framework.triggers
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/ofbiz-framework.triggers?rev=766227&r1=766226&r2=766227&view=diff
==============================================================================
--- ofbiz/trunk/debian/ofbiz-framework.triggers (original)
+++ ofbiz/trunk/debian/ofbiz-framework.triggers Sat Apr 18 06:05:15 2009
@@ -1,3 +1,2 @@
 interest ofbiz-install
-interest ofbiz-upgrade
 interest ofbiz-start