Fix check_defaultroute - We need to check if the /etc/mygate file exists before comparing it - version 6.7.3
This commit is contained in:
parent
04994ecebc
commit
3d86996f5d
|
@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [6.7.3] - 2020-07-23
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix check_defaultroute - We need to check if the /etc/mygate file exists before comparing it
|
||||
|
||||
## [6.7.2] - 2020-07-22
|
||||
|
||||
### Added
|
||||
|
|
14
evocheck.sh
14
evocheck.sh
|
@ -3,7 +3,7 @@
|
|||
# EvoCheck
|
||||
# Script to verify compliance of an OpenBSD server powered by Evolix
|
||||
|
||||
readonly VERSION="6.7.2"
|
||||
readonly VERSION="6.7.3"
|
||||
|
||||
# Disable LANG*
|
||||
|
||||
|
@ -306,10 +306,14 @@ check_sync(){
|
|||
}
|
||||
|
||||
check_defaultroute(){
|
||||
file_route=$(cat /etc/mygate)
|
||||
used_route=$(route -n show -priority 8 | grep default | awk '{print $2}')
|
||||
if [ "$file_route" != "$used_route" ]; then
|
||||
failed "IS_DEFAULTROUTE" "The default route in /etc/mygate is different from the one currently used"
|
||||
if [ -f /etc/mygate ]; then
|
||||
file_route=$(cat /etc/mygate)
|
||||
used_route=$(route -n show -priority 8 | grep default | awk '{print $2}')
|
||||
if [ "$file_route" != "$used_route" ]; then
|
||||
failed "IS_DEFAULTROUTE" "The default route in /etc/mygate is different from the one currently used"
|
||||
fi
|
||||
else
|
||||
failed "IS_DEFAULTROUTE" "The file /etc/mygate does not exist. Make sure you have the same default route in this file as the one currently in use."
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue