From 6160463ddaf99fde8473cd85ee4c791b95a4f247 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Thu, 15 Dec 2011 04:15:04 +0700 Subject: Fix version check on boot, doesn't depend on version string position now. --- scripts/check-params-on-reboot.d/conntrack-hash-size | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/check-params-on-reboot.d/conntrack-hash-size b/scripts/check-params-on-reboot.d/conntrack-hash-size index 4849bda..19524d7 100755 --- a/scripts/check-params-on-reboot.d/conntrack-hash-size +++ b/scripts/check-params-on-reboot.d/conntrack-hash-size @@ -6,10 +6,10 @@ BOOTFILE=$1 # Obtain firewall config version -version=`tail -n 2 $BOOTFILE | sed -n 's/.*\(firewall\@[0-9]\).*/\1/; h; x;p;q' | awk -F '@' '{print $2}'` +version=`grep "=== vyatta-config-version:" $BOOTFILE | sed -n 's/.*\(firewall\@[0-9]\).*/\1/; h; x;p;q' | awk -F '@' '{print $2}'` if [ -z $version ]; then - echo "Warning: could not determine firewall config version. Conntrack hash size will not be updated." + logger -s "Warning: could not determine firewall config version. Conntrack hash size will not be updated." exit 1 fi -- cgit v1.2.3