Bugfix for jail_list
If jail_list wasn't already defined in /etc/rc.conf, gencode-remote wasn't adding the variable to the file.
This commit is contained in:
		
					parent
					
						
							
								ace13f3582
							
						
					
				
			
			
				commit
				
					
						f5437ccce6
					
				
			
		
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -266,7 +266,12 @@ if [ "$onboot" = "true" ]; then
 | 
			
		|||
   cat <<EOF
 | 
			
		||||
      eval \$(grep '^jail_list=' /etc/rc.conf)
 | 
			
		||||
      jail_list="\${jail_list} ${name}"
 | 
			
		||||
      grep -q '^jail_list=' /etc/rc.conf
 | 
			
		||||
      if [ "\$?" -eq "0" ]; then
 | 
			
		||||
         sed -i '.bak' "s/^jail_list=\".*\"/jail_list=\"\${jail_list}\"/" /etc/rc.conf
 | 
			
		||||
      else
 | 
			
		||||
         echo jail_list=\"\${jail_list}\" >>/etc/rc.conf
 | 
			
		||||
      fi
 | 
			
		||||
      unset jail_list
 | 
			
		||||
      rm -f /etc/rc.conf.bak
 | 
			
		||||
EOF
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue