add Check Point Gaia

This commit is contained in:
stephan 2022-07-13 14:50:17 +02:00
parent ff6b2d0abf
commit 483f0c1614
7 changed files with 26 additions and 0 deletions

View file

@ -21,6 +21,9 @@
set +e set +e
case "$("$__explorer/os")" in case "$("$__explorer/os")" in
checkpoint)
awk '{printf("%s\n", $(NF-1))}' /etc/cp-release
;;
openwrt) openwrt)
# shellcheck disable=SC1091 # shellcheck disable=SC1091
(. /etc/openwrt_release && echo "$DISTRIB_CODENAME") (. /etc/openwrt_release && echo "$DISTRIB_CODENAME")

View file

@ -21,6 +21,9 @@
set +e set +e
case "$("$__explorer/os")" in case "$("$__explorer/os")" in
checkpoint)
cat /etc/cp-release
;;
openwrt) openwrt)
# shellcheck disable=SC1091 # shellcheck disable=SC1091
(. /etc/openwrt_release && echo "$DISTRIB_DESCRIPTION") (. /etc/openwrt_release && echo "$DISTRIB_DESCRIPTION")

View file

@ -21,6 +21,9 @@
set +e set +e
case "$("$__explorer/os")" in case "$("$__explorer/os")" in
checkpoint)
echo "CheckPoint"
;;
openwrt) openwrt)
# shellcheck disable=SC1091 # shellcheck disable=SC1091
(. /etc/openwrt_release && echo "$DISTRIB_ID") (. /etc/openwrt_release && echo "$DISTRIB_ID")

View file

@ -21,6 +21,9 @@
set +e set +e
case "$("$__explorer/os")" in case "$("$__explorer/os")" in
checkpoint)
cat /etc/cp-release|sed -e 's/.* R\([1-9][0-9]*\)\.[0-9]*$/\1/'
;;
openwrt) openwrt)
# shellcheck disable=SC1091 # shellcheck disable=SC1091
(. /etc/openwrt_release && echo "$DISTRIB_RELEASE") (. /etc/openwrt_release && echo "$DISTRIB_RELEASE")

View file

@ -116,6 +116,13 @@ if [ -f /etc/slackware-version ]; then
exit 0 exit 0
fi fi
# Appliances
if grep -q '^Check Point Gaia' /etc/cp-release 2>/dev/null; then
echo checkpoint
exit 0
fi
uname_s="$(uname -s)" uname_s="$(uname -s)"
# Assume there is no tr on the client -> do lower case ourselves # Assume there is no tr on the client -> do lower case ourselves

View file

@ -34,5 +34,9 @@ elif test -f /var/run/os-release
then then
# FreeBSD (created by os-release service) # FreeBSD (created by os-release service)
cat /var/run/os-release cat /var/run/os-release
elif test -f /etc/cp-release
then
# Checkpoint firewall or management (actually linux based)
cat /etc/cp-release
fi fi

View file

@ -41,6 +41,9 @@ in
# empty, but well... # empty, but well...
cat /etc/arch-release cat /etc/arch-release
;; ;;
checkpoint)
awk '{version=$NF; printf("%s\n", substr(version, 2))}' /etc/cp-release
;;
debian) debian)
debian_version=$(cat /etc/debian_version) debian_version=$(cat /etc/debian_version)
case $debian_version case $debian_version