From b84c4d85304d0bf67d9ca01c1326041e6ce23270 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Sun, 6 May 2012 12:40:47 +0200 Subject: [PATCH] Allow mk-sbuild to be run by root if a configuration file exists (LP: #888736) --- debian/changelog | 2 ++ mk-sbuild | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index ed360fc..4d35c65 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,8 @@ ubuntu-dev-tools (0.142) UNRELEASED; urgency=low possible. * backportpackage: Avoid uploading orig tarballs if they are already present in the destination PPA (LP: #691897) + * Allow mk-sbuild to be run by root if a configuration file exists + (LP: #888736) -- Stefano Rivera Wed, 25 Apr 2012 17:38:58 +0200 diff --git a/mk-sbuild b/mk-sbuild index d79f672..e11d959 100755 --- a/mk-sbuild +++ b/mk-sbuild @@ -175,9 +175,15 @@ done # will not exist in the chroot. cd / -# Make sure we've got a regular user -if [ -w /etc/passwd ]; then - echo "Please run this script as a regular user, not root." >&2 +if [ -w /etc/passwd -a ! -e ~/.sbuildrc -a ! -e ~/.mk-sbuild.rc ]; then + cat >&2 <