[Pkg-mono-svn-commits] rev 551 - xsp-snapshot/trunk/debian/official

Pablo Fischer pabl0-guest@haydn.debian.org
Sat, 10 Apr 2004 19:12:07 -0600


Author: pabl0-guest
Date: 2004-04-10 19:11:55 -0600 (Sat, 10 Apr 2004)
New Revision: 551

Added:
   xsp-snapshot/trunk/debian/official/mono-server.postrm
   xsp-snapshot/trunk/debian/official/mono-server.preinst
   xsp-snapshot/trunk/debian/official/mono-xsp.preinst
   xsp-snapshot/trunk/debian/official/mono-xsp.prerm
Modified:
   xsp-snapshot/trunk/debian/official/asp.net-examples.postinst
   xsp-snapshot/trunk/debian/official/asp.net-examples.postrm
   xsp-snapshot/trunk/debian/official/mono-server.postinst
   xsp-snapshot/trunk/debian/official/mono-server.prerm
   xsp-snapshot/trunk/debian/official/mono-xsp.postinst
   xsp-snapshot/trunk/debian/official/mono-xsp.postrm
Log:
Removed some cases of the switch case


Modified: xsp-snapshot/trunk/debian/official/asp.net-examples.postinst
===================================================================
--- xsp-snapshot/trunk/debian/official/asp.net-examples.postinst	2004-04-10 21:28:07 UTC (rev 550)
+++ xsp-snapshot/trunk/debian/official/asp.net-examples.postinst	2004-04-11 01:11:55 UTC (rev 551)
@@ -16,8 +16,6 @@
 	update xsp xsp
 	update server mono-server
 	;;
-    *)
-	;;
 esac
 
 #DEBHELPER#

Modified: xsp-snapshot/trunk/debian/official/asp.net-examples.postrm
===================================================================
--- xsp-snapshot/trunk/debian/official/asp.net-examples.postrm	2004-04-10 21:28:07 UTC (rev 550)
+++ xsp-snapshot/trunk/debian/official/asp.net-examples.postrm	2004-04-11 01:11:55 UTC (rev 551)
@@ -17,12 +17,6 @@
 	update server mono-server
 	;;
     
-    abort-upgrade|abort-remove|abort-deconfigure)
-        #Do nothing..
-    ;;
-
-    *)
-	;;
 esac
 
 #DEBHELPER#

Modified: xsp-snapshot/trunk/debian/official/mono-server.postinst
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-server.postinst	2004-04-10 21:28:07 UTC (rev 550)
+++ xsp-snapshot/trunk/debian/official/mono-server.postinst	2004-04-11 01:11:55 UTC (rev 551)
@@ -71,9 +71,6 @@
 	fi	
 	;;
     
-    abort-upgrade|abort-remove|abort-deconfigure)
-        #Do nothing..
-	;;
     *)
 	echo "postinst failed \`$1'" >&2
 	exit 0

Added: xsp-snapshot/trunk/debian/official/mono-server.postrm
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-server.postrm	2004-04-10 21:28:07 UTC (rev 550)
+++ xsp-snapshot/trunk/debian/official/mono-server.postrm	2004-04-11 01:11:55 UTC (rev 551)
@@ -0,0 +1,10 @@
+#!/bin/sh -e
+
+monoserverconfd="/etc/mono-server/conf.d/"
+
+case "$1" in
+    purge)
+	rm -Rf "$monoserverconfd/*"
+	;;
+    esac
+exit 0


Property changes on: xsp-snapshot/trunk/debian/official/mono-server.postrm
___________________________________________________________________
Name: svn:executable
   + *

Added: xsp-snapshot/trunk/debian/official/mono-server.preinst
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-server.preinst	2004-04-10 21:28:07 UTC (rev 550)
+++ xsp-snapshot/trunk/debian/official/mono-server.preinst	2004-04-11 01:11:55 UTC (rev 551)
@@ -0,0 +1,31 @@
+#!/bin/sh -e
+
+NAME=mono-server
+DESC="Mono Server, mod-mono-server"
+
+#0 : false
+#1 : true
+should_stop() {
+    if [ -f /var/run/$NAME ]; then
+	# Are we really running monoserver?
+	monoserver_pid=`cat /var/run/$NAME`
+	monoserver_ps=`ps -p $monoserver_pid | wc -l`
+	# Are there any process running by that pid?
+	if [ "$monoserver_ps" = "2" ]; then
+	    return 0
+	else
+	    return 1
+	fi
+    fi  
+    return 0
+}
+
+case "$1" in
+   upgrade|install)
+	if should_stop ; then
+	    echo -n "Stopping $DESC: $NAME "
+	    /etc/init.d/mono-server stop > /dev/null 2>&1 || true
+	fi
+	;;
+esac
+exit 0


Property changes on: xsp-snapshot/trunk/debian/official/mono-server.preinst
___________________________________________________________________
Name: svn:executable
   + *

Modified: xsp-snapshot/trunk/debian/official/mono-server.prerm
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-server.prerm	2004-04-10 21:28:07 UTC (rev 550)
+++ xsp-snapshot/trunk/debian/official/mono-server.prerm	2004-04-11 01:11:55 UTC (rev 551)
@@ -28,8 +28,6 @@
 	    /etc/init.d/mono-server stop > /dev/null 2>&1 || true
 	fi
 	;;
-    *)
-	;;
 esac
 exit 0
 

Modified: xsp-snapshot/trunk/debian/official/mono-xsp.postinst
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-xsp.postinst	2004-04-10 21:28:07 UTC (rev 550)
+++ xsp-snapshot/trunk/debian/official/mono-xsp.postinst	2004-04-11 01:11:55 UTC (rev 551)
@@ -104,9 +104,6 @@
 	fi
 	;;
     
-    abort-upgrade|abort-remove|abort-deconfigure)
-        #Do nothing..
-	;;
     *)
 	echo "postinst failed \`$1'" >&2
 	exit 0

Modified: xsp-snapshot/trunk/debian/official/mono-xsp.postrm
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-xsp.postrm	2004-04-10 21:28:07 UTC (rev 550)
+++ xsp-snapshot/trunk/debian/official/mono-xsp.postrm	2004-04-11 01:11:55 UTC (rev 551)
@@ -6,7 +6,5 @@
     purge)
 	rm -Rf "$xspconfd/*"
 	;;
-    *)
-	;;
     esac
 exit 0

Added: xsp-snapshot/trunk/debian/official/mono-xsp.preinst
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-xsp.preinst	2004-04-10 21:28:07 UTC (rev 550)
+++ xsp-snapshot/trunk/debian/official/mono-xsp.preinst	2004-04-11 01:11:55 UTC (rev 551)
@@ -0,0 +1,30 @@
+#!/bin/sh -e
+
+NAME=mono-xsp
+DESC="XSP WebServer"
+
+should_stop() {
+    if [ -f /var/run/$NAME ]; then
+        # Are we really running xsp?
+	xsp_pid=`cat /var/run/$NAME`
+	xsp_ps=`ps -p $xsp_pid | wc -l`
+	# Are there any process running by that pid?
+	if [ "$xsp_ps" = "2" ]; then
+	    return 0
+	else
+	    return 1
+	fi
+    fi
+    return 0
+}
+
+case "$1" in
+   upgrade|install)
+	if should_stop ; then
+	    echo -n "Stopping $DESC: $NAME "
+	    /etc/init.d/mono-xsp stop > /dev/null 2>&1 || true
+	fi
+	;;
+esac
+
+exit 0


Property changes on: xsp-snapshot/trunk/debian/official/mono-xsp.preinst
___________________________________________________________________
Name: svn:executable
   + *

Added: xsp-snapshot/trunk/debian/official/mono-xsp.prerm
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-xsp.prerm	2004-04-10 21:28:07 UTC (rev 550)
+++ xsp-snapshot/trunk/debian/official/mono-xsp.prerm	2004-04-11 01:11:55 UTC (rev 551)
@@ -0,0 +1,33 @@
+#!/bin/sh -e
+
+NAME=mono-xsp
+DESC="XSP WebServer"
+
+#0 : false
+#1 : true
+should_stop() {
+    if [ -f /var/run/$NAME ]; then
+	# Are we really running xsp?
+	xsp_pid=`cat /var/run/$NAME`
+	xsp_ps=`ps -p $xsp_pid | wc -l`
+	# Are there any process running by that pid?
+	if [ "$xsp_ps" = "2" ]; then
+	    return 0
+	else
+	    return 1
+	fi
+    fi  
+    return 0
+}
+
+case "$1" in
+    remove)
+	# should we stop the server?
+	if should_stop ; then
+	    echo "Stopping $DESC: $NAME "
+	    /etc/init.d/mono-xsp stop > /dev/null 2>&1 || true
+	fi
+	    ;;
+    esac
+exit 0
+


Property changes on: xsp-snapshot/trunk/debian/official/mono-xsp.prerm
___________________________________________________________________
Name: svn:executable
   + *