From 24ea5effd365d09abf7bdfa7e2c1f6601cacda50 Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Tue, 5 Aug 2008 07:22:38 +0000 Subject: add command for user to enter interfaces on which not to listen for DNS queries --- scripts/dns-forwarding/vyatta-dns-forwarding.pl | 8 ++++++++ .../service/dns-forwarding/ignore-interface/node.def | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 templates/service/dns-forwarding/ignore-interface/node.def diff --git a/scripts/dns-forwarding/vyatta-dns-forwarding.pl b/scripts/dns-forwarding/vyatta-dns-forwarding.pl index 4eebf6d7..1fb2282a 100644 --- a/scripts/dns-forwarding/vyatta-dns-forwarding.pl +++ b/scripts/dns-forwarding/vyatta-dns-forwarding.pl @@ -62,6 +62,14 @@ sub dnsforwarding_get_values { my $config = new VyattaConfig; $config->setLevel("service dns-forwarding"); + + my @ignore_interfaces = $config->returnValues("ignore-interface"); + if ($#ignore_interfaces >= 0) { + foreach my $interface (@ignore_interfaces) { + $output .= "except-interface=$interface\n"; + } + } + my $cache_size = $config->returnValue("cache-size"); if (defined $cache_size) { $output .= "cache-size=$cache_size\n"; diff --git a/templates/service/dns-forwarding/ignore-interface/node.def b/templates/service/dns-forwarding/ignore-interface/node.def new file mode 100644 index 00000000..5355eecf --- /dev/null +++ b/templates/service/dns-forwarding/ignore-interface/node.def @@ -0,0 +1,19 @@ +multi: +type: txt +help: Set interface to ignore DNS queries on +syntax:expression: exec " + intf_array=($(awk '$1 ~ /:$/ { print $1 }' /proc/net/dev)) + intf_array_len=${#intf_array[*]} + i=0 + while [ $i -lt $intf_array_len ]; do + if [ \"${intf_array[$i]}\" == \"$VAR(@):\" ] ; then + exit 0 + fi + let i++ + done + echo Invalid ethernet interface [$VAR(@)] + exit 1 " + +allowed: local -a array ; + array=($(awk '$1 ~ /:$/ { print $1 }' /proc/net/dev)); + echo -n ${array[@]%:} -- cgit v1.2.3 From 8bd10c6dd3f7a0d91038584f3b33b9ad10a5b566 Mon Sep 17 00:00:00 2001 From: rbalocca Date: Tue, 5 Aug 2008 16:13:38 -0700 Subject: Fix for http://bugzilla.vyatta.com/show_bug.cgi?id=3542 --- scripts/grub-setup | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/grub-setup b/scripts/grub-setup index bf293486..5607b098 100755 --- a/scripts/grub-setup +++ b/scripts/grub-setup @@ -81,7 +81,7 @@ serial_console="console=tty0 console=ttyS0,9600" echo "Unable to read filesystem UUID. Exiting." exit 1 else - grub_root="root=UUID=$uuid ro" + GRUB_OPTIONS="$GRUB_OPTIONS root=UUID=$uuid ro" fi ( @@ -94,7 +94,6 @@ serial_console="console=tty0 console=ttyS0,9600" # set serial console options echo -e "serial --unit=0 --speed=9600" echo "terminal serial" - echo "set root=$grub_root" echo "" echo "echo -n Press ESC to enter the Grub menu..." -- cgit v1.2.3 From c094e68c6a0bab40ad60792b8ea2c0eb5477dc7c Mon Sep 17 00:00:00 2001 From: Mark O'Brien Date: Wed, 6 Aug 2008 00:22:41 -0700 Subject: control: added ifenslave-2.6 to debian control file --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index 20237cd1..b23880d2 100644 --- a/debian/control +++ b/debian/control @@ -27,6 +27,7 @@ Depends: sed (>= 4.1.5), ssh, ed, tshark, + ifenslave-2.6, iputils-arping installation-report, laptop-detect, -- cgit v1.2.3 From 5249053c47fd72a36870c2195eefabc7915b92e5 Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Tue, 5 Aug 2008 15:44:30 +0000 Subject: add missing comma --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index b23880d2..bcca954f 100644 --- a/debian/control +++ b/debian/control @@ -28,7 +28,7 @@ Depends: sed (>= 4.1.5), ed, tshark, ifenslave-2.6, - iputils-arping + iputils-arping, installation-report, laptop-detect, usbutils, -- cgit v1.2.3