Add scientific
This commit is contained in:
		
					parent
					
						
							
								98160624a0
							
						
					
				
			
			
				commit
				
					
						9300eda3c6
					
				
			
		
					 22 changed files with 26 additions and 20 deletions
				
			
		| 
						 | 
				
			
			@ -72,6 +72,11 @@ if [ -f /etc/owl-release ]; then
 | 
			
		|||
fi
 | 
			
		||||
 | 
			
		||||
### Redhat and derivatives
 | 
			
		||||
if grep -q ^Scientific /etc/redhat-release 2>/dev/null; then
 | 
			
		||||
    echo scientific
 | 
			
		||||
    exit 0
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if grep -q ^CentOS /etc/redhat-release 2>/dev/null; then
 | 
			
		||||
    echo centos
 | 
			
		||||
    exit 0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -54,7 +54,7 @@ case "$($__explorer/os)" in
 | 
			
		|||
   owl)
 | 
			
		||||
      cat /etc/owl-release
 | 
			
		||||
   ;;
 | 
			
		||||
   redhat|centos|mitel)
 | 
			
		||||
   redhat|centos|mitel|scientific)
 | 
			
		||||
      cat /etc/redhat-release
 | 
			
		||||
   ;;
 | 
			
		||||
   slackware)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,7 +23,7 @@
 | 
			
		|||
os=$(cat "$__global/explorer/os")
 | 
			
		||||
 | 
			
		||||
case "$os" in
 | 
			
		||||
   centos|redhat|ubuntu|debian|archlinux|gentoo)
 | 
			
		||||
   scientific|centos|redhat|ubuntu|debian|archlinux|gentoo)
 | 
			
		||||
      # any linux should work
 | 
			
		||||
      :
 | 
			
		||||
   ;;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,7 +23,7 @@
 | 
			
		|||
os=$(cat "$__global/explorer/os")
 | 
			
		||||
 | 
			
		||||
case "$os" in
 | 
			
		||||
   centos|debian|redhat|ubuntu)
 | 
			
		||||
   scientific|centos|debian|redhat|ubuntu)
 | 
			
		||||
      # whitelist safeguard
 | 
			
		||||
      :
 | 
			
		||||
   ;;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,7 +22,7 @@
 | 
			
		|||
os=$(cat "$__global/explorer/os")
 | 
			
		||||
 | 
			
		||||
case "$os" in
 | 
			
		||||
   centos|redhat)
 | 
			
		||||
   scientific|centos|redhat)
 | 
			
		||||
      # whitelist safeguard
 | 
			
		||||
      service_onchange='service consul-template status >/dev/null && service consul-template reload || true' \
 | 
			
		||||
   ;;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,7 +40,7 @@ case "$os" in
 | 
			
		|||
            exit 0
 | 
			
		||||
        fi
 | 
			
		||||
    ;;
 | 
			
		||||
    centos)
 | 
			
		||||
    scientific|centos)
 | 
			
		||||
        if [ "$name_sysconfig" = "$name_should" -a "$name_running" = "$name_should" ]; then
 | 
			
		||||
            exit 0
 | 
			
		||||
        fi
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,7 +38,7 @@ case "$os" in
 | 
			
		|||
        # handled in gencode-remote
 | 
			
		||||
        :
 | 
			
		||||
    ;;
 | 
			
		||||
    centos)
 | 
			
		||||
    scientific|centos)
 | 
			
		||||
        __key_value sysconfig-hostname \
 | 
			
		||||
            --file /etc/sysconfig/network \
 | 
			
		||||
            --delimiter '=' \
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,7 +30,7 @@ case "$os" in
 | 
			
		|||
        # Debian needs a seperate package
 | 
			
		||||
        __package locales --state present
 | 
			
		||||
    ;;
 | 
			
		||||
    archlinux|suse|ubuntu|centos)
 | 
			
		||||
    archlinux|suse|ubuntu|scientific|centos)
 | 
			
		||||
        :
 | 
			
		||||
    ;;
 | 
			
		||||
    *)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,7 +30,7 @@ else
 | 
			
		|||
   # By default determine package manager based on operating system
 | 
			
		||||
   os="$(cat "$__global/explorer/os")"
 | 
			
		||||
   case "$os" in
 | 
			
		||||
         amazon|centos|fedora|redhat) type="yum" ;;
 | 
			
		||||
         amazon|scientific|centos|fedora|redhat) type="yum" ;;
 | 
			
		||||
         archlinux) type="pacman" ;;
 | 
			
		||||
         debian|ubuntu|devuan) type="apt" ;;
 | 
			
		||||
         freebsd)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -29,7 +29,7 @@ else
 | 
			
		|||
    # By default determine package manager based on operating system
 | 
			
		||||
    os="$(cat "$__global/explorer/os")"
 | 
			
		||||
    case "$os" in
 | 
			
		||||
        amazon|centos|fedora|redhat) type="yum" ;;
 | 
			
		||||
        amazon|scientific|centos|fedora|redhat) type="yum" ;;
 | 
			
		||||
        debian|ubuntu|devuan) type="apt" ;;
 | 
			
		||||
        archlinux) type="pacman" ;;
 | 
			
		||||
        *)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,7 +30,7 @@ else
 | 
			
		|||
    # By default determine package manager based on operating system
 | 
			
		||||
    os="$(cat "$__global/explorer/os")"
 | 
			
		||||
    case "$os" in
 | 
			
		||||
        amazon|centos|fedora|redhat) type="yum" ;;
 | 
			
		||||
        amazon|scientific|centos|fedora|redhat) type="yum" ;;
 | 
			
		||||
        debian|ubuntu|devuan) type="apt" ;;
 | 
			
		||||
        archlinux) type="pacman" ;;
 | 
			
		||||
        *)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,7 +37,7 @@ fi
 | 
			
		|||
 | 
			
		||||
state_should="$(cat "$__object/parameter/state")"
 | 
			
		||||
 | 
			
		||||
if grep -q -E "(centos|redhat|amazon)" "$__global/explorer/os"; then
 | 
			
		||||
if grep -q -E "(scientific|centos|redhat|amazon)" "$__global/explorer/os"; then
 | 
			
		||||
    opts="-y --quiet"
 | 
			
		||||
else
 | 
			
		||||
    opts="--assumeyes --quiet"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,7 +22,7 @@
 | 
			
		|||
os=$(cat "$__global/explorer/os")
 | 
			
		||||
 | 
			
		||||
case "$os" in
 | 
			
		||||
   ubuntu|debian|archlinux|suse|centos|devuan)
 | 
			
		||||
   ubuntu|debian|archlinux|suse|scientific|centos|devuan)
 | 
			
		||||
      __package postfix --state present
 | 
			
		||||
   ;;
 | 
			
		||||
   *)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,7 +22,7 @@
 | 
			
		|||
os=$(cat "$__global/explorer/os")
 | 
			
		||||
 | 
			
		||||
case "$os" in
 | 
			
		||||
   ubuntu|debian|archlinux|centos|devuan)
 | 
			
		||||
   ubuntu|debian|archlinux|scientific|centos|devuan)
 | 
			
		||||
      :
 | 
			
		||||
   ;;
 | 
			
		||||
   *)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,7 +22,7 @@
 | 
			
		|||
os=$("$__explorer/os")
 | 
			
		||||
 | 
			
		||||
case "$os" in
 | 
			
		||||
   ubuntu|debian|archlinux|suse|centos|devuan)
 | 
			
		||||
   ubuntu|debian|archlinux|suse|scientific|centos|devuan)
 | 
			
		||||
      :
 | 
			
		||||
   ;;
 | 
			
		||||
   *)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -21,7 +21,7 @@
 | 
			
		|||
os=$(cat "$__global/explorer/os")
 | 
			
		||||
 | 
			
		||||
case "$os" in
 | 
			
		||||
   ubuntu|debian|archlinux|suse|centos|devuan)
 | 
			
		||||
   ubuntu|debian|archlinux|suse|scientific|centos|devuan)
 | 
			
		||||
      :
 | 
			
		||||
   ;;
 | 
			
		||||
   *)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,7 +22,7 @@
 | 
			
		|||
os=$(cat "$__global/explorer/os")
 | 
			
		||||
 | 
			
		||||
case "$os" in
 | 
			
		||||
   ubuntu|debian|archlinux|centos|devuan)
 | 
			
		||||
   ubuntu|debian|archlinux|scientific|centos|devuan)
 | 
			
		||||
      echo "postfix reload"
 | 
			
		||||
   ;;
 | 
			
		||||
   *)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,7 +47,7 @@ else
 | 
			
		|||
            [ -f "/etc/init/${name}.conf" ] && state="present"
 | 
			
		||||
        ;;
 | 
			
		||||
 | 
			
		||||
        amazon|centos|fedora|owl|redhat)
 | 
			
		||||
        amazon|scientific|centos|fedora|owl|redhat)
 | 
			
		||||
            state=$(chkconfig --level "$runlevel" "$name" || echo absent)
 | 
			
		||||
            [ "$state" ] || state="present"
 | 
			
		||||
        ;;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -59,7 +59,7 @@ case "$state_should" in
 | 
			
		|||
                    echo rc-update add \"$name\" \"$target_runlevel\"
 | 
			
		||||
                ;;
 | 
			
		||||
 | 
			
		||||
                amazon|centos|fedora|owl|redhat|suse)
 | 
			
		||||
                amazon|scientific|centos|fedora|owl|redhat|suse)
 | 
			
		||||
                    echo chkconfig \"$name\" on
 | 
			
		||||
                ;;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,7 +38,7 @@ case "$os" in
 | 
			
		|||
        # whitelist
 | 
			
		||||
        :
 | 
			
		||||
    ;;
 | 
			
		||||
    centos)
 | 
			
		||||
    scientific|centos)
 | 
			
		||||
        __package tzdata --state present
 | 
			
		||||
        export require="__package/tzdata"
 | 
			
		||||
        __file /etc/sysconfig/clock \
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,7 +22,7 @@ os=$(cat "$__global/explorer/os")
 | 
			
		|||
state="$(cat "$__object/parameter/state")"
 | 
			
		||||
 | 
			
		||||
case "$os" in
 | 
			
		||||
   centos)
 | 
			
		||||
   scientific|centos)
 | 
			
		||||
      repo_name="$__object_id"
 | 
			
		||||
      export repo_name
 | 
			
		||||
      repo_file="/etc/yum.repos.d/${repo_name}.repo"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,6 +5,7 @@ cdist was tested or is know to run on at least
 | 
			
		|||
 * [Archlinux](http://www.archlinux.org/)
 | 
			
		||||
 * [Debian](http://www.debian.org/)
 | 
			
		||||
 * [CentOS](http://www.centos.org/)
 | 
			
		||||
 * [Scientific](https://www.scientificlinux.org/)
 | 
			
		||||
 * [Fedora](http://fedoraproject.org/)
 | 
			
		||||
 * [FreeBSD](http://www.freebsd.org)
 | 
			
		||||
 * [Gentoo](http://www.gentoo.org/)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue