support ubuntu upstart in __start_on_boot
Signed-off-by: Nico Schottelius <nico@freiheit.schottelius.org>
This commit is contained in:
		
					parent
					
						
							
								3db2dcb2d6
							
						
					
				
			
			
				commit
				
					
						745f1e2984
					
				
			
		
					 1 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# 2012-2013 Nico Schottelius (nico-cdist at schottelius.org)
 | 
					# 2012-2015 Nico Schottelius (nico-cdist at schottelius.org)
 | 
				
			||||||
# 2013 Daniel Heule (hda at sfs.biz)
 | 
					# 2013 Daniel Heule (hda at sfs.biz)
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# This file is part of cdist.
 | 
					# This file is part of cdist.
 | 
				
			||||||
| 
						 | 
					@ -34,10 +34,15 @@ case "$os" in
 | 
				
			||||||
            || echo absent)
 | 
					            || echo absent)
 | 
				
			||||||
    ;;
 | 
					    ;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    debian|ubuntu|openwrt)
 | 
					    debian|openwrt)
 | 
				
			||||||
        state="present"
 | 
					        state="present"
 | 
				
			||||||
        [ -f "/etc/rc$runlevel.d/S"??"$name" ] || state="absent"
 | 
					        [ -f "/etc/rc$runlevel.d/S"??"$name" ] || state="absent"
 | 
				
			||||||
    ;;
 | 
					    ;;
 | 
				
			||||||
 | 
					    ubuntu)
 | 
				
			||||||
 | 
					        state="absent"
 | 
				
			||||||
 | 
					        [ -f "/etc/rc$runlevel.d/S"??"$name" ] && state="present"
 | 
				
			||||||
 | 
					        [ -f "/etc/init/${name}.conf" ] && state="present"
 | 
				
			||||||
 | 
					    ;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    amazon|centos|fedora|owl|redhat)
 | 
					    amazon|centos|fedora|owl|redhat)
 | 
				
			||||||
        state=$(chkconfig --level "$runlevel" "$name" || echo absent)
 | 
					        state=$(chkconfig --level "$runlevel" "$name" || echo absent)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue