forked from ungleich-public/cdist
		
	suses chkconfig has the same name, but works different
This commit is contained in:
		
					parent
					
						
							
								241d8e6c3a
							
						
					
				
			
			
				commit
				
					
						f5cee7a57d
					
				
			
		
					 1 changed files with 10 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -39,10 +39,19 @@ case "$os" in
 | 
			
		|||
        [ -f "/etc/rc$runlevel.d/S"??"$name" ] || state="absent"
 | 
			
		||||
    ;;
 | 
			
		||||
 | 
			
		||||
    amazon|centos|fedora|owl|redhat|suse)
 | 
			
		||||
    amazon|centos|fedora|owl|redhat)
 | 
			
		||||
        state=$(chkconfig --level "$runlevel" "$name" || echo absent)
 | 
			
		||||
        [ "$state" ] || state="present"
 | 
			
		||||
    ;;
 | 
			
		||||
    suse)
 | 
			
		||||
        # check for target if set, usable for boot. services in runlevel B
 | 
			
		||||
        if [ "$target_runlevel" != 'default' ]; then
 | 
			
		||||
            runlevel="$target_runlevel"
 | 
			
		||||
        fi
 | 
			
		||||
        # suses chkconfig has the same name, but works different ...
 | 
			
		||||
        state=$(chkconfig --check "$name" "$runlevel" || echo absent)
 | 
			
		||||
        [ "$state" ] || state="present"
 | 
			
		||||
    ;;
 | 
			
		||||
    gentoo)
 | 
			
		||||
        state="present"
 | 
			
		||||
        [ -f "/etc/runlevels/${target_runlevel}/${name}" ] || state="absent"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue