blob: b5dee84920cb8bcc42551f693738d563c1667a81 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/sh
set -e
DEFGROUPS="adm,dialout,cdrom,audio,dip,video,plugdev,bluetooth,pulse-access,sudo,systemd-journal,netdev,staff"
IFS=','
for group in $DEFGROUPS; do
/bin/egrep -i "^$group" $target/etc/group
if [ $? -eq 0 ]; then
echo "Group '$group' exists in /etc/group"
else
echo "Group '$group' does not exists in /etc/group, creating"
chroot $target groupadd $group
fi
done
unset IFS
echo "I: add linaro to ($DEFGROUPS) groups"
chroot $target usermod -a -G ${DEFGROUPS} linaro
|