also support @daemon syntax from rc.conf
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
		
					parent
					
						
							
								6ec57acce6
							
						
					
				
			
			
				commit
				
					
						ddb5bd16c9
					
				
			
		
					 2 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -58,7 +58,8 @@ case "$state_should" in
 | 
			
		|||
        case "$os" in
 | 
			
		||||
            archlinux)
 | 
			
		||||
                # Replace a) at the beginning b) in the middle c) end d) only
 | 
			
		||||
                echo "sed -i /etc/rc.conf -e 's/^\\(DAEMONS=(\\)$name /\\1/' -e 's/^\\(DAEMONS=(.* \\)$name \\(.*\\)/\\1\\2/' -e 's/^\\(DAEMONS=(.*\\) $name)/\\1)/' -e 's/^\\(DAEMONS=(\\)$name)/\\1)/'"
 | 
			
		||||
                # Support @name as well...makes it more ugly, but well...
 | 
			
		||||
                echo "sed -i /etc/rc.conf -e 's/^\\(DAEMONS=(\\)@\\{0,1\\}$name /\\1/' -e 's/^\\(DAEMONS=(.* \\)@\\{0,1\\}$name \\(.*\\)/\\1\\2/' -e 's/^\\(DAEMONS=(.*\\) @\\{0,1\\}$name)/\\1)/' -e 's/^\\(DAEMONS=(\\)@\\{0,1\\}$name)/\\1)/'"
 | 
			
		||||
            ;;
 | 
			
		||||
            debian|ubuntu)
 | 
			
		||||
                echo update-rc.d -f \"$name\" remove
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
2.0.8 features / cleanups:
 | 
			
		||||
- introduce default parameters
 | 
			
		||||
 | 
			
		||||
- cleanup object_id handling
 | 
			
		||||
    - have a look at singletons
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue