From 2f803da6cab9c8ec4ca7d32b9f831e59832ce997 Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Wed, 21 May 2014 21:39:03 -0500
Subject: [PATCH] chroot: useradd can fail if these groups are added

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

diff --git a/scripts/chroot.sh b/scripts/chroot.sh
index c2a10ca35..2c3f740ae 100755
--- a/scripts/chroot.sh
+++ b/scripts/chroot.sh
@@ -571,6 +571,9 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__
 		groupadd -r admin || true
 		groupadd -r spi || true
 
+		cat /etc/group | grep ^i2c || groupadd -r i2c || true
+		cat /etc/group | grep ^netdev || groupadd -r netdev || true
+
 		echo "KERNEL==\"spidev*\", GROUP=\"spi\", MODE=\"0660\"" > /etc/udev/rules.d/50-spi.rules
 
 		default_groups="admin,adm,dialout,i2c,spi,cdrom,floppy,audio,dip,video,netdev,plugdev,users"
-- 
GitLab