[debian-edu-commits] debian-edu/pkg-team/ 01/03: debian/gosa.post{inst, rm}: Use quotes around which commands. This fixes failures during post-installation if either of the supported http daemon packages is not installed.

Mike Gabriel sunweaver at debian.org
Sun Jan 17 16:11:22 UTC 2016


This is an automated email from the git hooks/post-receive script.

sunweaver pushed a commit to branch master
in repository gosa.

commit f20df882a65cd25f95a00f5c431701b5cced765d
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sun Jan 17 16:48:54 2016 +0100

    debian/gosa.post{inst,rm}: Use quotes around which commands. This fixes failures during post-installation if either of the supported http daemon packages is not installed.
---
 debian/gosa.postinst | 16 ++++++++--------
 debian/gosa.postrm   | 12 ++++++------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/debian/gosa.postinst b/debian/gosa.postinst
index 495183e..573e32e 100755
--- a/debian/gosa.postinst
+++ b/debian/gosa.postinst
@@ -60,8 +60,8 @@ if [ -d /etc/apache2/conf-available ] ; then
 		apache2_invoke enmod headers
 	fi
 	# Finally restart servers
-	if [ -x $(which apache2) ]; then
-		if [ -x $(which invoke-rc.d) ]; then
+	if [ -x "$(which apache2)" ]; then
+		if [ -x "$(which invoke-rc.d)" ]; then
 			invoke-rc.d apache2 reload
 		else
 			/etc/init.d/apache2 reload
@@ -88,13 +88,13 @@ elif [ -d /etc/apache2/conf.d ]; then
 	fi
 
 	# Add support for RequestHeader
-	if [ -x $(which a2enmod) ]; then
+	if [ -x "$(which a2enmod)" ]; then
 		a2enmod headers
 	fi
 
 	# Finally restart servers
-	if [ -x $(which apache2ctl) ]; then
-		if [ -x $(which invoke-rc.d) ]; then
+	if [ -x "$(which apache2ctl)" ]; then
+		if [ -x "$(which invoke-rc.d)" ]; then
 			invoke-rc.d apache2 reload
 		else
 			/etc/init.d/apache2 reload
@@ -126,8 +126,8 @@ if [ -d /etc/lighttpd/conf-available ]; then
 	fi
 
 	# Finally restart servers
-	if [ -x $(which lighttpd) ]; then
-		if [ -x $(which invoke-rc.d) ]; then
+	if [ -x "$(which lighttpd)" ]; then
+		if [ -x "$(which invoke-rc.d)" ]; then
 			invoke-rc.d lighttpd reload
 		else
 			/etc/init.d/lighttpd reload
@@ -137,7 +137,7 @@ fi
 
 # Add links for safe mode
 [ ! -d /usr/share/gosa/bin ] && mkdir -p /usr/share/gosa/bin
-for source in $(which convert) $(which lpstat); do
+for source in "$(which convert)" "$(which lpstat)"; do
 	if [ -e $source ]; then
 		target=/usr/share/gosa/bin/${source##*/}
 		[ ! -L $target ] && ln -sf $source $target
diff --git a/debian/gosa.postrm b/debian/gosa.postrm
index b9ac922..cb75e52 100755
--- a/debian/gosa.postrm
+++ b/debian/gosa.postrm
@@ -29,8 +29,8 @@ case "$1" in
 			fi
 
 			# Restart servers
-			if [ -x $(which apache2) ]; then
-				if [ -x $(which invoke-rc.d) ]; then
+			if [ -x "$(which apache2)" ]; then
+				if [ -x "$(which invoke-rc.d)" ]; then
 					invoke-rc.d apache2 restart
 				else
 					/etc/init.d/apache2 restart
@@ -51,8 +51,8 @@ case "$1" in
 			fi
 
 			# Finally restart servers
-			if [ -x $(which apache2) ]; then
-				if [ -x $(which invoke-rc.d) ]; then
+			if [ -x "$(which apache2)" ]; then
+				if [ -x "$(which invoke-rc.d)" ]; then
 					invoke-rc.d apache2 reload
 				else
 					/etc/init.d/apache2 reload
@@ -67,8 +67,8 @@ case "$1" in
 			fi
 
 			# Restart servers
-			if [ -x $(which lighttpd) ]; then
-				if [ -x $(which invoke-rc.d) ]; then
+			if [ -x "$(which lighttpd)" ]; then
+				if [ -x "$(which invoke-rc.d)" ]; then
 					invoke-rc.d lighttpd restart
 				else
 					/etc/init.d/lighttpd restart

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/gosa.git



More information about the debian-edu-commits mailing list