From 9b6def2fc92a229f6446e7b10676ca8ca9bf49ab Mon Sep 17 00:00:00 2001 From: John Southworth Date: Tue, 1 Nov 2011 11:31:39 -0500 Subject: Wait for user to hit enter before continuing with a reboot --- scripts/vyatta-reboot.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vyatta-reboot.pl b/scripts/vyatta-reboot.pl index f738986..3dc212c 100755 --- a/scripts/vyatta-reboot.pl +++ b/scripts/vyatta-reboot.pl @@ -116,7 +116,7 @@ if ($action eq "reboot") { do_reboot($login); } else { if (defined($ENV{VYATTA_PROCESS_CLIENT} && $ENV{VYATTA_PROCESS_CLIENT} eq 'gui2_rest') || - prompt("Proceed with reboot? (Yes/No) [No] ", -yn1d=>"n")) { + prompt("Proceed with reboot? (Yes/No) [No] ", -ynd=>"n")) { do_reboot($login); } else { print "Reboot canceled\n"; -- cgit v1.2.3 From cba7d7c8cb0f94cfd54d662ac97dbda5b4f7215e Mon Sep 17 00:00:00 2001 From: John Southworth Date: Tue, 1 Nov 2011 11:31:54 -0500 Subject: 0.13.209 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 24ecca4..2910c3a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-op (0.13.209) unstable; urgency=low + + * Wait for user to hit enter before continuing with a reboot + + -- John Southworth Tue, 01 Nov 2011 11:31:53 -0500 + vyatta-op (0.13.208) unstable; urgency=low * Create new ping command with the following semantics -- cgit v1.2.3 From 48045326c1021173cd7f5a041efc350282de8b91 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Tue, 1 Nov 2011 13:22:48 -0500 Subject: Bugfix 7603: add reset top level to allowed list for operator users --- etc/shell/level/users/allowed-op.in | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/shell/level/users/allowed-op.in b/etc/shell/level/users/allowed-op.in index 725f72c..1976904 100644 --- a/etc/shell/level/users/allowed-op.in +++ b/etc/shell/level/users/allowed-op.in @@ -6,6 +6,7 @@ exit force monitor ping +reset release renew set -- cgit v1.2.3 From 6e6ad83a0a9d3046bfa0978dd095d8e4a6c03d5a Mon Sep 17 00:00:00 2001 From: John Southworth Date: Tue, 1 Nov 2011 13:22:55 -0500 Subject: 0.13.210 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 2910c3a..3cae8f0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-op (0.13.210) unstable; urgency=low + + * Bugfix 7603: add reset top level to allowed list for operator users + + -- John Southworth Tue, 01 Nov 2011 13:22:55 -0500 + vyatta-op (0.13.209) unstable; urgency=low * Wait for user to hit enter before continuing with a reboot -- cgit v1.2.3 From 7593b4ef00eefb1a4d4827361e9025c7f8a4c205 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Tue, 1 Nov 2011 13:39:51 -0500 Subject: Fix install help text --- templates/install/node.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/install/node.def b/templates/install/node.def index 429a29b..a52b606 100644 --- a/templates/install/node.def +++ b/templates/install/node.def @@ -1 +1 @@ -help: Install vyatta +help: Install a new system -- cgit v1.2.3 From 457ba5b19a100cd8c288c822d1cde4946106e4e6 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Tue, 1 Nov 2011 13:40:03 -0500 Subject: 0.13.211 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 3cae8f0..7899def 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-op (0.13.211) unstable; urgency=low + + * Fix install help text + + -- John Southworth Tue, 01 Nov 2011 13:40:03 -0500 + vyatta-op (0.13.210) unstable; urgency=low * Bugfix 7603: add reset top level to allowed list for operator users -- cgit v1.2.3 From f64dc89465f7fd7974f03329a068fd6b930430ba Mon Sep 17 00:00:00 2001 From: John Southworth Date: Mon, 7 Nov 2011 18:05:34 -0600 Subject: Remove accidental commit of 'show system boot-messages commit' command, this was part of a mockup for a proposed bugfix and I didn't intend to commit it --- templates/show/system/boot-messages/commit/node.def | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 templates/show/system/boot-messages/commit/node.def diff --git a/templates/show/system/boot-messages/commit/node.def b/templates/show/system/boot-messages/commit/node.def deleted file mode 100644 index 60e1f67..0000000 --- a/templates/show/system/boot-messages/commit/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: Show the commit messages from this boot -run: cat /var/log/vyatta/vyatta-commit-this-boot.log -- cgit v1.2.3 From 746e88015ecfd2c94d9fe0a348c10497e3be6210 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Mon, 7 Nov 2011 18:05:50 -0600 Subject: 0.13.212 --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7899def..2f4ecd5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +vyatta-op (0.13.212) unstable; urgency=low + + * Remove accidental commit of 'show system boot-messages commit' + command, this was part of a mockup for a proposed bugfix and I + didn't intend to commit it + + -- John Southworth Mon, 07 Nov 2011 18:05:50 -0600 + vyatta-op (0.13.211) unstable; urgency=low * Fix install help text -- cgit v1.2.3 From 0e7340bf6b421b698578a908fa67ca6f629d698c Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 9 Nov 2011 08:13:45 -0800 Subject: Fix perlcritic warning about bareword file handle dhcpv6-show-leases use 3 arg open and local file handle --- scripts/dhcpv6-client-show-leases.pl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/dhcpv6-client-show-leases.pl b/scripts/dhcpv6-client-show-leases.pl index 546668c..44be689 100644 --- a/scripts/dhcpv6-client-show-leases.pl +++ b/scripts/dhcpv6-client-show-leases.pl @@ -74,13 +74,11 @@ my %ghash = (); foreach my $lease_filename (@lease_files) { my @lines=(); - if (!open(LEASE_FILE, "; - close(LEASE_FILE); + @lines = <$f>; + close $f; chomp @lines; my $level = 0; -- cgit v1.2.3 From 02396d787f4f693622b3d0aef675473ff417a783 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 9 Nov 2011 08:17:28 -0800 Subject: cleanup rename-image 1. Get rid of perl critic warnings about use of bare file handles and open 2. Use perl rather than system() to copy and move files and check for errors. 3. Use perl rather than system() to access syslog. --- scripts/rename-image.pl | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/scripts/rename-image.pl b/scripts/rename-image.pl index 8632334..be30967 100644 --- a/scripts/rename-image.pl +++ b/scripts/rename-image.pl @@ -24,6 +24,8 @@ use strict; use warnings; use Getopt::Long; use File::Temp qw/ tempfile tempdir /; +use File::Copy; +use Sys::Syslog qw/:standard :macros/; my $UNION_BOOT = '/live/image/boot'; my $XEN_DEFAULT_IMAGE = "$UNION_BOOT/%%default_image"; @@ -99,16 +101,14 @@ my $tmpfh; my $tmpfilename; ($tmpfh, $tmpfilename) = tempfile(); -if (!open (GRUBFH, "<${image_path}/grub/grub.cfg")) { - printf("Can't open grub file.\n"); - exit 1; -} +open (my $grubfh, '<', "${image_path}/grub/grub.cfg") + or die "Can't open grub file.\n"; # This is sensitive to the format of menu entries and boot paths # in the grub config file. # my $line; -while ($line = ) { +while ($line = <$grubfh>) { $line =~ s/\/boot\/$old_name/\/boot\/$new_name/g; $line =~ s/Vyatta $old_name/Vyatta $new_name/; $line =~ s/Vyatta image $old_name/Vyatta image $new_name/; @@ -117,13 +117,14 @@ while ($line = ) { } close($tmpfh); -close(GRUBFH); +close($grubfh); -system("mv $image_path/$old_name $image_path/$new_name"); -system("cp $tmpfilename $image_path/grub/grub.cfg"); +mv("$image_path/$old_name", "$image_path/$new_name") + or die "rename $old_name to $new_name failed: $!\n"; +cp($tmpfilename, "$image_path/grub/grub.cfg") + or die "copy $tmpfilename to grub.cfg failed: $!\n"; -system("logger -p local3.warning -t 'SystemImage' 'System image $old_name has been renamed $new_name'"); +syslog("warning", "System image $old_name has been renamed $new_name"); printf("Done.\n"); - -- cgit v1.2.3 From f6c2586a9d552abc977a5c7a148fd21b070d04a8 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 9 Nov 2011 08:19:04 -0800 Subject: 0.13.213 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 2f4ecd5..a5ab91d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +vyatta-op (0.13.213) unstable; urgency=low + + * Fix perlcritic warning about bareword file handle + * cleanup rename-image + + -- Stephen Hemminger Wed, 09 Nov 2011 08:19:04 -0800 + vyatta-op (0.13.212) unstable; urgency=low * Remove accidental commit of 'show system boot-messages commit' -- cgit v1.2.3 From e81cb347e56e9b3cec8faa119aacbc0ef7ce9cef Mon Sep 17 00:00:00 2001 From: Gaurav Sinha Date: Wed, 9 Nov 2011 16:31:09 -0800 Subject: :Fixing bug 4086, added support for showing domain overrides --- scripts/vyatta-op-dns-forwarding.pl | 51 ++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/scripts/vyatta-op-dns-forwarding.pl b/scripts/vyatta-op-dns-forwarding.pl index 99b5eac..a20cf45 100755 --- a/scripts/vyatta-op-dns-forwarding.pl +++ b/scripts/vyatta-op-dns-forwarding.pl @@ -67,8 +67,24 @@ sub get_nameserver_stats { $show_stats_output .= "Nameserver statistics\n"; $show_stats_output .= "---------------------\n"; - my @grepped_lines = `grep ': server' $dnsmasq_log`; + #To show overridden domain servers seperately, we need to compare IPs + #configured for the domain overrides in the config with the stats. + + my $vyatta_config = new Vyatta::Config; + $vyatta_config->setLevel("service dns forwarding"); + + my @domains = $vyatta_config->listOrigNodes("domain"); + my @domain_servers_list; + #build a list of servers that are overriding global nameservers + if (@domains) { + foreach my $domain (@domains) { + push(@domain_servers_list, $vyatta_config->returnOrigValue("domain $domain server")); + } + } + my $found_overrides = 0; + my $show_stats_overrides; + my @grepped_lines = `grep ': server' $dnsmasq_log`; foreach my $lines (@grepped_lines) { my @each_line = split(/\s+/, $lines); my $nameserver_word = $each_line[5]; @@ -79,9 +95,17 @@ sub get_nameserver_stats { my $queries_sent = $queries_sent_split[0]; my $queries_retried_failed = $each_line[12]; - $show_stats_output .= "Server: $nameserver\nQueries sent: $queries_sent\nQueries retried or failed: $queries_retried_failed\n\n"; - + if (grep {$_ eq $nameserver}@domain_servers_list) { + if (!$found_overrides) { + $found_overrides = 1; + $show_stats_overrides .= "\nDomain Override Servers\n\n"; + } + $show_stats_overrides .= "Server: $nameserver\nQueries sent: $queries_sent\nQueries retried or failed: $queries_retried_failed\n\n"; + } else { + $show_stats_output .= "Server: $nameserver\nQueries sent: $queries_sent\nQueries retried or failed: $queries_retried_failed\n\n"; + } } + $show_stats_output .= $show_stats_overrides; } sub print_stats { @@ -162,17 +186,36 @@ sub get_dns_nameservers { $show_nameservers_output .= "-----------------------------------------------\n"; $show_nameservers_output .= " Nameservers configured for DNS forwarding\n"; $show_nameservers_output .= "-----------------------------------------------\n"; + + my $line_flag; + ## server=/test.com/1.1.1.1 foreach my $line (@dnsmasq_conf_nameservers) { my @split_line = split(/=/, $line); my @nameserver_array = split(/\s+/, $split_line[1]); my $nameserver = $nameserver_array[0]; + my $domain; + my @domain_tokens; + + if ($nameserver_array[2] eq "domain-override") + { + #$nameserver has /test.com/1.1.1.1, seperate it. + @domain_tokens = split(/\//, $nameserver); + if (!defined($line_flag)) { + $line_flag = 1; + $show_nameservers_output .= "\n"; + $show_nameservers_output .= "Domain Overrides\n"; + $show_nameservers_output .= "\n"; + } + } $active_nameservers[$active_nameserver_count] = $nameserver; $active_nameserver_count++; my $nameserver_via = $nameserver_array[2]; if (@nameserver_array > 3){ my $dhcp_interface = $nameserver_array[3]; $show_nameservers_output .= "$nameserver available via '$nameserver_via $dhcp_interface'\n"; - } else { + } elsif (@domain_tokens) { + $show_nameservers_output .= "$domain_tokens[1] uses $domain_tokens[2] via '$nameserver_via'\n"; + } else { $show_nameservers_output .= "$nameserver available via '$nameserver_via'\n"; } } -- cgit v1.2.3 From 29eb9a1f7ecb1af6167093163b2bf9de48a7cf08 Mon Sep 17 00:00:00 2001 From: Gaurav Sinha Date: Wed, 9 Nov 2011 16:38:31 -0800 Subject: 0.13.214 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index a5ab91d..fe8e61e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-op (0.13.214) unstable; urgency=low + + * :Fixing bug 4086, added support for showing domain overrides + + -- Gaurav Sinha Wed, 09 Nov 2011 16:38:31 -0800 + vyatta-op (0.13.213) unstable; urgency=low * Fix perlcritic warning about bareword file handle -- cgit v1.2.3