diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check-params-on-reboot.d/conntrack-hash-size | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/check-params-on-reboot.d/conntrack-hash-size b/scripts/check-params-on-reboot.d/conntrack-hash-size index a2063cb..4849bda 100755 --- a/scripts/check-params-on-reboot.d/conntrack-hash-size +++ b/scripts/check-params-on-reboot.d/conntrack-hash-size @@ -7,6 +7,12 @@ 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}'` + +if [ -z $version ]; then + echo "Warning: could not determine firewall config version. Conntrack hash size will not be updated." + exit 1 +fi + if [ $version -ge 5 ]; then # The config is from oxnard or higher cthash_cfg=$(cli-shell-api cfReturnValue $BOOTFILE system conntrack hash-size) |