summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/useradd_base.bbclass14
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/classes/useradd_base.bbclass b/meta/classes/useradd_base.bbclass
index 7aafe29a4a..c47b1eb810 100644
--- a/meta/classes/useradd_base.bbclass
+++ b/meta/classes/useradd_base.bbclass
@@ -24,7 +24,6 @@ perform_groupadd () {
24 group_exists="`grep "^$groupname:" $rootdir/etc/group || true`" 24 group_exists="`grep "^$groupname:" $rootdir/etc/group || true`"
25 if test "x$group_exists" = "x"; then 25 if test "x$group_exists" = "x"; then
26 bbwarn "groupadd command did not succeed. Retrying..." 26 bbwarn "groupadd command did not succeed. Retrying..."
27 sleep 1
28 else 27 else
29 break 28 break
30 fi 29 fi
@@ -32,6 +31,7 @@ perform_groupadd () {
32 if test $count = $retries; then 31 if test $count = $retries; then
33 bbfatal "Tried running groupadd command $retries times without scucess, giving up" 32 bbfatal "Tried running groupadd command $retries times without scucess, giving up"
34 fi 33 fi
34 sleep $count
35 done 35 done
36 else 36 else
37 bbwarn "group $groupname already exists, not re-creating it" 37 bbwarn "group $groupname already exists, not re-creating it"
@@ -52,7 +52,6 @@ perform_useradd () {
52 user_exists="`grep "^$username:" $rootdir/etc/passwd || true`" 52 user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
53 if test "x$user_exists" = "x"; then 53 if test "x$user_exists" = "x"; then
54 bbwarn "useradd command did not succeed. Retrying..." 54 bbwarn "useradd command did not succeed. Retrying..."
55 sleep 1
56 else 55 else
57 break 56 break
58 fi 57 fi
@@ -60,6 +59,7 @@ perform_useradd () {
60 if test $count = $retries; then 59 if test $count = $retries; then
61 bbfatal "Tried running useradd command $retries times without scucess, giving up" 60 bbfatal "Tried running useradd command $retries times without scucess, giving up"
62 fi 61 fi
62 sleep $count
63 done 63 done
64 else 64 else
65 bbwarn "user $username already exists, not re-creating it" 65 bbwarn "user $username already exists, not re-creating it"
@@ -90,7 +90,6 @@ perform_groupmems () {
90 mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*" $rootdir/etc/group || true`" 90 mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*" $rootdir/etc/group || true`"
91 if test "x$mem_exists" = "x"; then 91 if test "x$mem_exists" = "x"; then
92 bbwarn "groupmems command did not succeed. Retrying..." 92 bbwarn "groupmems command did not succeed. Retrying..."
93 sleep 1
94 else 93 else
95 break 94 break
96 fi 95 fi
@@ -102,6 +101,7 @@ perform_groupmems () {
102 fi 101 fi
103 bbfatal "Tried running groupmems command $retries times without scucess, giving up" 102 bbfatal "Tried running groupmems command $retries times without scucess, giving up"
104 fi 103 fi
104 sleep $count
105 done 105 done
106 else 106 else
107 bbwarn "group $groupname already contains $username, not re-adding it" 107 bbwarn "group $groupname already contains $username, not re-adding it"
@@ -126,7 +126,6 @@ perform_groupdel () {
126 group_exists="`grep "^$groupname:" $rootdir/etc/group || true`" 126 group_exists="`grep "^$groupname:" $rootdir/etc/group || true`"
127 if test "x$group_exists" != "x"; then 127 if test "x$group_exists" != "x"; then
128 bbwarn "groupdel command did not succeed. Retrying..." 128 bbwarn "groupdel command did not succeed. Retrying..."
129 sleep 1
130 else 129 else
131 break 130 break
132 fi 131 fi
@@ -134,6 +133,7 @@ perform_groupdel () {
134 if test $count = $retries; then 133 if test $count = $retries; then
135 bbfatal "Tried running groupdel command $retries times without scucess, giving up" 134 bbfatal "Tried running groupdel command $retries times without scucess, giving up"
136 fi 135 fi
136 sleep $count
137 done 137 done
138 else 138 else
139 bbwarn "group $groupname doesn't exist, not removing it" 139 bbwarn "group $groupname doesn't exist, not removing it"
@@ -154,7 +154,6 @@ perform_userdel () {
154 user_exists="`grep "^$username:" $rootdir/etc/passwd || true`" 154 user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
155 if test "x$user_exists" != "x"; then 155 if test "x$user_exists" != "x"; then
156 bbwarn "userdel command did not succeed. Retrying..." 156 bbwarn "userdel command did not succeed. Retrying..."
157 sleep 1
158 else 157 else
159 break 158 break
160 fi 159 fi
@@ -162,6 +161,7 @@ perform_userdel () {
162 if test $count = $retries; then 161 if test $count = $retries; then
163 bbfatal "Tried running userdel command $retries times without scucess, giving up" 162 bbfatal "Tried running userdel command $retries times without scucess, giving up"
164 fi 163 fi
164 sleep $count
165 done 165 done
166 else 166 else
167 bbwarn "user $username doesn't exist, not removing it" 167 bbwarn "user $username doesn't exist, not removing it"
@@ -184,7 +184,6 @@ perform_groupmod () {
184 eval $PSEUDO groupmod $opts 184 eval $PSEUDO groupmod $opts
185 if test $? != 0; then 185 if test $? != 0; then
186 bbwarn "groupmod command did not succeed. Retrying..." 186 bbwarn "groupmod command did not succeed. Retrying..."
187 sleep 1
188 else 187 else
189 break 188 break
190 fi 189 fi
@@ -192,6 +191,7 @@ perform_groupmod () {
192 if test $count = $retries; then 191 if test $count = $retries; then
193 bbfatal "Tried running groupmod command $retries times without scucess, giving up" 192 bbfatal "Tried running groupmod command $retries times without scucess, giving up"
194 fi 193 fi
194 sleep $count
195 done 195 done
196 else 196 else
197 bbwarn "group $groupname doesn't exist, unable to modify it" 197 bbwarn "group $groupname doesn't exist, unable to modify it"
@@ -214,7 +214,6 @@ perform_usermod () {
214 eval $PSEUDO usermod $opts 214 eval $PSEUDO usermod $opts
215 if test $? != 0; then 215 if test $? != 0; then
216 bbwarn "usermod command did not succeed. Retrying..." 216 bbwarn "usermod command did not succeed. Retrying..."
217 sleep 1
218 else 217 else
219 break 218 break
220 fi 219 fi
@@ -222,6 +221,7 @@ perform_usermod () {
222 if test $count = $retries; then 221 if test $count = $retries; then
223 bbfatal "Tried running usermod command $retries times without scucess, giving up" 222 bbfatal "Tried running usermod command $retries times without scucess, giving up"
224 fi 223 fi
224 sleep $count
225 done 225 done
226 else 226 else
227 bbwarn "user $username doesn't exist, unable to modify it" 227 bbwarn "user $username doesn't exist, unable to modify it"