[Pkg-owncloud-commits] [owncloud] 01/01: Simply use su instead of sudo in postinst

David Prévot taffit at moszumanska.debian.org
Mon Apr 13 04:29:17 UTC 2015


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

taffit pushed a commit to branch stable8
in repository owncloud.

commit e0c2ad8e7993b7b6de6630520d8e087f1b034926
Author: David Prévot <taffit at debian.org>
Date:   Sun Apr 12 11:56:31 2015 -0400

    Simply use su instead of sudo in postinst
---
 debian/control  | 1 -
 debian/postinst | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index a4ddc2d..8843441 100644
--- a/debian/control
+++ b/debian/control
@@ -43,7 +43,6 @@ Depends: libjs-handlebars,
          php5-gd,
          php5-json,
          php5-mysql | php5-pgsql | php5-sqlite,
-         sudo,
          ${misc:Depends}
 Recommends: exim4 | mail-transport-agent,
             php-aws-sdk (<< 3),
diff --git a/debian/postinst b/debian/postinst
index 6cfc50c..0d22245 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -20,7 +20,7 @@ if [ "$1" = "configure" ] ; then
 	# Update the database on upgrade
 	# Don’t let it fail, since it exits with 3 if no upgrade is necessary
 	if [ -e /etc/owncloud/config.php ] ; then
-		sudo -u www-data occ upgrade || true
+		su -s /bin/sh -c "/usr/sbin/occ upgrade" www-data || true
 	fi
 fi
 

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



More information about the Pkg-owncloud-commits mailing list