Add a method to check if the version of debian is 9.

This commit is contained in:
Samson-W 2018-08-24 01:54:34 +08:00
parent 79c179f7c2
commit dc268f3198
1 changed files with 11 additions and 0 deletions

View File

@ -382,3 +382,14 @@ is_pkg_installed()
FNRET=1
fi
}
is_debian_9()
{
if $(cat /etc/debian_version | grep -q "^9.[0-9]"); then
debug "Debian version is 9.*."
FNRET=0
else
debug "Debian version is not 9.*."
FNRET=1
fi
}