Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /scripts/S99defaultpasswd [177423] .. [40fda4] Maximize Restore

  Switch to side-by-side view

--- a/scripts/S99defaultpasswd
+++ b/scripts/S99defaultpasswd
@@ -6,42 +6,41 @@
 
 button=$(/bin/cpm -N BUTTON)
 
-
 if [ "$button" == "1" ]; then
 	# Backup /etc/passwd if it differs from the current backup
 	cmpresult=$($FILECMP /etc/passwd /etc/passwd.bak)
-	if[ "$cmpresult" != "1" ]; then
+	if [ "$cmpresult" != "1" ]; then
 		cp /etc/passwd /etc/passwd.bak
 	fi
 	# Replace current /etc/passwd with Standard file if it differs
 	cmpresult=$($FILECMP /etc.romfs/passwd /etc/passwd)
-	if[ "$cmpresult" != "1" ]; then
+	if [ "$cmpresult" != "1" ]; then
 		cp /etc.romfs/passwd /etc/passwd
 	fi
 
 	# Backup .htaccess if it differs from the current backup
 	cmpresult=$($FILECMP  $WEBROOT/.htaccess $WEBROOT_BACKUP/.htaccess_backup)
-	if[ "$cmpresult" != "1" ]; then
+	if [ "$cmpresult" != "1" ]; then
 		cp $WEBROOT/.htaccess $WEBROOT_BACKUP/.htaccess_backup
 	fi
 
 	# Replace current .htaccess if it differs from the Standardfile
-	cmpresult=$($FILECMP  $WEBROOT/.htaccess $WEBROOT_BACKUP/.htaccess-orig)
-	if[ "$cmpresult" != "1" ]; then
-		cp $WEBROOT_BACKUP/.htaccess-orig $WEBROOT/.htaccess
+	cmpresult=$($FILECMP  $WEBROOT/.htaccess $WEBROOT_BACKUP/.htaccess_orig)
+	if [ "$cmpresult" != "1" ]; then
+		cp $WEBROOT_BACKUP/.htaccess_orig $WEBROOT/.htaccess
 	fi
 	
 
 else 
 	#Restore /etc/passwd Backup if it differs from the current file
 	cmpresult=$($FILECMP /etc/passwd /etc/passwd.bak)
-	if[ "$cmpresult" != "1" ]; then
+	if [ "$cmpresult" != "1" ]; then
 		cp /etc/passwd.bak /etc/passwd
 	fi
 
 	# Restor .htaccess if it differs from the current file
 	cmpresult=$($FILECMP  $WEBROOT/.htaccess $WEBROOT_BACKUP/.htaccess_backup)
-	if[ "$cmpresult" != "1" ]; then
+	if [ "$cmpresult" != "1" ]; then
 		cp $WEBROOT_BACKUP/.htaccess_backup $WEBROOT/.htaccess
 	fi	
 fi
@@ -50,13 +49,13 @@
 
 #Fallback if File does not exist or has zero length
 
-if[ -s /etc/passwd ]; then
+if [ -s /etc/passwd ]; then
 else
 	cp /etc.romfs/passwd /etc/passwd
 fi
 
-if[ -s $WEBROOT/.htaccess ]; then
+if [ -s $WEBROOT/.htaccess ]; then
 else
-	cp $WEBROOT_BACKUP/.htaccess-orig $WEBROOT/.htaccess
+	cp $WEBROOT_BACKUP/.htaccess_orig $WEBROOT/.htaccess
 fi