blob: f3b2d4ef08bf348c892e450fe37203949056eb27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
#!/bin/sh -x
DEFGROUPS="admin,adm,dialout,cdrom,plugdev,audio,dip,video"
/bin/egrep -i "^admin" /etc/group
if [ $? -eq 0 ]; then
echo "User admin exists in /etc/group"
else
echo "User admin does not exists in /etc/group must create"
groupadd admin
fi
/bin/egrep -i "^dialout" /etc/group
if [ $? -eq 0 ]; then
echo "User dialout exists in /etc/group"
else
echo "User dialout does not exists in /etc/group must create"
groupadd dialout
fi
/bin/egrep -i "^cdrom" /etc/group
if [ $? -eq 0 ]; then
echo "User cdrom exists in /etc/group"
else
echo "User cdrom does not exists in /etc/group must create"
groupadd cdrom
fi
/bin/egrep -i "^plugdev" /etc/group
if [ $? -eq 0 ]; then
echo "User plugdev exists in /etc/group"
else
echo "User plugdev does not exists in /etc/group must create"
groupadd plugdev
fi
/bin/egrep -i "^audio" /etc/group
if [ $? -eq 0 ]; then
echo "User audio exists in /etc/group"
else
echo "User audio does not exists in /etc/group must create"
groupadd audio
fi
/bin/egrep -i "^dip" /etc/group
if [ $? -eq 0 ]; then
echo "User dip exists in /etc/group"
else
echo "User dip does not exists in /etc/group must create"
groupadd dip
fi
/bin/egrep -i "^video" /etc/group
if [ $? -eq 0 ]; then
echo "User video exists in /etc/group"
else
echo "User video does not exists in /etc/group must create"
groupadd video
fi
/bin/egrep -i "^adm" /etc/group
if [ $? -eq 0 ]; then
echo "User adm exists in /etc/group"
else
echo "User adm does not exists in /etc/group must create"
groupadd adm
fi
echo "I: add linaro to ($DEFGROUPS) groups"
usermod -a -G ${DEFGROUPS} linaro
|