From 5dbf537b9938d97b10c193b3f30e3af11a1f55d5 Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Fri, 30 Aug 2013 10:23:47 -0500
Subject: [PATCH] chroot: if sudo is installed, added admin group to
 /etc/sudoers

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
 scripts/chroot.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/chroot.sh b/scripts/chroot.sh
index 5ec7008c3..d2bf663d7 100755
--- a/scripts/chroot.sh
+++ b/scripts/chroot.sh
@@ -484,11 +484,11 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__
 		groupadd admin || true
 		default_groups="admin,adm,dialout,cdrom,floppy,audio,dip,video"
 
-		if [ "x${chroot_very_small_image}" = "x" ] ; then
-			packages="sudo"
-			for pkg in \${packages} ; do check_n_install ; done
-		fi
-		if [ -f /etc/sudoers ] ; then
+		pkg="sudo"
+		dpkg_check
+
+		if [ "x\${pkg_is_not_installed}" = "x" ] ; then
+			echo "Log: (chroot) adding admin group to /etc/sudoers"
 			echo "%admin  ALL=(ALL) ALL" >>/etc/sudoers
 		fi
 
-- 
GitLab