From 9cd6564db03acab392d7f0a4b950a1abb0e3012b Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Sun, 24 Jan 2016 15:04:21 -0500 Subject: 0.20.44+vyos2+current1 --- debian/changelog | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'debian/changelog') diff --git a/debian/changelog b/debian/changelog index bd963a8c..8753863a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +vyatta-cfg-system (0.20.44+vyos2+current1) unstable; urgency=medium + + [ UnicronNL ] + * Remove fuse group, not needed in debian jessie + + [ Thomas Jepp ] + * Dependency fixes for Jessie. Remove the dependency on vyatta-busybox, use the system busybox. + * Add missing runtime dependencies. + + [ Kim Hagen ] + + -- Kim Hagen Sun, 24 Jan 2016 15:04:10 -0500 + vyatta-cfg-system (0.20.44+vyos2+lithium41) unstable; urgency=low [ Alex Harpin ] -- cgit v1.2.3 From 9530eae60bf66020401e52a5b9cd278f73311128 Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Mon, 25 Jan 2016 03:47:18 -0500 Subject: 0.20.44+vyos2+current2 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian/changelog') diff --git a/debian/changelog b/debian/changelog index 8753863a..0e80c4e1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-cfg-system (0.20.44+vyos2+current2) unstable; urgency=medium + + * Update dependencies + + -- Kim Hagen Mon, 25 Jan 2016 03:47:13 -0500 + vyatta-cfg-system (0.20.44+vyos2+current1) unstable; urgency=medium [ UnicronNL ] -- cgit v1.2.3 From a4ec1d5d58c0f791532244ae8320ac74f2cfa609 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Wed, 27 Jan 2016 08:24:32 -0500 Subject: 0.20.44+vyos2+current3 --- debian/changelog | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'debian/changelog') diff --git a/debian/changelog b/debian/changelog index 0e80c4e1..2d7dc77f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +vyatta-cfg-system (0.20.44+vyos2+current3) unstable; urgency=medium + + [ Kim Hagen ] + * Update 'is_live_cd_boot' and 'is_union_instal' functions to search on 'overlay' instead of 'overlayfs' + + [ Seamus Caveney ] + * vyatta-cfg-system: add support for 6rd tunnel interfaces + + [ Daniil Baturin ] + * Sanitize dependencies, use ISC DHCP client. + + -- Daniil Baturin Wed, 27 Jan 2016 08:24:32 -0500 + vyatta-cfg-system (0.20.44+vyos2+current2) unstable; urgency=medium * Update dependencies -- cgit v1.2.3 From 7ddab704b12dc447a2d8e2acb9178a0d90f63b78 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 9 Dec 2017 15:28:24 +0100 Subject: T414: Remove 'telnet' service Telnet remote logins have been deprecated for decades. As Debian 'jessie' busybox no longer has a telnetd applet, this service is no longer available. --- Makefile.am | 1 - debian/changelog | 6 ++ scripts/system/vyatta_update_telnet | 84 ------------------------ templates/service/telnet/allow-root/node.def | 3 - templates/service/telnet/listen-address/node.def | 7 -- templates/service/telnet/node.def | 8 --- templates/service/telnet/port/node.def | 9 --- 7 files changed, 6 insertions(+), 112 deletions(-) delete mode 100755 scripts/system/vyatta_update_telnet delete mode 100644 templates/service/telnet/allow-root/node.def delete mode 100644 templates/service/telnet/listen-address/node.def delete mode 100644 templates/service/telnet/node.def delete mode 100644 templates/service/telnet/port/node.def (limited to 'debian/changelog') diff --git a/Makefile.am b/Makefile.am index 169df296..9dfc957c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -56,7 +56,6 @@ sbin_SCRIPTS += scripts/system/vyatta_update_sysctl.pl sbin_SCRIPTS += scripts/system/vyatta_update_syslog.pl sbin_SCRIPTS += scripts/system/vyatta_update_console.pl sbin_SCRIPTS += scripts/system/vyatta_update_ntp.pl -sbin_SCRIPTS += scripts/system/vyatta_update_telnet sbin_SCRIPTS += scripts/system/irq-affinity.pl sbin_SCRIPTS += scripts/snmp/vyatta-snmp.pl sbin_SCRIPTS += scripts/snmp/vyatta-snmp-v3.pl diff --git a/debian/changelog b/debian/changelog index 2d7dc77f..8d4ebc05 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-cfg-system (0.20.44+vyos2+current4) unstable; urgency=medium + + * T414: Remove telnetd service + + -- Christian Poessinger Sat, 09 Dec 2017 15:29:45 +0100 + vyatta-cfg-system (0.20.44+vyos2+current3) unstable; urgency=medium [ Kim Hagen ] diff --git a/scripts/system/vyatta_update_telnet b/scripts/system/vyatta_update_telnet deleted file mode 100755 index f50eef79..00000000 --- a/scripts/system/vyatta_update_telnet +++ /dev/null @@ -1,84 +0,0 @@ -#! /bin/bash -# Script to control telnet daemon parameters -# and block changes when logged in over telnet - -# Block changes to telnet daemon when logged in over telnet -pid=$(who -um | awk -F " " '{print $7}') -if [ -n "$pid" ]; then - if ps --pid $(ps --pid $pid -o ppid=) -o cmd= | grep -q telnetd - then - echo "Please configure telnet settings via ssh or console." - exit 1 - fi -fi - -usage() { - echo "Usage: $0 enable " - echo " $0 disable" - echo " $0 allow-root {true|false}" - exit 1; -} - -allow-root() { - case "$1" in - true) ;; - false) ;; - *) echo "Expect true or false" - usage ;; - esac - - sudo sed -i -e '/^# Pseudo-terminal (telnet)/,$d' /etc/securetty - - if [ $1 = "false" ]; then - return - fi - - sudo sh -c "cat >>/etc/securetty" < 0 && $VAR(@) <= 65535 ; \ - "Port number must be in range 1 to 65535" -commit:expression: exec "sudo /opt/vyatta/sbin/is_port_available.pl $VAR(@)"; \ - "Port $VAR(@) is already in use!" -- cgit v1.2.3 From 9499b3e5f88ce72054046ac8a6c0da305f1b5fa4 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 26 Dec 2017 16:53:01 +0100 Subject: T488: GRUB can't boot from software RAID --- debian/changelog | 6 ++++++ scripts/vyatta-grub-setup | 37 +++++++++++++++++++++---------------- 2 files changed, 27 insertions(+), 16 deletions(-) (limited to 'debian/changelog') diff --git a/debian/changelog b/debian/changelog index 8d4ebc05..e69f9e04 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-cfg-system (0.20.44+vyos2+current5) unstable; urgency=medium + + * T488: GRUB can't boot from software RAID + + -- Christian Poessinger Tue, 26 Dec 2017 14:40:54 +0100 + vyatta-cfg-system (0.20.44+vyos2+current4) unstable; urgency=medium * T414: Remove telnetd service diff --git a/scripts/vyatta-grub-setup b/scripts/vyatta-grub-setup index cf30cbb3..d263eff3 100755 --- a/scripts/vyatta-grub-setup +++ b/scripts/vyatta-grub-setup @@ -1,7 +1,7 @@ #!/bin/sh # # Module: grup-setup -# +# # **** License **** # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -15,11 +15,11 @@ # This code was originally developed by Vyatta, Inc. # Portions created by Vyatta are Copyright (C) 2006, 2007 Vyatta, Inc. # All Rights Reserved. -# +# # Author: Robert Bays # Date: 2006 # Description: -# +# # **** End License **** # # Vyatta grub customization setup script. @@ -55,7 +55,7 @@ ROOT_PARTITION="$1" GRUB_OPTIONS="$2" ROOTFSDIR="$3" -[ "$ROOT_PARTITION" ] || exit 1 +[ "$ROOT_PARTITION" ] || exit 1 # Grub options if [ "$GRUB_OPTIONS" ] @@ -114,7 +114,7 @@ if eval "$UNION"; then 2> /dev/null | grep -v xen \ | awk -F/ '{ print $6 }' | sed 's/vmlinuz//g' \ | sort -r) -else +else # Read UUID off of filesystem and use it to tell GRUB where to mount drive # This allows device to move around and grub will still find it uuid=$(dumpe2fs -h /dev/${ROOT_PARTITION} 2>/dev/null | awk '/^Filesystem UUID/ {print $3}') @@ -133,7 +133,7 @@ if [ -n "$xen_kernel_version" ] || [ -n "$union_xen_kernel_version" ]; then default_console=0 fi -# Check for diagnostic partition residing in first partition of drive +# Check for diagnostic partition residing in first partition of drive # holding the root partition. diag_drive_number="" @@ -175,10 +175,15 @@ fi echo "terminal_output --append serial" if [ ${ROOT_PARTITION:0:2} = "md" ]; then + uuid_root_disk=`/sbin/tune2fs -l /dev/${root_disk}1 | grep UUID | awk '{print $3}'` + uuid_root_md=`/sbin/tune2fs -l /dev/md${ROOT_PARTITION#md} | grep UUID | awk '{print $3}'` echo "" - echo -e "insmod mdraid09" + echo -e "insmod part_msdos" + echo -e "insmod diskfilter" + echo -e "insmod ext2" echo -e "insmod mdraid1x" - echo -e "set root=(md/${ROOT_PARTITION#md})" + echo -e "set root='mduuid/${uuid_root_disk}'" + echo -e "search --no-floppy --fs-uuid --set=root ${uuid_root_md}" fi # create xen kernels if they exist @@ -226,7 +231,7 @@ fi echo -e "\tlinux /boot/$livedir/vmlinuz $GRUB_OPTIONS $usb_console" echo -e "\tinitrd /boot/$livedir/initrd.img" echo -e "}" - + elif [ -n "$union_kernel_versions" ]; then for kversion in $union_kernel_versions; do echo @@ -254,8 +259,8 @@ fi echo -e "\tlinux /boot/vmlinuz $GRUB_OPTIONS $VGA_LOGO $vty_console" echo -e "\tinitrd /boot/initrd.img" echo -e "}" - - # Set the second system boot option. + + # Set the second system boot option. # Make the serial port be the default console in this one. echo echo -e "menuentry \"VyOS $version (Serial console)\" {" @@ -288,19 +293,19 @@ fi fi fi - # Set options for root password reset. Offer + # Set options for root password reset. Offer # options for both serial and KVM console. reset_boot_path=/boot if eval "$UNION"; then reset_boot_path=/boot/$livedir fi - + echo echo -e "menuentry \"Lost password change $version (KVM console)\" {" echo -e "\tlinux $reset_boot_path/vmlinuz $GRUB_OPTIONS $NOSELINUX $vty_console init=$pass_reset" echo -e "\tinitrd $reset_boot_path/initrd.img" echo -e "}" - + echo echo -e "menuentry \"Lost password change $version (Serial console)\" {" echo -e "\tlinux $reset_boot_path/vmlinuz $GRUB_OPTIONS $NOSELINUX $serial_console init=$pass_reset" @@ -314,12 +319,12 @@ fi echo -e "}" if [ -n "$diag_drive_number" ]; then - echo + echo echo -e "menuentry \"Diagnostics\" {" echo -e "\tchainloader (hd$diag_drive_number,1)+1" echo -e "}" fi - + ) >"$ROOTFSDIR"/boot/grub/grub.cfg -- cgit v1.2.3 From 28ab553cfbe8d682314d61d0bac520deacfa14c7 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 27 Dec 2017 22:29:53 +0100 Subject: T496: remove diagnostic partition for RAID1 installs --- debian/changelog | 6 ++++++ scripts/install-system | 21 +-------------------- scripts/install/install-get-partition | 22 ++-------------------- scripts/vyatta-grub-setup | 27 --------------------------- 4 files changed, 9 insertions(+), 67 deletions(-) (limited to 'debian/changelog') diff --git a/debian/changelog b/debian/changelog index e69f9e04..d1169cde 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-cfg-system (0.20.44+vyos2+current6) unstable; urgency=medium + + * T496: remove diagnostic partition for RAID1 installs + + -- Christian Poessinger Wed, 27 Dec 2017 23:32:44 +0100 + vyatta-cfg-system (0.20.44+vyos2+current5) unstable; urgency=medium * T488: GRUB can't boot from software RAID diff --git a/scripts/install-system b/scripts/install-system index 108153da..e8464951 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -399,7 +399,7 @@ check_for_new_raid () { # # Partition creation variables are in units of megabytes. part_start_offset=2 - part_diag_size=60 + data_dev=1 if [ $drivesize1 -lt $drivesize2 ]; then root_size=$drivesize1 @@ -407,25 +407,6 @@ check_for_new_raid () { root_size=$drivesize2 fi - let min_size_with_diag=${MIN_ROOT}+${part_diag_size} - if [ $root_size -ge $min_size_with_diag ]; then - echo "Would you like me to create a $part_diag_size MB partition for diagnostics?" - echo -n "(Yes/No) [No]: " - diag_response=$(get_response "No" "Yes No Y N") - if [ "$diag_response" == "yes" ] || [ "$diag_response" == "y" ]; then - for drive in $drives - do - echo "Creating diag partition on drive $drive" - create_partitions "$drive" $part_diag_size $part_start_offset "no" - sfdisk --change-id /dev/$drive 1 0x6 - done - data_dev=2 - let part_start_offset+=$part_diag_size - else - data_dev=1 - fi - fi - let root_size-=$part_start_offset for drive in $drives diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition index 0ddbd443..f1b373ae 100755 --- a/scripts/install/install-get-partition +++ b/scripts/install/install-get-partition @@ -259,12 +259,12 @@ check_for_new_raid () { done # Need to leave space on both disks between the MBR and the start - # of the first partition for grub. Grub needs to embed a large + # of the first partition for grub. Grub needs to embed a large # boot image there when booting off RAID devices. # # Partition creation variables are in units of megabytes. part_start_offset=2 - part_diag_size=60 + data_dev=1 if [ $drivesize1 -lt $drivesize2 ]; then root_size=$drivesize1 @@ -272,24 +272,6 @@ check_for_new_raid () { root_size=$drivesize2 fi - let min_size_with_diag=${MIN_ROOT}+${part_diag_size} - if [ $root_size -ge $min_size_with_diag ]; then - echo "Would you like me to create a $part_diag_size MB partition for diagnostics?" - echo -n "(Yes/No) [No]: " - diag_response=$(get_response "No" "Yes No Y N") - if [ "$diag_response" == "yes" ] || [ "$diag_response" == "y" ]; then - for drive in $drives; do - echo "Creating diag partition on drive $drive" - create_partitions "$drive" $part_diag_size $part_start_offset "no" - sfdisk --change-id /dev/$drive 1 0x6 - done - data_dev=2 - let part_start_offset+=$part_diag_size - else - data_dev=1 - fi - fi - let root_size-=$part_start_offset for drive in $drives; do diff --git a/scripts/vyatta-grub-setup b/scripts/vyatta-grub-setup index d263eff3..ea4dc905 100755 --- a/scripts/vyatta-grub-setup +++ b/scripts/vyatta-grub-setup @@ -133,11 +133,6 @@ if [ -n "$xen_kernel_version" ] || [ -n "$union_xen_kernel_version" ]; then default_console=0 fi -# Check for diagnostic partition residing in first partition of drive -# holding the root partition. - -diag_drive_number="" - if [ ${ROOT_PARTITION:0:2} = "md" ]; then # Select the first disk in the RAID group to look for diag partition on root_disks=`echo /sys/block/$ROOT_PARTITION/slaves/*` @@ -149,20 +144,6 @@ else root_disk=${ROOT_PARTITION:0:${#ROOT_PARTITION}-1} fi -# If the root partition is not occupying the first partition, then we -# can look for a diag partition there. -if [ "$ROOT_PARTITION" != "${root_disk}1" ]; then - first_part_fstype=`fdisk -l /dev/$root_disk | grep ^/dev/${root_disk}1 | awk '{ print $6 }'` - - if [ "$first_part_fstype" = "FAT16" -o "$first_part_fstype" = "Dell" ]; then - # Translate the Linux drive letter (e.g. the "a" in "/dev/sda") into - # a drive number that grub uses. i.e. "a" = 0, "b" = 1, etc. - diag_drive_letter=${root_disk:2:1} - diag_drive_number=`echo $diag_drive_letter | od -t u1 -N 1 | awk '{ print $2 }'` - let diag_drive_number-=97 - fi -fi - ( # create the grub.cfg file for grub # The "default=" line selects which boot option will be used by default. @@ -318,14 +299,6 @@ fi echo -e "\tinitrd $reset_boot_path/initrd.img" echo -e "}" - if [ -n "$diag_drive_number" ]; then - echo - echo -e "menuentry \"Diagnostics\" {" - echo -e "\tchainloader (hd$diag_drive_number,1)+1" - echo -e "}" - fi - - ) >"$ROOTFSDIR"/boot/grub/grub.cfg ( [ -s /boot/grub/menu.lst ] && -- cgit v1.2.3 From 9703bda9c3e6d7172851ba4420679364fb3e62f0 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 28 Dec 2017 00:39:54 +0100 Subject: T297: Fix DNS Forwarding server does not allow IPv6 address in name-server --- debian/changelog | 6 ++++++ templates/service/dns/forwarding/name-server/node.def | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'debian/changelog') diff --git a/debian/changelog b/debian/changelog index d1169cde..0675e402 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-cfg-system (0.20.44+vyos2+current7) unstable; urgency=medium + + * T297: Fix DNS Forwarding server does not allow IPv6 address in name-server + + -- Christian Poessinger Thu, 28 Dec 2017 00:39:04 +0100 + vyatta-cfg-system (0.20.44+vyos2+current6) unstable; urgency=medium * T496: remove diagnostic partition for RAID1 installs diff --git a/templates/service/dns/forwarding/name-server/node.def b/templates/service/dns/forwarding/name-server/node.def index 3ed4c459..ac7e45b6 100644 --- a/templates/service/dns/forwarding/name-server/node.def +++ b/templates/service/dns/forwarding/name-server/node.def @@ -1,3 +1,5 @@ multi: -type: ipv4 -help: DNS server to forward queries +type: ipv4,ipv6 +help: Domain Name Server (DNS) +val_help: ipv4; Domain Name Server (DNS) address +val_help: ipv6; Domain Name Server (DNS) address -- cgit v1.2.3 From a974b61d94af35df0cc7e9a3dca3cb758d85d91e Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 21 Jan 2018 17:15:51 +0100 Subject: T523: Only bind dnsmasq to configured interfaces --- debian/changelog | 8 ++++++++ scripts/dns-forwarding/vyatta-dns-forwarding.pl | 1 + 2 files changed, 9 insertions(+) (limited to 'debian/changelog') diff --git a/debian/changelog b/debian/changelog index 0675e402..89c7b4ca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +vyatta-cfg-system (0.20.44+vyos2+current8) unstable; urgency=medium + + * T523: Only bind dnsmasq to configured interfaces + * T523: Use systemctl to stop/restart dnsmasq + * T523: Use new location for dnsmasq config files + + -- Christian Poessinger Sun, 21 Jan 2018 17:16:04 +0100 + vyatta-cfg-system (0.20.44+vyos2+current7) unstable; urgency=medium * T297: Fix DNS Forwarding server does not allow IPv6 address in name-server diff --git a/scripts/dns-forwarding/vyatta-dns-forwarding.pl b/scripts/dns-forwarding/vyatta-dns-forwarding.pl index bb091e9d..00a64b3e 100755 --- a/scripts/dns-forwarding/vyatta-dns-forwarding.pl +++ b/scripts/dns-forwarding/vyatta-dns-forwarding.pl @@ -50,6 +50,7 @@ sub dnsforwarding_get_constants { $output .= "log-facility=/var/log/dnsmasq.log\n"; $output .= "no-poll\n"; $output .= "edns-packet-max=4096\n"; + $output .= "bind-interfaces\n"; system("rm -f /var/log/dnsmasq.log; touch /var/log/dnsmasq.log"); return $output; } -- cgit v1.2.3 From 622228a6e8c600c895192daa7f3227602ba1237c Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 21 Feb 2018 11:29:48 +0100 Subject: 0.20.44+vyos2+current9 --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'debian/changelog') diff --git a/debian/changelog b/debian/changelog index 89c7b4ca..4eaba380 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +vyatta-cfg-system (0.20.44+vyos2+current9) unstable; urgency=medium + + * T546: Add support for IPv6 address in 'service dns forwarding domain' + * T533: Rename "client" NTP option to "allow-clients" + * T522: Adjust rsyslog.conf to use the journald forwarding + + -- Christian Poessinger Wed, 21 Feb 2018 11:28:46 +0100 + vyatta-cfg-system (0.20.44+vyos2+current8) unstable; urgency=medium * T523: Only bind dnsmasq to configured interfaces -- cgit v1.2.3 From 6e7c0b944331c5aca04ed9343007b767adc5b36a Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 10 Mar 2018 19:07:47 +0100 Subject: 0.20.44+vyos2+current10 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian/changelog') diff --git a/debian/changelog b/debian/changelog index 4eaba380..215f2a1e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-cfg-system (0.20.44+vyos2+current10) unstable; urgency=medium + + * T157: Remove "install system" command + + -- Christian Poessinger Sat, 10 Mar 2018 18:34:00 +0100 + vyatta-cfg-system (0.20.44+vyos2+current9) unstable; urgency=medium * T546: Add support for IPv6 address in 'service dns forwarding domain' -- cgit v1.2.3 From 38e2a80870cd2407377458dee2b4e08aef24b088 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 15 Apr 2018 18:18:43 +0200 Subject: T588: Remove DNS forwarder restart command in favour if XML interface definition --- Makefile.am | 1 - debian/changelog | 6 + debian/control | 1 - scripts/dns-forwarding/vyatta-dns-forwarding.pl | 274 ------------------------ 4 files changed, 6 insertions(+), 276 deletions(-) delete mode 100755 scripts/dns-forwarding/vyatta-dns-forwarding.pl (limited to 'debian/changelog') diff --git a/Makefile.am b/Makefile.am index 23a716b5..77088eaa 100644 --- a/Makefile.am +++ b/Makefile.am @@ -60,7 +60,6 @@ sbin_SCRIPTS += scripts/snmp/vyatta-snmp.pl sbin_SCRIPTS += scripts/snmp/vyatta-snmp-v3.pl sbin_SCRIPTS += scripts/snmp/if-mib-alias sbin_SCRIPTS += scripts/telnetd.init -sbin_SCRIPTS += scripts/dns-forwarding/vyatta-dns-forwarding.pl sbin_SCRIPTS += scripts/dynamic-dns/vyatta-dynamic-dns.pl sbin_SCRIPTS += scripts/vyatta-system-nameservers sbin_SCRIPTS += scripts/vyatta-interfaces.pl diff --git a/debian/changelog b/debian/changelog index 215f2a1e..a1ec904a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-cfg-system (0.20.44+vyos2+current11) unstable; urgency=medium + + * T588: Remove DNS forwarder restart command in favour if XML interface definition + + -- Christian Poessinger Wed, 11 Apr 2018 20:35:32 +0200 + vyatta-cfg-system (0.20.44+vyos2+current10) unstable; urgency=medium * T157: Remove "install system" command diff --git a/debian/control b/debian/control index 5edd8be0..1b6d08a6 100644 --- a/debian/control +++ b/debian/control @@ -42,7 +42,6 @@ Depends: adduser, tasksel, snmp, tcpdump, - dnsmasq, mdadm, ddclient (>= 3.8.2+vyos2+current1), dnsutils, diff --git a/scripts/dns-forwarding/vyatta-dns-forwarding.pl b/scripts/dns-forwarding/vyatta-dns-forwarding.pl deleted file mode 100755 index 00a64b3e..00000000 --- a/scripts/dns-forwarding/vyatta-dns-forwarding.pl +++ /dev/null @@ -1,274 +0,0 @@ -#!/usr/bin/perl -# -# Module: vyatta-dns-forwarding.pl -# -# **** License **** -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# This code was originally developed by Vyatta, Inc. -# Portions created by Vyatta are Copyright (C) 2008 Vyatta, Inc. -# All Rights Reserved. -# -# Author: Mohit Mehta -# Date: August 2008 -# Description: Script to glue Vyatta CLI to dnsmasq daemon -# -# **** End License **** -# - -use lib "/opt/vyatta/share/perl5/"; -use Vyatta::Config; -use Vyatta::Misc; -use Getopt::Long; - -use strict; -use warnings; - -my $dnsforwarding_conf = '/etc/dnsmasq.d/vyos.conf'; - -sub dnsforwarding_restart { - system("systemctl restart dnsmasq"); -} - -sub dnsforwarding_stop { - system("systemctl stop dnsmasq"); -} - -sub dnsforwarding_get_constants { - my $output; - - my $date = `date`; - chomp $date; - $output = "#\n# autogenerated by vyatta-dns-forwarding.pl on $date\n#\n"; - $output .= "log-facility=/var/log/dnsmasq.log\n"; - $output .= "no-poll\n"; - $output .= "edns-packet-max=4096\n"; - $output .= "bind-interfaces\n"; - system("rm -f /var/log/dnsmasq.log; touch /var/log/dnsmasq.log"); - return $output; -} - -sub dnsforwarding_get_values { - - my $outside_cli = shift; - - my $output = ''; - my $config = new Vyatta::Config; - my $use_dnsmasq_conf = 0; - my (@listen_interfaces, $cache_size, @use_nameservers, $use_system_nameservers, @use_dhcp_nameservers, @domains, $server, $ignore_hosts_file, $query_all_servers); - - $config->setLevel("service dns forwarding"); - - if ($outside_cli == 1) { - @listen_interfaces = $config->returnOrigValues("listen-on"); - $cache_size = $config->returnOrigValue("cache-size"); - @use_nameservers = $config->returnOrigValues("name-server"); - $use_system_nameservers = $config->existsOrig("system"); - @use_dhcp_nameservers = $config->returnOrigValues("dhcp"); - @domains = $config->listOrigNodes("domain"); - $ignore_hosts_file = $config->returnOrigValue("ignore-hosts-file"); - $query_all_servers = $config->returnOrigValue("query-all-servers"); - - } else { - @listen_interfaces = $config->returnValues("listen-on"); - $cache_size = $config->returnValue("cache-size"); - @use_nameservers = $config->returnValues("name-server"); - $use_system_nameservers = $config->exists("system"); - @use_dhcp_nameservers = $config->returnValues("dhcp"); - @domains = $config->listNodes("domain"); - $ignore_hosts_file = $config->exists("ignore-hosts-file"); - $query_all_servers = $config->exists("query-all-servers"); - } - - if (@listen_interfaces != 0) { - foreach my $interface (@listen_interfaces) { - $output .= "interface=$interface\n"; - } - } - - if (defined $cache_size) { - $output .= "cache-size=$cache_size\n"; - } - - if (defined $query_all_servers) { - $output .= "all-servers\n"; - } - - if (defined $ignore_hosts_file) { - $output .= "no-hosts\n"; - } - - if (@use_nameservers != 0) { - $use_dnsmasq_conf = 1; - foreach my $cli_nameserver (@use_nameservers) { - $output .= "server=$cli_nameserver\t# statically configured\n"; - } - } - - if (defined($use_system_nameservers)) { - $use_dnsmasq_conf = 1; - my $sys_config = new Vyatta::Config; - $sys_config->setLevel("system"); - my @system_nameservers; - if ($outside_cli == 1) { - @system_nameservers = $sys_config->returnOrigValues("name-server"); - } else { - @system_nameservers = $sys_config->returnValues("name-server"); - } - if (@system_nameservers > 0) { - foreach my $system_nameserver (@system_nameservers) { - $output .= "server=$system_nameserver\t# system\n"; - } - } - } - if (@domains != 0) { - foreach my $domain (@domains) { - my @domain_servers; - if ($outside_cli == 1) { - @domain_servers = $config->returnValues("domain $domain server"); - } else { - @domain_servers = $config->returnValues("domain $domain server"); - } - if (@domain_servers > 0) { - foreach my $domain_server (@domain_servers) { - $output .= "server=/$domain/$domain_server\t# domain-override\n"; - } - } - } - } - - if (@use_dhcp_nameservers != 0) { - $use_dnsmasq_conf = 1; - foreach my $interface (@use_dhcp_nameservers) { - my $dhcp_nameserver_count=`grep nameserver /etc/resolv.conf.dhclient-new-$interface 2>/dev/null | wc -l`; - if ($dhcp_nameserver_count > 0) { - my @dhcp_nameservers = `grep nameserver /etc/resolv.conf.dhclient-new-$interface`; - for my $each_nameserver (@dhcp_nameservers) { - my @nameserver = split(/ /, $each_nameserver, 2); - my $ns = $nameserver[1]; - chomp $ns; - $output .= "server=$ns\t# dhcp $interface\n"; - } - } - } - } - - if ($use_dnsmasq_conf == 1) { - $output .= "resolv-file=/etc/resolv.conf\n"; - } - - return $output; -} - -sub dnsforwarding_write_file { - my ($config) = @_; - - open(my $fh, '>', $dnsforwarding_conf) || die "Couldn't open $dnsforwarding_conf - $!"; - print $fh $config; - close $fh; -} - -sub check_nameserver { - - my $cmd = `cat /etc/resolv.conf 2>/dev/null | awk {'print \$1'} | grep \^nameserver\$ | wc -l`; - return $cmd; -} - -sub check_system_nameserver { - - my $config = new Vyatta::Config; - $config->setLevel("system"); - my @system_nameservers = $config->returnValues("name-server"); - return(@system_nameservers); - -} - -sub check_dhcp_interface { - - my $interface = shift; - - die "DNS forwarding error: $interface is not using DHCP to get an IP address\n" - unless Vyatta::Misc::is_dhcp_enabled($interface); - - if (-e "/var/run/vyatta/dhclient/dhclient_release_$interface") { - - # dhcp released for the interface - print "DNS forwarding warning: DHCP lease for $interface has been released by user\n"; - } - - return 1; -} - -# -# main -# - -my ($update_dnsforwarding, $stop_dnsforwarding, $restart_dnsforwarding, $system_nameserver, $dhcp_interface, $outside_cli); - -GetOptions( - "update-dnsforwarding!" => \$update_dnsforwarding, - "stop-dnsforwarding!" => \$stop_dnsforwarding, - "restart-dnsforwarding!" => \$restart_dnsforwarding, - "system-nameserver!" => \$system_nameserver, - "outside-cli!" => \$outside_cli, - "dhcp-interface=s" => \$dhcp_interface -); - -if (defined $system_nameserver) { - my $system_nameserver_exists = check_system_nameserver(); - if ($system_nameserver_exists < 1){ - print "DNS forwarding warning: No name-servers set under 'system name-server'\n"; - } -} - -if (defined $dhcp_interface) { - if (!check_dhcp_interface($dhcp_interface)){ - exit 1; - } -} - -if (defined $update_dnsforwarding) { - my $config; - my $vyatta_config = new Vyatta::Config; - - $vyatta_config->setLevel("service dns forwarding"); - my $use_system_nameservers = $vyatta_config->exists("system"); - my @use_dhcp_nameservers = $vyatta_config->returnValues("dhcp"); - my @use_nameservers = $vyatta_config->returnValues("name-server"); - - if (!(defined $use_system_nameservers) && (@use_dhcp_nameservers == 0) && (@use_nameservers == 0)) { - my $nameserver_exists = check_nameserver(); - if ($nameserver_exists < 1){ - print "DNS forwarding warning: Currently, no name-servers to forward DNS queries\n"; - } - } - - my $called_from_outside_cli = 0; - if (defined $outside_cli){ - $called_from_outside_cli = 1; - } - $config = dnsforwarding_get_constants(); - $config .= dnsforwarding_get_values($called_from_outside_cli); - dnsforwarding_write_file($config); - dnsforwarding_restart(); -} - -if (defined $stop_dnsforwarding) { - dnsforwarding_stop(); -} - -if (defined $restart_dnsforwarding) { - dnsforwarding_restart(); -} - -exit 0; - -# end of file - -- cgit v1.2.3