Version calculations does not need to be done for OPNSENSE
This commit is contained in:
parent
dc7e6b86a7
commit
a1bca50535
1 changed files with 6 additions and 4 deletions
10
bin/pfatt.sh
10
bin/pfatt.sh
|
@ -7,10 +7,12 @@ RG_ETHER_ADDR='xx:xx:xx:xx:xx:xx'
|
|||
OPNSENSE='no'
|
||||
LOG=/var/log/pfatt.log
|
||||
|
||||
# Calculate version so we can manage some variations.
|
||||
VERSION_MAJOR=`sed -nre 's/([0-9])+\.([0-9])+\.([0-9])+.*/\1/p' /etc/version`
|
||||
VERSION_MINOR=`sed -nre 's/([0-9])+\.([0-9])+\.([0-9])+.*/\2/p' /etc/version`
|
||||
VERSION_PATCH=`sed -nre 's/([0-9])+\.([0-9])+\.([0-9])+.*/\3/p' /etc/version`
|
||||
if [ ${OPNSENSE} != 'yes' ]; then
|
||||
# Calculate pfsense version so we can manage some variations.
|
||||
VERSION_MAJOR=`sed -nre 's/([0-9])+\.([0-9])+\.([0-9])+.*/\1/p' /etc/version`
|
||||
VERSION_MINOR=`sed -nre 's/([0-9])+\.([0-9])+\.([0-9])+.*/\2/p' /etc/version`
|
||||
VERSION_PATCH=`sed -nre 's/([0-9])+\.([0-9])+\.([0-9])+.*/\3/p' /etc/version`
|
||||
fi
|
||||
|
||||
getTimestamp(){
|
||||
echo `date "+%Y-%m-%d %H:%M:%S :: [pfatt.sh] ::"`
|
||||
|
|
Loading…
Reference in a new issue