Xen: Fixes for core handling configuration
authorJustin Pettit <jpettit@nicira.com>
Tue, 9 Jun 2009 22:46:50 +0000 (15:46 -0700)
committerJustin Pettit <jpettit@nicira.com>
Wed, 10 Jun 2009 01:22:23 +0000 (18:22 -0700)
An improper string comparison operator was used to check whether
FORCE_COREFILES was enabled.  Further, the check to enable core files
was only down when vswitch was started, and not when restarted.

Thanks to Ben for help debugging the issue.

xenserver/etc_init.d_vswitch

index 25aca61..821dd23 100755 (executable)
@@ -242,6 +242,10 @@ EOF
 }
 
 function start {
+    if [ "$FORCE_COREFILES" = "y" ]; then
+        turn_on_corefiles
+    fi
+
     insert_modules_if_required
     start_vswitchd
     start_brcompatd
@@ -262,9 +266,6 @@ function restart {
 
 case "$1" in
     start)
-        if [ "$FORCE_COREFILES" == "y" ]; then
-            turn_on_corefiles
-        fi
         start
         ;;
     stop)