forked from ungleich-public/cdist
		
	Merge branch 'feature/explorer/os_version/devuan-ceres' into 'master'
explorer/os_version: Convert Devuan ceres to version number See merge request ungleich-public/cdist!1008
This commit is contained in:
		
				commit
				
					
						bf0c355fe7
					
				
			
		
					 1 changed files with 21 additions and 5 deletions
				
			
		| 
						 | 
					@ -1,6 +1,7 @@
 | 
				
			||||||
#!/bin/sh
 | 
					#!/bin/sh -e
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org)
 | 
					# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org)
 | 
				
			||||||
 | 
					# 2020-2021 Dennis Camera (dennis.camera at ssrq-sds-fds.ch)
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# This file is part of cdist.
 | 
					# This file is part of cdist.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
| 
						 | 
					@ -17,12 +18,11 @@
 | 
				
			||||||
# You should have received a copy of the GNU General Public License
 | 
					# You should have received a copy of the GNU General Public License
 | 
				
			||||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
 | 
					# along with cdist. If not, see <http://www.gnu.org/licenses/>.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# All os variables are lower case
 | 
					# All os variables are lower case
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
#
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
case "$("$__explorer/os")" in
 | 
					case $("${__explorer:?}/os")
 | 
				
			||||||
 | 
					in
 | 
				
			||||||
   amazon)
 | 
					   amazon)
 | 
				
			||||||
      cat /etc/system-release
 | 
					      cat /etc/system-release
 | 
				
			||||||
   ;;
 | 
					   ;;
 | 
				
			||||||
| 
						 | 
					@ -59,7 +59,23 @@ case "$("$__explorer/os")" in
 | 
				
			||||||
      esac
 | 
					      esac
 | 
				
			||||||
   ;;
 | 
					   ;;
 | 
				
			||||||
   devuan)
 | 
					   devuan)
 | 
				
			||||||
      cat /etc/devuan_version
 | 
					      devuan_version=$(cat /etc/devuan_version)
 | 
				
			||||||
 | 
					      case ${devuan_version}
 | 
				
			||||||
 | 
					      in
 | 
				
			||||||
 | 
					         (*/ceres)
 | 
				
			||||||
 | 
					            # ceres versions don't have a number, so we decode by codename:
 | 
				
			||||||
 | 
					            case ${devuan_version}
 | 
				
			||||||
 | 
					            in
 | 
				
			||||||
 | 
					               (chimaera/ceres) echo 3.99 ;;
 | 
				
			||||||
 | 
					               (beowulf/ceres) echo 2.99 ;;
 | 
				
			||||||
 | 
					               (ascii/ceres) echo 1.99 ;;
 | 
				
			||||||
 | 
					               (*) exit 1
 | 
				
			||||||
 | 
					            esac
 | 
				
			||||||
 | 
					            ;;
 | 
				
			||||||
 | 
					         (*)
 | 
				
			||||||
 | 
					            echo "${devuan_version}"
 | 
				
			||||||
 | 
					            ;;
 | 
				
			||||||
 | 
					      esac
 | 
				
			||||||
   ;;
 | 
					   ;;
 | 
				
			||||||
   fedora)
 | 
					   fedora)
 | 
				
			||||||
      cat /etc/fedora-release
 | 
					      cat /etc/fedora-release
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue