mirror of
				https://github.com/Ysurac/openmptcprouter-feeds.git
				synced 2025-03-09 15:40:03 +00:00 
			
		
		
		
	Disable odhcp when not needed
This commit is contained in:
		
							parent
							
								
									0cedee7a1b
								
							
						
					
					
						commit
						9ca9cf26a3
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -22,6 +22,7 @@ set_ipv6_state() {
 | 
			
		|||
	#sysctl -qw net.ipv6.conf.all.disable_ipv6=$disable_ipv6
 | 
			
		||||
	#sed -i "s:^net.ipv6.conf.all.disable_ipv6=[0-9]*:net.ipv6.conf.all.disable_ipv6=$disable_ipv6:" /etc/sysctl.d/zzz_openmptcprouter.conf
 | 
			
		||||
	sed -i "s:^net.ipv6.conf.all.disable_ipv6=[0-9]*::" /etc/sysctl.d/zzz_openmptcprouter.conf
 | 
			
		||||
	sysctl -qw net.ipv6.conf.all.disable_ipv6=0
 | 
			
		||||
 | 
			
		||||
	uci -q batch <<-EOF >/dev/null
 | 
			
		||||
		set firewall.@defaults[0].disable_ipv6=$disable_ipv6
 | 
			
		||||
| 
						 | 
				
			
			@ -100,7 +101,7 @@ set_ipv6_state() {
 | 
			
		|||
 | 
			
		||||
start_service() {
 | 
			
		||||
	[ "$(uci -q get openmptcprouter.settings.disable_ipv6)" != "1" ] && [ "$(uci -q get network.lan.ipv6)" != "1" ] && set_ipv6_state
 | 
			
		||||
	[ "$(uci -q get openmptcprouter.settings.disable_ipv6)" = "1" ] && {
 | 
			
		||||
	[ "$(uci -q get openmptcprouter.settings.disable_ipv6)" != "0" ] && {
 | 
			
		||||
		ifdown omr6in4
 | 
			
		||||
		/etc/init.d/odhcpd stop
 | 
			
		||||
		return
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue