diff options
| author | Stig Thormodsrud <stig@vyatta.com> | 2009-05-30 12:55:14 -0700 |
|---|---|---|
| committer | Stig Thormodsrud <stig@vyatta.com> | 2009-05-30 12:55:14 -0700 |
| commit | 6052886a6a06f8ef6ee0a35f3c9bb47d81e5d755 (patch) | |
| tree | d2637a32a63cfdbbc813e92e25f16f51e0476dd2 /scripts/system | |
| parent | ab857f46cb19f9acdc53afb496ce6a13f3636b2f (diff) | |
| parent | 78aef156293581ce5028ff22d752241cc2e9525b (diff) | |
| download | vyatta-cfg-system-6052886a6a06f8ef6ee0a35f3c9bb47d81e5d755.tar.gz vyatta-cfg-system-6052886a6a06f8ef6ee0a35f3c9bb47d81e5d755.zip | |
Merge branch 'jenner' of http://git.vyatta.com/vyatta-cfg-system into jenner
Diffstat (limited to 'scripts/system')
| -rwxr-xr-x | scripts/system/vyatta_update_login.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/system/vyatta_update_login.pl b/scripts/system/vyatta_update_login.pl index d482c297..c8d0a23a 100755 --- a/scripts/system/vyatta_update_login.pl +++ b/scripts/system/vyatta_update_login.pl @@ -120,8 +120,10 @@ for my $user (@user_keys) { $cmd .= " -c \"$fname\"" if ( defined $fname ); $cmd .= " -d \"$home\"" if ( defined $home ); $cmd .= ' -G ' . join( ',', @groups ); - system("sudo $cmd $user") == 0 - or die "sudo $cmd $user failed: $?"; + system("sudo $cmd $user"); + return if ($? == 0); + my $reason = $reasons{($? >> 8)}; + die "Attempt to change user $user failed: $reason\n"; } } |
