From 325cfa1ed8dfe41aaf393bdf04f38c6b392f7994 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Sat, 12 Jul 2008 17:01:56 -0700 Subject: fix for bug 3459: make bash-completion use "builtin set". --- debian/vyatta-cfg-system.postinst.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in index b21437a5..cac2a55a 100644 --- a/debian/vyatta-cfg-system.postinst.in +++ b/debian/vyatta-cfg-system.postinst.in @@ -85,6 +85,8 @@ if [ ! -f /etc/bash_completion ]; then echo "source /etc/bash_completion.d/20vyatta-cfg" >> /etc/bash_completion fi +sed -i 's/^set /builtin set /' /etc/bash_completion + # Local Variables: # mode: shell-script # sh-indentation: 4 -- cgit v1.2.3 From c415474342cccde3cbe00cb6fc4a7ee3aeb00cc3 Mon Sep 17 00:00:00 2001 From: rbalocca Date: Tue, 22 Jul 2008 12:10:05 -0700 Subject: The postinst was printing a '?' --- debian/vyatta-cfg-system.postinst.in | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in index cac2a55a..e7ac929a 100644 --- a/debian/vyatta-cfg-system.postinst.in +++ b/debian/vyatta-cfg-system.postinst.in @@ -32,6 +32,7 @@ if [ "$sysconfdir" != "/etc" ]; then fi # cleanup any old entries from previous versions + touch /etc/sudoers ed - /etc/sudoers < Date: Fri, 25 Jul 2008 14:56:16 +0000 Subject: add dnsmasq package to be included in the build --- debian/control | 3 ++- debian/vyatta-cfg-system.postinst.in | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 214be062..20237cd1 100644 --- a/debian/control +++ b/debian/control @@ -33,7 +33,8 @@ Depends: sed (>= 4.1.5), usbutils, tasksel, snmp, - tcpdump + tcpdump, + dnsmasq Pre-Depends: bash-completion Suggests: util-linux (>= 2.13-5), net-tools, diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in index 61a4842a..91e5f1e0 100644 --- a/debian/vyatta-cfg-system.postinst.in +++ b/debian/vyatta-cfg-system.postinst.in @@ -7,7 +7,7 @@ bindir=@bindir@ sbindir=@sbindir@ # remove init of daemons that we start/stop -for init in ntp ssh snmpd openhpid vyatta-keepalived ipvsadm; do +for init in ntp ssh snmpd openhpid vyatta-keepalived ipvsadm dnsmasq; do update-rc.d -f ${init} remove >/dev/null done -- cgit v1.2.3 From 573add99eb1632e43707acd086d7010d08f465d5 Mon Sep 17 00:00:00 2001 From: rbalocca Date: Mon, 28 Jul 2008 16:26:29 -0700 Subject: Since this packages changes the bash-completion conf file, it must be installed after bash-completion --- debian/control | 1 + debian/vyatta-cfg-system.postinst.in | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 4b5692bb..214be062 100644 --- a/debian/control +++ b/debian/control @@ -34,6 +34,7 @@ Depends: sed (>= 4.1.5), tasksel, snmp, tcpdump +Pre-Depends: bash-completion Suggests: util-linux (>= 2.13-5), net-tools, ethtool, diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in index e7ac929a..61a4842a 100644 --- a/debian/vyatta-cfg-system.postinst.in +++ b/debian/vyatta-cfg-system.postinst.in @@ -23,6 +23,7 @@ esac ln -sf ../vyatta-net.rules /etc/udev/rules.d/$vyatta_net_rules if [ "$sysconfdir" != "/etc" ]; then + touch /etc/sudoers cp -p /etc/sudoers /etc/sudoers.bak # for "admin" level @@ -32,7 +33,6 @@ if [ "$sysconfdir" != "/etc" ]; then fi # cleanup any old entries from previous versions - touch /etc/sudoers ed - /etc/sudoers < Date: Wed, 30 Jul 2008 11:48:06 -0700 Subject: Bugfix: 3519 Fix some typos in standalone_root_pw_reset. --- scripts/standalone_root_pw_reset | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/standalone_root_pw_reset b/scripts/standalone_root_pw_reset index b173f22d..336d534d 100755 --- a/scripts/standalone_root_pw_reset +++ b/scripts/standalone_root_pw_reset @@ -70,13 +70,13 @@ cp $CF ${CF}.before_pwrecovery echo "Reseting the root password..." # change system first -newpwd=$(mkpasswd -H md5 vyatta) +newpwd=`mkpasswd -H md5 vyatta` usermod --password "$newpwd" root # escape / in encrypted passwd pw=$(echo $newpwd | sed 's:/:\\/:g') sed -i \ - -e "/^.* user root {/,/}/s/encrypted-password:.*\$/encrypted-password: \"$pw\"/" \ + -e "/^.* user root {/,/}/s/encrypted-password .*\$/encrypted-password \"$pw\"/" \ $CF echo $(date "+%b%e %T") $(hostname) "Root password reset to factory value" \ -- cgit v1.2.3 From c7e46403008ba169b262d24f90e12aaa30d98074 Mon Sep 17 00:00:00 2001 From: Rick Balocca Date: Wed, 30 Jul 2008 12:19:45 -0700 Subject: Partial fix for http://bugzilla.vyatta.com/show_bug.cgi?id=3225 --- debian/vyatta-cfg-system.postinst.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in index 61a4842a..109e59d1 100644 --- a/debian/vyatta-cfg-system.postinst.in +++ b/debian/vyatta-cfg-system.postinst.in @@ -33,7 +33,7 @@ if [ "$sysconfdir" != "/etc" ]; then fi # cleanup any old entries from previous versions - ed - /etc/sudoers <&/dev/null < Date: Wed, 30 Jul 2008 12:39:23 -0700 Subject: Fix for http://bugzilla.vyatta.com/show_bug.cgi?id=3225 --- debian/vyatta-cfg-system.postinst.in | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in index 109e59d1..0dd6248f 100644 --- a/debian/vyatta-cfg-system.postinst.in +++ b/debian/vyatta-cfg-system.postinst.in @@ -33,13 +33,12 @@ if [ "$sysconfdir" != "/etc" ]; then fi # cleanup any old entries from previous versions - ed /etc/sudoers >&/dev/null <>/etc/sudoers ### BEGIN VYATTA -- cgit v1.2.3 From 87365a0abddc24dd19b3c237fc04dd3d1417e936 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 30 Jul 2008 15:06:03 -0700 Subject: Get rid of debian build warning Line too long --- debian/copyright | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/copyright b/debian/copyright index f12deb1f..5eb46c84 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,7 +1,8 @@ This package was debianized by An-Cheng Huang on Thu, 18 Oct 2007 11:03:18 -0700. -It's original content from the GIT repository +It's original content from the GIT repository + Upstream Author: -- cgit v1.2.3 From d2dd129521ef01ce95cb1ba46d6cda19212f71db Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Wed, 30 Jul 2008 15:41:53 -0700 Subject: Enable IPv6 forwarding. --- sysconf/vyatta-sysctl.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysconf/vyatta-sysctl.conf b/sysconf/vyatta-sysctl.conf index cb03a614..fae11945 100644 --- a/sysconf/vyatta-sysctl.conf +++ b/sysconf/vyatta-sysctl.conf @@ -24,3 +24,6 @@ net.ipv4.icmp_errors_use_inbound_ifaddr=1 # Turn off SACK since it causes problems with MD5 due to lack of options space net.ipv4.tcp_sack=0 + +# Enable packet forwarding for IPv6 +net.ipv6.conf.all.forwarding=1 -- cgit v1.2.3 From 189dd8d9a5a467aea193aa5ce9e35c0ca14f7b91 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Wed, 30 Jul 2008 15:55:43 -0700 Subject: Add IPv6 address to comp_help for bridge/tunnel --- templates/interfaces/bridge/node.tag/address/node.def | 3 ++- templates/interfaces/tunnel/node.tag/address/node.def | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/interfaces/bridge/node.tag/address/node.def b/templates/interfaces/bridge/node.tag/address/node.def index 52188386..3f04ec06 100644 --- a/templates/interfaces/bridge/node.tag/address/node.def +++ b/templates/interfaces/bridge/node.tag/address/node.def @@ -7,5 +7,6 @@ delete:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete allowed: echo "dhcp <>" comp_help:Possible completions: Set the IP address and prefix length - dhcp\t\t\t\tSet the IP address and prefix length via DHCP + Set the IPv6 address and prefix length + dhcp Set the IP address and prefix length via DHCP diff --git a/templates/interfaces/tunnel/node.tag/address/node.def b/templates/interfaces/tunnel/node.tag/address/node.def index 07ea4a0e..3310ee00 100644 --- a/templates/interfaces/tunnel/node.tag/address/node.def +++ b/templates/interfaces/tunnel/node.tag/address/node.def @@ -9,4 +9,5 @@ update:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update delete:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $VAR(@) --dev $VAR(../@)"; "Error deleting address $VAR(@) on interface $VAR(../@)" comp_help:Possible completions: - Set the IP address and prefix length + Set the IP address and prefix length + Set the IPv6 address and prefix length -- cgit v1.2.3 From 29446d9ed7410a571ce77ee9a9f601c9653c5219 Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Fri, 25 Jul 2008 23:14:12 +0000 Subject: First parts of DNS forwarding stuff --- Makefile.am | 1 + scripts/dns-forwarding/vyatta-dns-forwarding.pl | 126 ++++++++++++++++++++++++ templates/service/dns-forwarding/node.def | 10 ++ 3 files changed, 137 insertions(+) create mode 100644 scripts/dns-forwarding/vyatta-dns-forwarding.pl create mode 100644 templates/service/dns-forwarding/node.def diff --git a/Makefile.am b/Makefile.am index 742f9025..057252dd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,6 +29,7 @@ sbin_SCRIPTS += scripts/keepalived/vyatta-vrrp-state.pl sbin_SCRIPTS += scripts/telnetd.init sbin_SCRIPTS += scripts/add_bootfile_eth_hwid sbin_SCRIPTS += scripts/mod_bootfile_eth_hwid +sbin_SCRIPTS += scripts/dns-forwarding/vyatta-dns-forwarding.pl noinst_DATA = test_bootfile diff --git a/scripts/dns-forwarding/vyatta-dns-forwarding.pl b/scripts/dns-forwarding/vyatta-dns-forwarding.pl new file mode 100644 index 00000000..01111d4a --- /dev/null +++ b/scripts/dns-forwarding/vyatta-dns-forwarding.pl @@ -0,0 +1,126 @@ +#!/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 VyattaConfig; +use VyattaMisc; +use Getopt::Long; + +use strict; +use warnings; + +my $dnsforwarding_init = '/etc/init.d/dnsmasq'; +my $dnsforwarding_conf = '/etc/dnsmasq.conf'; + +sub dnsforwarding_init { + +} + +sub dnsforwarding_restart { + system("$dnsforwarding_init restart 2&>1 /dev/null"); + print "Setting up DNS forwarding.\n"; +} + +sub dnsforwarding_stop { + system("$dnsforwarding_init stop 2&>1 /dev/null"); + print "Stopping DNS forwarding.\n"; +} + +sub dnsforwarding_get_constants { + my $output; + + my $date = `date`; + chomp $date; + $output = "#\n# autogenerated by vyatta-dns-forwarding.pl on $date\n#\n"; + return $output; +} + +sub dnsforwarding_get_values { + my $output = ''; + my $config = new VyattaConfig; + + $config->setLevel("service dns-forwarding"); + + 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 = `grep nameserver /etc/resolv.conf|wc -l`; + return $cmd; +} + +# +# main +# +my $init_dnsforwarding; +my $update_dnsforwarding; +my $stop_dnsforwarding; +my $nameserver; + +GetOptions("init-dnsforwarding!" => \$init_dnsforwarding, + "update-dnsforwarding!" => \$update_dnsforwarding, + "stop-dnsforwarding!" => \$stop_dnsforwarding, + "nameserver!" => \$nameserver); + +if (defined $nameserver) { + my $nameserver_exists = check_nameserver(); + if ($nameserver_exists < 1){ + exit 1; + } else { + exit 0; + } +} + + +if (defined $init_dnsforwarding) { + dnsforwarding_init(); +} + +if (defined $update_dnsforwarding) { + my $config; + + $config = dnsforwarding_get_constants(); + $config .= dnsforwarding_get_values(); + dnsforwarding_write_file($config); + dnsforwarding_restart(); +} + +if (defined $stop_dnsforwarding) { + dnsforwarding_stop(); +} + +exit 0; + +# end of file + diff --git a/templates/service/dns-forwarding/node.def b/templates/service/dns-forwarding/node.def new file mode 100644 index 00000000..f84e4f02 --- /dev/null +++ b/templates/service/dns-forwarding/node.def @@ -0,0 +1,10 @@ +help: Configure Domain Name Server (DNS) forwarding +syntax:expression: exec "/opt/vyatta/sbin/vyatta-dns-forwarding.pl --nameserver"; "No nameserver exists to forward DNS queries" +create:expression: "/opt/vyatta/sbin/vyatta-dns-forwarding.pl --init-dnsforwarding" +delete:expression: "touch /tmp/dnsmasq.$PPID" +end:expression: "if [ -f \"/tmp/dnsmasq.$PPID\" ]; then \ + sudo /opt/vyatta/sbin/vyatta-dns-forwarding.pl --stop-dnsforwarding \ + rm /tmp/dnsmasq.$PPID; \ + else \ + sudo /opt/vyatta/sbin/vyatta-dns-forwarding.pl --update-dnsforwarding; \ + fi; " -- cgit v1.2.3 From a34c2884bc159d0473ff99f3fccd468fab285726 Mon Sep 17 00:00:00 2001 From: rbalocca Date: Fri, 1 Aug 2008 18:11:09 -0700 Subject: Fixes for: http://bugzilla.vyatta.com/show_bug.cgi?id=3520 http://bugzilla.vyatta.com/show_bug.cgi?id=3519 http://bugzilla.vyatta.com/show_bug.cgi?d for: http://bugzilla.vyatta.com/show_bug.cgi?id=3520 http://bugzilla.vyatta.com/show_bug.cgi?id=3519 http://bugzilla.vyatta.com/show_bug.cgi?id=3518 and perhaps others --- Makefile.am | 1 + scripts/grub-setup | 180 +++++++++++++++++++++++++++++++++++++++++++++++++ scripts/install-system | 129 +++-------------------------------- 3 files changed, 190 insertions(+), 120 deletions(-) create mode 100755 scripts/grub-setup diff --git a/Makefile.am b/Makefile.am index 742f9025..576be4be 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,6 +15,7 @@ bin_SCRIPTS += scripts/vyatta-functions sbin_SCRIPTS += scripts/init-floppy sbin_SCRIPTS += scripts/rl-system.init sbin_SCRIPTS += scripts/install-system +sbin_SCRIPTS += scripts/grub-setup sbin_SCRIPTS += scripts/quick-install sbin_SCRIPTS += scripts/standalone_root_pw_reset sbin_SCRIPTS += scripts/vyatta-passwd-sync diff --git a/scripts/grub-setup b/scripts/grub-setup new file mode 100755 index 00000000..115df53d --- /dev/null +++ b/scripts/grub-setup @@ -0,0 +1,180 @@ +#!/bin/sh -x +# +# 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 +# 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) 2006, 2007 Vyatta, Inc. +# All Rights Reserved. +# +# Author: Robert Bays +# Date: 2006 +# Description: +# +# **** End License **** +# +# Vyatta grub customization setup script. +# +# + +ROOT_PARTITION="$1" +GRUB_OPTIONS="$2" +ROOTFSDIR="$3" + +[ "$GRUB_OPTIONS" -a "$ROOT_PARTITION" ] || exit 1 + +# Grub options +GRUB_OPTIONS="$GRUB_OPTIONS quiet" + +# Path to standalone root password reset script +pass_reset=/opt/vyatta/sbin/standalone_root_pw_reset + +# Output to both console (last device is /dev/console) +vty_console="console=ttyS0,9600 console=tty0" +serial_console="console=tty0 console=ttyS0,9600" + +# If vga_logo is set, enable use of the VGA monitor for displaying the +# logo during boot. The "vga=" boot command specifies a VGA mode that +# is encoded as shown below. We pick a value that is likely to work +# on most systems: +# +# Color depth | 640x480 | 800x600 | 1024x768 | 1280x1024 +# -----------------+---------+---------+----------+---------- +# 256 (8bit) | 769 771 773 775 +# 32000 (15bit) | 784 787 790 793 +# 65000 (16bit) | 785 788 791 794 +# 16.7 Mill.(24bit)| 786 789 792 795 +# +vga_logo="vga=788" + + # TODO: This needs to be changed to map to the correct drive + part=$(echo ${ROOT_PARTITION} | sed 's/[^0-9]//g') + if [ "$(cat /sys/block/$ORIG_INSTALL_DRIVE/removable)" == 0 ]; then + root=$(grep $ORIG_INSTALL_DRIVE $ROOTFSDIR/boot/grub/device.map | /usr/bin/awk -F')' '{ print $1 }') + root="$root,$part)" + else + root="(hd0,$part)" + echo "This looks like a removable device. Setting root grub device to $root." + fi + + # get list of kernels, except Xen + kernel_versions=$(ls /boot/vmlinuz-* 2> /dev/null | grep -v xen | sed 's:/boot/vmlinuz::g' | sort -r) + + # get xen kernel info + xen_kernel_version=$(ls /boot/vmlinuz*xen 2> /dev/null | sed 's:/boot/vmlinuz::g' | sort -r) + xen_version=$(ls /boot/ | grep xen- | sort -r) + + # Figure out whether we are running on the serial or KVM console: + if [ "`tty`" == "/dev/ttyS0" ]; then + # Since user is running on serial console, make that the default. + default_console=1 + else + # Since user is running on KVM console, make that the default + default_console=0 + fi + + # 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}') + if [ -z "$uuid" ] + then + # TODO: use /proc/mount if dumpe2fs fails + echo "Unable to read filesystem UUID. Exiting." + exit 1 + else + grub_root="root=UUID=$uuid ro" + fi + +( + # create the grub.cfg file for grub + # The "default=" line selects which boot option will be used by default. + # Numbering starts at 0 for the first option. + echo -e "set default=$default_console" + echo "set timeout=5" + #echo "#set splashimage=(hd0,0)/grub/splash.xpm.gz" + # set serial console options + echo -e "serial --unit=0 --speed=9600" + echo "terminal serial" + echo "set root=$root" + + echo "" + echo "echo -n Press ESC to enter the Grub menu..." + echo "if sleep --verbose --interruptible 5 ; then" + echo -e "\tterminal console" + echo -e "\techo -n Press the ESC key to enter the Grub menu..." + echo -e "\tif sleep --verbose --interruptible 5 ; then" + echo -e "\t\tterminal serial" + echo -e "\t\tset timeout=0" + echo -e "\tfi" + echo "fi" + echo "" + + if [ -f "/boot/vmlinuz" ]; then + # Set first system boot option. Make KVM the default console in this one. + echo -e "menuentry \"Vyatta OFR (KVM console)\" {" + echo -e "\tlinux /boot/vmlinuz $grub_root $GRUB_OPTIONS $vga_logo $vty_console" + echo -e "\tinitrd /boot/initrd.img" + echo -e "}" + + # Set the second system boot option. Make the serial port be the default + # console in this one. + echo + echo -e "menuentry \"Vyatta OFR (Serial console)\" {" + echo -e "\tlinux /boot/vmlinuz $grub_root $GRUB_OPTIONS $serial_console" + echo -e "\tinitrd /boot/initrd.img" + echo -e "}" + fi + + # create xen kernels if they exist + if [ -n "$xen_kernel_version" ]; then + for xversion in $xen_kernel_version; do + echo + echo + echo -e "menuentry \"Vyatta Xen linux$xversion dom0\" {" + echo -e "\tmultiboot /boot/$xen_version " + echo -e "\tmodule /boot/vmlinuz$xversion $grub_root $GRUB_OPTIONS $vty_console" + echo -e "\tmodule /boot/initrd.img$xversion" + echo -e "}" + done + fi + + # create other kernels if they exist + if [ -n "$kernel_versions" ]; then + for kversion in $kernel_versions; do + echo + echo -e "menuentry \"Vyatta OFR linux$kversion (KVM console)\" {" + echo -e "\tlinux /boot/vmlinuz$kversion $grub_root $GRUB_OPTIONS $vty_console" + echo -e "\tinitrd /boot/initrd.img$kversion" + echo -e "}" + echo + echo -e "menuentry \"Vyatta OFR linux$kversion (Serial console)\" {" + echo -e "\tlinux /boot/vmlinuz$kversion $grub_root $GRUB_OPTIONS $serial_console" + echo -e "\tinitrd /boot/initrd.img$kversion" + echo -e "}" + done + fi + + # Set options for root password reset. Offer + # options for both serial and KVM console. + + echo + echo -e "menuentry \"Root password reset to factory (KVM console)\" {" + echo -e "\tlinux /boot/vmlinuz $grub_root $GRUB_OPTIONS $vty_console init=$pass_reset" + echo -e "\tinitrd /boot/initrd.img" + echo -e "}" + + echo + echo -e "menuentry \"Root password reset to factory (Serial console)\" {" + echo -e "\tlinux /boot/vmlinuz $grub_root $GRUB_OPTIONS $serial_console init=$pass_reset" + echo -e "\tinitrd /boot/initrd.img" + echo -e "}" +) >"$ROOTFSDIR"/boot/grub/grub.cfg diff --git a/scripts/install-system b/scripts/install-system index d6ea9b74..a704d4a7 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -612,131 +612,20 @@ install_grub () { grub-install --no-floppy --root-directory=$rootfsdir /dev/$INSTALL_DRIVE >>$INSTALL_LOG 2>&1 progress_indicator stop - # TODO: This needs to be changed to map to the correct drive - part=$(echo $ROOT_PARTITION | sed 's/[^0-9]//g') - if [ "$(cat /sys/block/$orig_install_drive/removable)" == 0 ]; then - root=$(grep $orig_install_drive $rootfsdir/boot/grub/device.map | /usr/bin/awk -F')' '{ print $1 }') - root="$root,$part)" - else - root="(hd0,$part)" - echo "This looks like a removable device. Setting root grub device to $root." - echo "This looks like a removable device. Setting root grub device to $root." >> $INSTALL_LOG - fi - - # get list of kernels, except Xen - kernel_versions=$(ls /boot/vmlinuz-* 2> /dev/null | grep -v xen | sed 's:/boot/vmlinuz::g' | sort -r) - - # get xen kernel info - xen_kernel_version=$(ls /boot/vmlinuz*xen 2> /dev/null | sed 's:/boot/vmlinuz::g' | sort -r) - xen_version=$(ls /boot/ | grep xen- | sort -r) - - # Figure out whether we are running on the serial or KVM console: - if [ "`tty`" == "/dev/ttyS0" ]; then - # Since user is running on serial console, make that the default. - DEFAULT_CONSOLE="1" - else - # Since user is running on KVM console, make that the default - DEFAULT_CONSOLE="0" + # Assume no dma if the disk is smaller than 10G (such as a CF drive) + size=$(get_drive_size $INSTALL_DRIVE) + if [[ $size -lt 11000 && ! $grub_options =~ 'ide=nodma' ]] + then + grub_options="ide=nodma" fi - # 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 - local rootdev="/dev/$ROOT_PARTITION"; - uuid=$(dumpe2fs -h $rootdev 2>/dev/null | awk '/^Filesystem UUID/ {print $3}') - if [ -z "$uuid" ] + if /opt/vyatta/sbin/grub-setup "$ROOT_PARTITION" "$grub_options" /mnt/rootfs >>$INSTALL_LOG then - echo "Unable to read filesystem UUID. Exiting." - exit 1 + echo "OK" else - GRUB_ROOT="root=UUID=$uuid ro" + echo Grub failed to install! + exit 1 fi - - ( - # create the grub.cfg file for grub - # The "default=" line selects which boot option will be used by default. - # Numbering starts at 0 for the first option. - echo -e "set default=$DEFAULT_CONSOLE" - echo "set timeout=5" - #echo "#set splashimage=(hd0,0)/grub/splash.xpm.gz" - # set serial console options - echo -e "serial --unit=0 --speed=9600" - echo "terminal serial" - echo "set root=$root" - - echo "" - echo "echo -n Press ESC to enter the Grub menu..." - echo "if sleep --verbose --interruptible 5 ; then" - echo -e "\tterminal console" - echo -e "\techo -n Press the ESC key to enter the Grub menu..." - echo -e "\tif sleep --verbose --interruptible 5 ; then" - echo -e "\t\tterminal serial" - echo -e "\t\tset timeout=0" - echo -e "\tfi" - echo "fi" - echo "" - - if [ -f "/boot/vmlinuz" ]; then - # Set first system boot option. Make KVM the default console in this one. - echo -e "menuentry \"Vyatta OFR (KVM console)\" {" - echo -e "\tlinux /boot/vmlinuz $GRUB_ROOT $GRUB_OPTIONS $VGA_LOGO $VTY_CONSOLE" - echo -e "\tinitrd /boot/initrd.img" - echo -e "}" - - # Set the second system boot option. Make the serial port be the default - # console in this one. - echo - echo -e "menuentry \"Vyatta OFR (Serial console)\" {" - echo -e "\tlinux /boot/vmlinuz $GRUB_ROOT $GRUB_OPTIONS $SERIAL_CONSOLE" - echo -e "\tinitrd /boot/initrd.img" - echo -e "}" - fi - - # create xen kernels if they exist - if [ -n "$xen_kernel_version" ]; then - for xversion in $xen_kernel_version; do - echo - echo - echo -e "menuentry \"Vyatta Xen linux$xversion dom0\" {" - echo -e "\tmultiboot /boot/$xen_version " - echo -e "\tmodule /boot/vmlinuz$xversion $GRUB_ROOT $GRUB_OPTIONS $VTY_CONSOLE" - echo -e "\tmodule /boot/initrd.img$xversion" - echo -e "}" - done - fi - - # create other kernels if they exist - if [ -n "$kernel_versions" ]; then - for kversion in $kernel_versions; do - echo - echo -e "menuentry \"Vyatta OFR linux$kversion (KVM console)\" {" - echo -e "\tlinux /boot/vmlinuz$kversion $GRUB_ROOT $GRUB_OPTIONS $VTY_CONSOLE" - echo -e "\tinitrd /boot/initrd.img$kversion" - echo -e "}" - echo - echo -e "menuentry \"Vyatta OFR linux$kversion (Serial console)\" {" - echo -e "\tlinux /boot/vmlinuz$kversion $GRUB_ROOT $GRUB_OPTIONS $SERIAL_CONSOLE" - echo -e "\tinitrd /boot/initrd.img$kversion" - echo -e "}" - done - fi - - # Set options for root password reset. Offer - # options for both serial and KVM console. - - echo - echo -e "menuentry \"Root password reset to factory (KVM console)\" {" - echo -e "\tlinux /boot/vmlinuz $GRUB_ROOT $GRUB_OPTIONS $VTY_CONSOLE init=$PWRESET" - echo -e "\tinitrd /boot/initrd.img" - echo -e "}" - - echo - echo -e "menuentry \"Root password reset to factory (Serial console)\" {" - echo -e "\tlinux /boot/vmlinuz $GRUB_ROOT $GRUB_OPTIONS $SERIAL_CONSOLE init=$PWRESET" - echo -e "\tinitrd /boot/initrd.img" - echo -e "}" - ) >"$rootfsdir/boot/grub/grub.cfg" - - echo "OK" } # ask for user input on the parted and skip setup methods -- cgit v1.2.3 From b0806d31e4f5b98ebe293d127c7118bcab28d1bb Mon Sep 17 00:00:00 2001 From: Rick Balocca Date: Sun, 3 Aug 2008 11:15:25 -0700 Subject: Additional fixes for http://bugzilla.vyatta.com/show_bug.cgi?id=3520 --- scripts/grub-setup | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/scripts/grub-setup b/scripts/grub-setup index 115df53d..301d386f 100755 --- a/scripts/grub-setup +++ b/scripts/grub-setup @@ -30,7 +30,7 @@ ROOT_PARTITION="$1" GRUB_OPTIONS="$2" ROOTFSDIR="$3" -[ "$GRUB_OPTIONS" -a "$ROOT_PARTITION" ] || exit 1 +[ "$ROOT_PARTITION" ] || exit 1 # Grub options GRUB_OPTIONS="$GRUB_OPTIONS quiet" @@ -54,17 +54,17 @@ serial_console="console=tty0 console=ttyS0,9600" # 65000 (16bit) | 785 788 791 794 # 16.7 Mill.(24bit)| 786 789 792 795 # -vga_logo="vga=788" - - # TODO: This needs to be changed to map to the correct drive - part=$(echo ${ROOT_PARTITION} | sed 's/[^0-9]//g') - if [ "$(cat /sys/block/$ORIG_INSTALL_DRIVE/removable)" == 0 ]; then - root=$(grep $ORIG_INSTALL_DRIVE $ROOTFSDIR/boot/grub/device.map | /usr/bin/awk -F')' '{ print $1 }') - root="$root,$part)" - else - root="(hd0,$part)" - echo "This looks like a removable device. Setting root grub device to $root." - fi +vga_logo="vga=785" + +#### # TODO: This needs to be changed to map to the correct drive +#### part=$(echo ${ROOT_PARTITION} | sed 's/[^0-9]//g') +#### if [ "$(cat /sys/block/$ORIG_INSTALL_DRIVE/removable)" == 0 ]; then +#### root=$(grep $ORIG_INSTALL_DRIVE $ROOTFSDIR/boot/grub/device.map | /usr/bin/awk -F')' '{ print $1 }') +#### root="$root,$part)" +#### else +#### root="(hd0,$part)" +#### echo "This looks like a removable device. Setting root grub device to $root." +#### fi # get list of kernels, except Xen kernel_versions=$(ls /boot/vmlinuz-* 2> /dev/null | grep -v xen | sed 's:/boot/vmlinuz::g' | sort -r) @@ -104,7 +104,7 @@ vga_logo="vga=788" # set serial console options echo -e "serial --unit=0 --speed=9600" echo "terminal serial" - echo "set root=$root" + echo "set root=$grub_root" echo "" echo "echo -n Press ESC to enter the Grub menu..." @@ -121,7 +121,8 @@ vga_logo="vga=788" if [ -f "/boot/vmlinuz" ]; then # Set first system boot option. Make KVM the default console in this one. echo -e "menuentry \"Vyatta OFR (KVM console)\" {" - echo -e "\tlinux /boot/vmlinuz $grub_root $GRUB_OPTIONS $vga_logo $vty_console" + #echo -e "\tlinux /boot/vmlinuz $grub_root $GRUB_OPTIONS $vga_logo $vty_console" + echo -e "\tlinux /boot/vmlinuz $GRUB_OPTIONS $vga_logo $vty_console" echo -e "\tinitrd /boot/initrd.img" echo -e "}" @@ -178,3 +179,8 @@ vga_logo="vga=788" echo -e "\tinitrd /boot/initrd.img" echo -e "}" ) >"$ROOTFSDIR"/boot/grub/grub.cfg + +( [ -s /boot/grub/menu.lst ] && + upgrade-from-grub-legacy && + rm -f /boot/grub/menu.lst* +) || true -- cgit v1.2.3 From f6dbf8f85e1bcc2e01810e4b5989ee92345abfe1 Mon Sep 17 00:00:00 2001 From: Rick Balocca Date: Sun, 3 Aug 2008 12:16:17 -0700 Subject: Cleanup --- scripts/grub-setup | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/scripts/grub-setup b/scripts/grub-setup index 301d386f..bf293486 100755 --- a/scripts/grub-setup +++ b/scripts/grub-setup @@ -1,4 +1,4 @@ -#!/bin/sh -x +#!/bin/sh # # Module: grup-setup # @@ -54,18 +54,8 @@ serial_console="console=tty0 console=ttyS0,9600" # 65000 (16bit) | 785 788 791 794 # 16.7 Mill.(24bit)| 786 789 792 795 # -vga_logo="vga=785" - -#### # TODO: This needs to be changed to map to the correct drive -#### part=$(echo ${ROOT_PARTITION} | sed 's/[^0-9]//g') -#### if [ "$(cat /sys/block/$ORIG_INSTALL_DRIVE/removable)" == 0 ]; then -#### root=$(grep $ORIG_INSTALL_DRIVE $ROOTFSDIR/boot/grub/device.map | /usr/bin/awk -F')' '{ print $1 }') -#### root="$root,$part)" -#### else -#### root="(hd0,$part)" -#### echo "This looks like a removable device. Setting root grub device to $root." -#### fi - + vga_logo="vga=785" + # get list of kernels, except Xen kernel_versions=$(ls /boot/vmlinuz-* 2> /dev/null | grep -v xen | sed 's:/boot/vmlinuz::g' | sort -r) @@ -121,7 +111,7 @@ vga_logo="vga=785" if [ -f "/boot/vmlinuz" ]; then # Set first system boot option. Make KVM the default console in this one. echo -e "menuentry \"Vyatta OFR (KVM console)\" {" - #echo -e "\tlinux /boot/vmlinuz $grub_root $GRUB_OPTIONS $vga_logo $vty_console" + #echo -e "\tlinux /boot/vmlinuz $GRUB_OPTIONS $vga_logo $vty_console" echo -e "\tlinux /boot/vmlinuz $GRUB_OPTIONS $vga_logo $vty_console" echo -e "\tinitrd /boot/initrd.img" echo -e "}" @@ -130,7 +120,7 @@ vga_logo="vga=785" # console in this one. echo echo -e "menuentry \"Vyatta OFR (Serial console)\" {" - echo -e "\tlinux /boot/vmlinuz $grub_root $GRUB_OPTIONS $serial_console" + echo -e "\tlinux /boot/vmlinuz $GRUB_OPTIONS $serial_console" echo -e "\tinitrd /boot/initrd.img" echo -e "}" fi @@ -142,7 +132,7 @@ vga_logo="vga=785" echo echo -e "menuentry \"Vyatta Xen linux$xversion dom0\" {" echo -e "\tmultiboot /boot/$xen_version " - echo -e "\tmodule /boot/vmlinuz$xversion $grub_root $GRUB_OPTIONS $vty_console" + echo -e "\tmodule /boot/vmlinuz$xversion $GRUB_OPTIONS $vty_console" echo -e "\tmodule /boot/initrd.img$xversion" echo -e "}" done @@ -153,12 +143,12 @@ vga_logo="vga=785" for kversion in $kernel_versions; do echo echo -e "menuentry \"Vyatta OFR linux$kversion (KVM console)\" {" - echo -e "\tlinux /boot/vmlinuz$kversion $grub_root $GRUB_OPTIONS $vty_console" + echo -e "\tlinux /boot/vmlinuz$kversion $GRUB_OPTIONS $vty_console" echo -e "\tinitrd /boot/initrd.img$kversion" echo -e "}" echo echo -e "menuentry \"Vyatta OFR linux$kversion (Serial console)\" {" - echo -e "\tlinux /boot/vmlinuz$kversion $grub_root $GRUB_OPTIONS $serial_console" + echo -e "\tlinux /boot/vmlinuz$kversion $GRUB_OPTIONS $serial_console" echo -e "\tinitrd /boot/initrd.img$kversion" echo -e "}" done @@ -169,13 +159,13 @@ vga_logo="vga=785" echo echo -e "menuentry \"Root password reset to factory (KVM console)\" {" - echo -e "\tlinux /boot/vmlinuz $grub_root $GRUB_OPTIONS $vty_console init=$pass_reset" + echo -e "\tlinux /boot/vmlinuz $GRUB_OPTIONS $vty_console init=$pass_reset" echo -e "\tinitrd /boot/initrd.img" echo -e "}" echo echo -e "menuentry \"Root password reset to factory (Serial console)\" {" - echo -e "\tlinux /boot/vmlinuz $grub_root $GRUB_OPTIONS $serial_console init=$pass_reset" + echo -e "\tlinux /boot/vmlinuz $GRUB_OPTIONS $serial_console init=$pass_reset" echo -e "\tinitrd /boot/initrd.img" echo -e "}" ) >"$ROOTFSDIR"/boot/grub/grub.cfg -- cgit v1.2.3 From d49c9edf95ecb4a94ad3800c336d081030e764c1 Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Tue, 5 Aug 2008 01:53:32 +0000 Subject: - add ability to set cache-size for DNS forwarding from CLI - restart dnsmasq when /etc/hosts is modified from CLI to re-read added or deleted hosts --- scripts/dns-forwarding/vyatta-dns-forwarding.pl | 8 ++++++-- templates/service/dns-forwarding/cache-size/node.def | 4 ++++ templates/system/static-host-mapping/host-name/node.def | 17 +++++++++++------ 3 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 templates/service/dns-forwarding/cache-size/node.def diff --git a/scripts/dns-forwarding/vyatta-dns-forwarding.pl b/scripts/dns-forwarding/vyatta-dns-forwarding.pl index 01111d4a..4eebf6d7 100644 --- a/scripts/dns-forwarding/vyatta-dns-forwarding.pl +++ b/scripts/dns-forwarding/vyatta-dns-forwarding.pl @@ -39,12 +39,12 @@ sub dnsforwarding_init { } sub dnsforwarding_restart { - system("$dnsforwarding_init restart 2&>1 /dev/null"); + system("$dnsforwarding_init restart >&/dev/null"); print "Setting up DNS forwarding.\n"; } sub dnsforwarding_stop { - system("$dnsforwarding_init stop 2&>1 /dev/null"); + system("$dnsforwarding_init stop >&/dev/null"); print "Stopping DNS forwarding.\n"; } @@ -62,6 +62,10 @@ sub dnsforwarding_get_values { my $config = new VyattaConfig; $config->setLevel("service dns-forwarding"); + my $cache_size = $config->returnValue("cache-size"); + if (defined $cache_size) { + $output .= "cache-size=$cache_size\n"; + } return $output; } diff --git a/templates/service/dns-forwarding/cache-size/node.def b/templates/service/dns-forwarding/cache-size/node.def new file mode 100644 index 00000000..3a73f308 --- /dev/null +++ b/templates/service/dns-forwarding/cache-size/node.def @@ -0,0 +1,4 @@ +type: u32 +default:150 +help: Set DNS forwarding cache size +syntax:expression: ($VAR(@) >=0 && $VAR(@) < 10001) ; "Cache size must be between 0 and 10000" diff --git a/templates/system/static-host-mapping/host-name/node.def b/templates/system/static-host-mapping/host-name/node.def index 189025e3..187b21dd 100644 --- a/templates/system/static-host-mapping/host-name/node.def +++ b/templates/system/static-host-mapping/host-name/node.def @@ -3,9 +3,14 @@ type: txt help: Set to map DNS names to system interfaces syntax:expression: pattern $VAR(@) "^[-a-zA-Z0-9.]+$" ; "invalid host name $VAR(@)" commit:expression: $VAR(./inet) != ""; "IP address for the static mapping must be set" -end:expression: "sudo sh -c \"\ - touch /etc/hosts; \ - sed -i '/ $VAR(@) .*#vyatta entry/d' /etc/hosts; \ - if [ -z \"$VAR(./inet/@)\" ]; then exit 0; fi; \ - declare -a aliases=( $VAR(alias/@@) ); \ - echo \\\"$VAR(inet/@)\t $VAR(@) \\${aliases[*]} \t #vyatta entry\\\" \ >> /etc/hosts\" " +end: sudo sh -c " + touch /etc/hosts + sed -i '/ $VAR(@) .*#vyatta entry/d' /etc/hosts + if [ -z \"$VAR(./inet/@)\" ]; then + if [ -d /opt/vyatta/config/active/service/dns-forwarding ]; then /etc/init.d/dnsmasq restart >&/dev/null; fi + exit 0 + fi + declare -a aliases=( $VAR(alias/@@) ) + echo -e \"$VAR(inet/@)\\t $VAR(@) \${aliases[*]} \\t #vyatta entry\" >> /etc/hosts + if [ -d /opt/vyatta/config/active/service/dns-forwarding ]; then /etc/init.d/dnsmasq restart >&/dev/null; fi" + -- cgit v1.2.3 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 From b439500cbaae43279d6cfb536b765775922829a8 Mon Sep 17 00:00:00 2001 From: Rick Balocca Date: Wed, 6 Aug 2008 14:46:36 -0700 Subject: Script cleanup --- scripts/grub-setup | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/grub-setup b/scripts/grub-setup index bf293486..fd241995 100755 --- a/scripts/grub-setup +++ b/scripts/grub-setup @@ -90,11 +90,9 @@ serial_console="console=tty0 console=ttyS0,9600" # Numbering starts at 0 for the first option. echo -e "set default=$default_console" echo "set timeout=5" - #echo "#set splashimage=(hd0,0)/grub/splash.xpm.gz" # 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..." @@ -111,7 +109,6 @@ serial_console="console=tty0 console=ttyS0,9600" if [ -f "/boot/vmlinuz" ]; then # Set first system boot option. Make KVM the default console in this one. echo -e "menuentry \"Vyatta OFR (KVM console)\" {" - #echo -e "\tlinux /boot/vmlinuz $GRUB_OPTIONS $vga_logo $vty_console" echo -e "\tlinux /boot/vmlinuz $GRUB_OPTIONS $vga_logo $vty_console" echo -e "\tinitrd /boot/initrd.img" echo -e "}" -- cgit v1.2.3