From 0bd24a5ea89f46bf12eaa9af4de2cdc0109091e4 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Sun, 16 Jan 2011 22:58:22 -0800 Subject: Bugfix 6156: Policy must be given on command line. In the new version of biosdevname (version 0.3.4), the default policy generates interface names of the form "em1". That's not the naming convention that we use. The "all_ethN" policy does use the traditional ethernet naming convention. (cherry picked from commit f05a91c02e27bb19717ddf8e1ffc07ed7b1bbbc5) --- scripts/vyatta_net_name | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vyatta_net_name b/scripts/vyatta_net_name index d34624ae..43bed36d 100755 --- a/scripts/vyatta_net_name +++ b/scripts/vyatta_net_name @@ -82,7 +82,7 @@ sub biosdevname { # biosdevname renames wlanX to ethX ?? if ($ifname =~ /^eth/) { - my $biosname = `/sbin/biosdevname -i $ifname`; + my $biosname = `/sbin/biosdevname --policy all_ethN -i $ifname`; chomp $biosname; return $biosname if ($biosname ne ''); -- cgit v1.2.3 From dead94ec995c4b7744927d949e839197b0027ddc Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Mon, 17 Jan 2011 19:43:14 -0800 Subject: Bugfix 6668: Check to see if log files need rotation hourly. Previously, log file rotation was checked by cron daily. Some log file -- such as those generated by PPP -- can grow rapidly. Such infrequent checking can lead to running out of disk space on systems with small disk drives or flash storage. This change checks for rotation hourly. (cherry picked from commit 71a31ff516ef63f5ce52ca1bca17e10497a6a15d) (cherry picked from commit 507d28da53a8a40ef70a23031d06a2ec823fef64) --- Makefile.am | 3 +++ sysconf/vyatta-logrotate-hourly | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 sysconf/vyatta-logrotate-hourly diff --git a/Makefile.am b/Makefile.am index ee53e446..501c8005 100644 --- a/Makefile.am +++ b/Makefile.am @@ -99,6 +99,9 @@ udevrulesdir = /lib/udev/rules.d libudev_SCRIPTS = scripts/vyatta_net_name udevrules_DATA = sysconf/65-vyatta-net.rules +cronhourlydir = /etc/cron.hourly +cronhourly_SCRIPTS = sysconf/vyatta-logrotate-hourly + rsyslogdir = /etc/rsyslog.d rsyslog_DATA = sysconf/vyatta-log.conf diff --git a/sysconf/vyatta-logrotate-hourly b/sysconf/vyatta-logrotate-hourly new file mode 100644 index 00000000..055b4d5f --- /dev/null +++ b/sysconf/vyatta-logrotate-hourly @@ -0,0 +1,5 @@ +#!/bin/sh + +test -x /usr/sbin/logrotate || exit 0 +/usr/sbin/logrotate /etc/logrotate.conf + -- cgit v1.2.3 From 7277839574d6a2fc0ef2ca62ae0ca1b099a73c69 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Mon, 17 Jan 2011 23:03:59 -0800 Subject: Bugfix 6687: Need to explicitly specify the RAID metadata version number. (cherry picked from commit 5de8a194db56c51c9e5541cca43423f11534ffb7) --- scripts/install-system | 2 +- scripts/install/install-get-partition | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install-system b/scripts/install-system index 17adb98c..9a860d63 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -469,7 +469,7 @@ check_for_new_raid () { echo "Creating RAID-1 group on partitions: /dev/${drive1}${data_dev} /dev/${drive2}${data_dev}" raid_dev=md0 - mdadm --create /dev/$raid_dev --level=1 --raid-disks=2 /dev/${drive1}${data_dev} /dev/${drive2}${data_dev} + mdadm --create /dev/$raid_dev --level=1 --raid-disks=2 --metadata=0.90 /dev/${drive1}${data_dev} /dev/${drive2}${data_dev} if [ $? = 0 -a -e /dev/$raid_dev ]; then echo "RAID-1 group created successfully:" diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition index 50ba7505..9b7aa259 100755 --- a/scripts/install/install-get-partition +++ b/scripts/install/install-get-partition @@ -306,7 +306,7 @@ check_for_new_raid () { echo "Creating RAID-1 group on partitions: /dev/${drive1}${data_dev} /dev/${drive2}${data_dev}" raid_dev=md0 - mdadm --create /dev/$raid_dev --level=1 --raid-disks=2 \ + mdadm --create /dev/$raid_dev --level=1 --raid-disks=2 --metadata=0.90 \ /dev/${drive1}${data_dev} /dev/${drive2}${data_dev} if [ $? = 0 -a -e /dev/$raid_dev ]; then -- cgit v1.2.3 From 90b3c8f96073d201523c08e16770a2656fba0304 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Wed, 19 Jan 2011 19:07:07 -0800 Subject: Bugfix 6684: Don't delete wanpipe config files. The wanpipe config files are managed by the vyatta-serial package. So this package should not touch them. (cherry picked from commit 256bf73dda76b68fe756c5299b0732336dc60e8a) --- scripts/rl-system.init | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/rl-system.init b/scripts/rl-system.init index fddea32a..3106d593 100755 --- a/scripts/rl-system.init +++ b/scripts/rl-system.init @@ -61,11 +61,6 @@ empty() shopt -s extglob nullglob -clear_serial () { - rm -f /etc/wanpipe/*.conf /etc/ppp/peers/wan* - rm -f /var/run/vyatta/*.description -} - search_config_if_wan () { grep -q "\.*\<$1\>" $BOOTFILE } @@ -201,7 +196,6 @@ start () { log_failure_msg "can\'t reset config files" setup_ntp_config_file - clear_serial add_new_serial_if || \ log_failure_msg "can\'t add serial interfaces" -- cgit v1.2.3 From fb84d7e91bb3d456f1be40267c104e355f37977e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 20 Jan 2011 15:01:06 -0800 Subject: Cleanup old net-rules on upgrade Bug 6705 (cherry picked from commit 00466b9a779647047ce432b971bf8329b2255126) --- debian/vyatta-cfg-system.postinst.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in index b30b0593..475ae699 100644 --- a/debian/vyatta-cfg-system.postinst.in +++ b/debian/vyatta-cfg-system.postinst.in @@ -25,6 +25,11 @@ if ! grep -q '^tss' /etc/passwd; then adduser --system --group --shell /usr/sbin/nologin --home /var/lib/tpm tss fi +# Remove leftover udev files from earlier release +if [ -d /etc/udev/rules.d/ ]; then + rm -f /etc/udev/rules.d/*vyatta-net.rules +fi + # Force screenblanker to be off, it can be enabled later if desired if [ -f /etc/console-tools/config ]; then sed -i -e '/^POWERDOWN/s/=.*$/=0/' \ -- cgit v1.2.3