summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/useradd_base.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/useradd_base.bbclass b/meta/classes/useradd_base.bbclass
index 551c82c322..0d0bdb80f5 100644
--- a/meta/classes/useradd_base.bbclass
+++ b/meta/classes/useradd_base.bbclass
@@ -51,10 +51,10 @@ perform_groupmems () {
51 local groupname=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-g" || $i == "--group") print $(i+1) }'` 51 local groupname=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-g" || $i == "--group") print $(i+1) }'`
52 local username=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-a" || $i == "--add") print $(i+1) }'` 52 local username=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-a" || $i == "--add") print $(i+1) }'`
53 bbnote "${PN}: Running groupmems command with group $groupname and user $username" 53 bbnote "${PN}: Running groupmems command with group $groupname and user $username"
54 local mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*" $rootdir/etc/group || true`" 54 local mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*$" $rootdir/etc/group || true`"
55 if test "x$mem_exists" = "x"; then 55 if test "x$mem_exists" = "x"; then
56 eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO groupmems \$opts\" || true 56 eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO groupmems \$opts\" || true
57 mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*" $rootdir/etc/group || true`" 57 mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*$" $rootdir/etc/group || true`"
58 if test "x$mem_exists" = "x"; then 58 if test "x$mem_exists" = "x"; then
59 bbfatal "${PN}: groupmems command did not succeed." 59 bbfatal "${PN}: groupmems command did not succeed."
60 fi 60 fi