[Pkg-apache-commits] [SCM] Debian packaging for apache2 (Apache HTTPD 2.x) branch, next, updated. 255c7dd4d4f9629e9f30181c5f4c4455b5adbe1e

Stefan Fritsch sf at sfritsch.de
Wed Mar 14 22:47:57 UTC 2012


The following commit has been merged in the next branch:
commit c01c59dc013e053eb37943cd8d955b18612f396a
Author: Stefan Fritsch <sf at sfritsch.de>
Date:   Wed Mar 14 23:42:20 2012 +0100

    Add some quoting
    
    better be safe than sorry

diff --git a/debian/apache2.postinst b/debian/apache2.postinst
index 7e5e904..ae95ffc 100755
--- a/debian/apache2.postinst
+++ b/debian/apache2.postinst
@@ -89,7 +89,7 @@ we_are_upgrading_from_squeeze()
 
 is_fresh_install()
 {
-        if [ -z $2 ] ; then
+        if [ -z "$2" ] ; then
                 return 0
         fi
 	return 1
@@ -220,9 +220,9 @@ install_default_site()
 			if [ -L $SITE ] ; then
 				target=$(readlink -e "$SITE") || true
 				sitename=$(basename "$SITE")
-				if [ -z $target ] ; then
+				if [ -z "$target" ] ; then
 					rm -f $SITE
-					a2ensite -q $sitename
+					a2ensite -q "$sitename"
 				fi
 			fi
 		done
@@ -266,7 +266,7 @@ refresh_modules()
                 shopt -s nullglob
                 for link in /etc/apache2/mods-enabled/*.load ; do
                         target=$(readlink "$link") || true
-                        if [ -z $target ] ; then
+                        if [ -z "$target" ] ; then
                                 continue
                         fi
 
@@ -274,9 +274,9 @@ refresh_modules()
 
                         if [ ! -e "/etc/apache2/mods-enabled/$target" ] ; then
                                 echo "disable obsolete module $module"
-                                a2dismod -q $module
+                                a2dismod -q "$module"
 
-				if [ $module = "disk_cache" ] ; then
+				if [ "$module" = "disk_cache" ] ; then
 					echo "Enable cache_disk as disk_cache was enabled in Apache 2.2"
 					a2enmod -q cache_disk
 				fi
@@ -287,7 +287,7 @@ refresh_modules()
                         # Example: the deflate module when upgraded from
                         # Squeeze
                         if [ -e "/etc/apache2/mods-enabled/$target" ] ; then
-                                a2enmod -q $module
+                                a2enmod -q "$module"
                         fi
                 done
         fi

-- 
Debian packaging for apache2 (Apache HTTPD 2.x)



More information about the Pkg-apache-commits mailing list