Lines Matching +full:- +full:- +full:local

4 # SPDX-License-Identifier: MIT
20 local rootdir="$1"
21 local opts="$2"
23 local groupname=`echo "$opts" | awk '{ print $NF }'`
24 local group_exists="`grep "^$groupname:" $rootdir/etc/group || true`"
26 eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO groupadd \$opts\" || true
32 bbnote "${PN}: group $groupname already exists, not re-creating it"
37 local rootdir="$1"
38 local opts="$2"
40 local username=`echo "$opts" | awk '{ print $NF }'`
41 local user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
43 eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO useradd \$opts\" || true
49 bbnote "${PN}: user $username already exists, not re-creating it"
54 local rootdir="$1"
55 local opts="$2"
57local groupname=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-g" || $i == "--group")…
58local username=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-a" || $i == "--add") pr…
60local mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*$" $rootdir/etc/gr…
62 eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO groupmems \$opts\" || true
68 bbnote "${PN}: group $groupname already contains $username, not re-adding it"
73 local rootdir="$1"
74 local opts="$2"
76 local groupname=`echo "$opts" | awk '{ print $NF }'`
77 local group_exists="`grep "^$groupname:" $rootdir/etc/group || true`"
80 local awk_input='BEGIN {FS=":"}; $1=="'$groupname'" { print $3 }'
81 local groupid=`echo "$awk_input" | awk -f- $rootdir/etc/group`
82 local awk_check_users='BEGIN {FS=":"}; $4=="'$groupid'" {print $1}'
83 local other_users=`echo "$awk_check_users" | awk -f- $rootdir/etc/passwd`
86 eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO groupdel \$opts\" || true
100 local rootdir="$1"
101 local opts="$2"
103 local username=`echo "$opts" | awk '{ print $NF }'`
104 local user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
106 eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO userdel \$opts\" || true
118 # succeeds, so we disable -e option temporarily
120 local rootdir="$1"
121 local opts="$2"
123 local groupname=`echo "$opts" | awk '{ print $NF }'`
124 local group_exists="`grep "^$groupname:" $rootdir/etc/group || true`"
126 eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO groupmod \$opts\"
133 set -e
137 # Same reason with groupmod, temporarily disable -e option
139 local rootdir="$1"
140 local opts="$2"
142 local username=`echo "$opts" | awk '{ print $NF }'`
143 local user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
145 eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO usermod \$opts\"
152 set -e
156 local rootdir="$1"
157 local opts="$2"
158 bbnote "${PN}: Performing equivalent of passwd --expire with [$opts]"
160 local username=`echo "$opts" | awk '{ print $NF }'`
161 local user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
163 …eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO sed --follow-symlinks -i \''s/^\('$username':[^:]…
164 local passwd_lastchanged="`grep "^$username:" $rootdir/etc/shadow | cut -d: -f3`"
166 bbfatal "${PN}: passwd --expire operation did not succeed."