forked from ungleich-public/cdist
		
	add Check Point Gaia
This commit is contained in:
		
					parent
					
						
							
								ff6b2d0abf
							
						
					
				
			
			
				commit
				
					
						483f0c1614
					
				
			
		
					 7 changed files with 26 additions and 0 deletions
				
			
		| 
						 | 
					@ -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")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue