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 | |
| 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')
| -rw-r--r-- | scripts/dynamic-dns/vyatta-dynamic-dns.pl | 4 | ||||
| -rwxr-xr-x | scripts/system/vyatta_update_login.pl | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/scripts/dynamic-dns/vyatta-dynamic-dns.pl b/scripts/dynamic-dns/vyatta-dynamic-dns.pl index 1d8511c5..232d260e 100644 --- a/scripts/dynamic-dns/vyatta-dynamic-dns.pl +++ b/scripts/dynamic-dns/vyatta-dynamic-dns.pl @@ -126,10 +126,8 @@ sub dynamicdns_get_values { my @hostnames = $config->returnValues("host-name"); my $server = $config->returnValue("server"); foreach my $hostname (@hostnames) { + $output .= "server=$server," if defined $server; $output .= "protocol=$service\n"; - if (defined $server) { - $output .= "server=$server\n"; - } $output .= "max-interval=28d\n"; $output .= "login=$login\n"; $output .= "password='$password'\n"; 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"; } } |
