aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Iurt/Chroot.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Iurt/Chroot.pm')
-rw-r--r--lib/Iurt/Chroot.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm
index e23cf6f..e34f21d 100644
--- a/lib/Iurt/Chroot.pm
+++ b/lib/Iurt/Chroot.pm
@@ -183,7 +183,7 @@ sub add_local_user {
# if (system(qq|sudo chroot $chroot_tmp usermod -u $run->{uid} builder|)) {
if ($uid) {
- if (sudo($run, $config, "--useradd", $chroot_tmp, $luser, $uid) || system("$sudo chroot $chroot_tmp id $luser >/dev/null 2>&1")) {
+ if (!sudo($run, $config, "--useradd", $chroot_tmp, $luser, $uid)) {
plog('ERR', "ERROR: setting userid $uid to $luser in " .
"$chroot_tmp failed, checking the chroot");
check_build_chroot($run->{chroot_path}, $run->{chroot_tar}, $run,