diff options
-rw-r--r-- | debian/changelog | 28 | ||||
-rwxr-xr-x | etc/init.d/vyatta-ofr | 16 | ||||
-rwxr-xr-x | lib/Vyatta/TypeChecker.pm | 6 | ||||
-rw-r--r-- | src/commit2.c | 7 | ||||
-rw-r--r-- | src/common/defs.h | 2 |
5 files changed, 57 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 7adfe98..e3063ba 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,31 @@ +vyatta-cfg (0.15.15) unstable; urgency=low + + * added data path to environment during commit. value key is + "NODE_DATA_PATH". nodes are delimited by "/" rather than spaces. + * fix for bug 4697. Added range value check that start must be less + than or equal to stop address + + -- slioch <slioch@eng-140.vyatta.com> Wed, 09 Sep 2009 09:29:14 -0700 + +vyatta-cfg (0.15.14) unstable; urgency=low + + * Bugfix 4793: Narrow the set of platforms on which module is loaded. + + -- Bob Gilligan <gilligan@vyatta.com> Fri, 28 Aug 2009 17:51:04 -0700 + +vyatta-cfg (0.15.13) unstable; urgency=low + + * Bugfix 4793: Load the acpi_cpufreq module on certain processors. + + -- Bob Gilligan <gilligan@vyatta.com> Fri, 28 Aug 2009 15:43:00 -0700 + +vyatta-cfg (0.15.12) unstable; urgency=low + + * add no copybreak for more drivers + * Failure to set address should fail the commit + + -- Stephen Hemminger <stephen.hemminger@vyatta.com> Thu, 27 Aug 2009 10:07:06 -0700 + vyatta-cfg (0.15.11) unstable; urgency=low * Skip more wireless interfaces diff --git a/etc/init.d/vyatta-ofr b/etc/init.d/vyatta-ofr index 4fb4c1e..45333ac 100755 --- a/etc/init.d/vyatta-ofr +++ b/etc/init.d/vyatta-ofr @@ -125,7 +125,20 @@ cleanup_raid() rmmod $MD_MODULES > /tmp/vyatta_raid_cleanup_log 2>&1 } - +# +# Load the acpi_cpufreq kernel module, but only for certain processors. +# Some Intel CPUs need to have it loaded in order to initialize +# properly. +# +load_acpi_cpufreq() +{ + manuf=`dmidecode -s system-manufacturer` + prod=`dmidecode -s system-product-name` + if [ "$manuf" = "Vyatta" -a "$prod" = "Series 2500" ]; then + logger -t "$progname" -p user.notice "loading acpi_cpufreq module" + modprobe acpi_cpufreq + fi +} start () { @@ -141,6 +154,7 @@ start () ${vyatta_sbindir}/${s}.init start || (log_end_msg $? && return) done load_bootfile + load_acpi_cpufreq cleanup_raid chmod g-w,o-w / diff --git a/lib/Vyatta/TypeChecker.pm b/lib/Vyatta/TypeChecker.pm index 27d9e03..c13ef4b 100755 --- a/lib/Vyatta/TypeChecker.pm +++ b/lib/Vyatta/TypeChecker.pm @@ -91,6 +91,12 @@ sub validate_ipv4range { return 0 if (!/^([^-]+)-([^-]+)$/); my ($a1, $a2) = ($1, $2); return 0 if (!validate_ipv4($a1) || !validate_ipv4($a2)); + #need to check that range is in ascending order + $a1 =~ m/^(\d\d?\d?)\.(\d\d?\d?)\.(\d\d?\d?)\.(\d\d?\d?)/; + my $v1 = $1*256*256*256+$2*256*256+$3*256+$4; + $a2 =~ m/^(\d\d?\d?)\.(\d\d?\d?)\.(\d\d?\d?)\.(\d\d?\d?)/; + my $v2 = $1*256*256*256+$2*256*256+$3*256+$4; + return 0 if ($v1 > $v2); return 1; } diff --git a/src/commit2.c b/src/commit2.c index d489923..6274ec6 100644 --- a/src/commit2.c +++ b/src/commit2.c @@ -409,6 +409,9 @@ process_func(GNode *node, gpointer data) set_in_delete_action(TRUE); } + //set location env + setenv(ENV_DATA_PATH,d->_path,1); + //do last sibling check GNode *n = g_node_last_sibling(node); if (n == node) { @@ -451,6 +454,7 @@ process_func(GNode *node, gpointer data) unsetenv(ENV_ACTION_NAME); unsetenv(ENV_SIBLING_POSITION); + unsetenv(ENV_DATA_PATH); if (g_coverage) { struct timeval t; @@ -1062,7 +1066,10 @@ validate_func(GNode *node, gpointer data) boolean status = 1; if (g_dump_actions == FALSE) { + //set location env + setenv(ENV_DATA_PATH,d->_path,1); status = execute_list(c->_def.actions[result->_action].vtw_list_head,&c->_def); + unsetenv(ENV_DATA_PATH); } else { char buf[MAX_LENGTH_DIR_PATH*sizeof(char)]; diff --git a/src/common/defs.h b/src/common/defs.h index daca88a..50d2337 100644 --- a/src/common/defs.h +++ b/src/common/defs.h @@ -16,7 +16,7 @@ #define ENV_ACTION_SET "SET" #define ENV_ACTION_ACTIVE "ACTIVE" #define ENV_SIBLING_POSITION "COMMIT_SIBLING_POSITION" - +#define ENV_DATA_PATH "NODE_DATA_PATH" struct Result { |