jenkins-bot has submitted this change and it was merged.

Change subject: Only call php5{en,dis}mod if they exist
......................................................................


Only call php5{en,dis}mod if they exist

Precise does not have php5enmod or php5dismod. Check for the existence
on postinst, prerm and only execute them if they exist. Otherwise the
installation breaks

Change-Id: I1a6a3d8b3fdbfe5e19ab2c5d7ac9fed984d3dcf7
---
M debian/php-luasandbox.postinst
M debian/php-luasandbox.prerm
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/debian/php-luasandbox.postinst b/debian/php-luasandbox.postinst
index f452042..639753a 100755
--- a/debian/php-luasandbox.postinst
+++ b/debian/php-luasandbox.postinst
@@ -3,7 +3,7 @@
 set -e
 
 #EXTRA#
-[ "$1" = "configure" ] && php5enmod -s ALL luasandbox
+[ "$1" = "configure" ] && [ -x /usr/sbin/php5enmod ] && php5enmod -s ALL 
luasandbox
 
 #DEBHELPER#
 
diff --git a/debian/php-luasandbox.prerm b/debian/php-luasandbox.prerm
index c47a69b..f9c4bc4 100755
--- a/debian/php-luasandbox.prerm
+++ b/debian/php-luasandbox.prerm
@@ -5,7 +5,7 @@
 #EXTRA#
 
 if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then
-   php5dismod -s ALL luasandbox
+   [ -x /usr/sbin/php5enmod ] && php5dismod -s ALL luasandbox
 fi;
 
 #DEBHELPER#

-- 
To view, visit https://gerrit.wikimedia.org/r/213521
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1a6a3d8b3fdbfe5e19ab2c5d7ac9fed984d3dcf7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/php/luasandbox
Gerrit-Branch: master
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to