[Fusionforge-commits] r13711 - trunk/src

Christian Bayle cbayle at fusionforge.org
Thu Jul 7 20:06:54 CEST 2011


Author: cbayle
Date: 2011-07-07 20:06:54 +0200 (Thu, 07 Jul 2011)
New Revision: 13711

Modified:
   trunk/src/install-ng
Log:
Fix install detection


Modified: trunk/src/install-ng
===================================================================
--- trunk/src/install-ng	2011-07-07 15:52:37 UTC (rev 13710)
+++ trunk/src/install-ng	2011-07-07 18:06:54 UTC (rev 13711)
@@ -1,8 +1,8 @@
-#!/bin/sh -e
+#!/bin/sh
 #
 # Simple wrapper for FusionForge installation
 #
-# Usage: ./install.sh <hostname>
+# Usage: ./install-ng <hostname>
 #
 # This will install all the fusionforge code in /opt/gforge
 # Configuration is stored in /etc/gforge
@@ -30,20 +30,13 @@
 
 if [ -d "/opt/gforge" ]
 then
-	# If we install in place
-	if [ "`pwd`" == "/opt/gforge" ]
+	if [ -f "/etc/gforge/install_completed" ]
 	then
-		if [ -f "/opt/gforge/install_completed" ]
-		then
-			mode="update"
-			echo "Upgrading previous installation ...";
-		else
-			mode="install"
-			echo "Installing FusionForge ...";
-		fi
-	else
 		mode="update"
 		echo "Upgrading previous installation ...";
+	else
+		mode="install"
+		echo "Installing FusionForge ...";
 	fi
 else
 	mode="install"
@@ -153,4 +146,7 @@
 esac
 
 echo "check /etc/gforge/local.inc for $hostname specific FusionForge settings"
-touch /opt/gforge/install_completed
+echo "Write INSTALL COMPLETED"
+date >> /etc/gforge/install_completed
+ls -al /etc/gforge/install_completed
+




More information about the Fusionforge-commits mailing list