gluon-layer3-common: add ip6 from babel
This commit is contained in:
		
							parent
							
								
									a07924a0f0
								
							
						
					
					
						commit
						cbeb3ea492
					
				
							
								
								
									
										11
									
								
								package/gluon-layer3-common/luasrc/lib/gluon/upgrade/300-layer3-ip6
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										11
									
								
								package/gluon-layer3-common/luasrc/lib/gluon/upgrade/300-layer3-ip6
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					#!/usr/bin/lua
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					local sysconfig = require 'gluon.sysconfig'
 | 
				
			||||||
 | 
					local uci = require('simple-uci').cursor()
 | 
				
			||||||
 | 
					local site = require 'gluon.site'
 | 
				
			||||||
 | 
					local iputil = require 'gluon.iputil'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					local ip = iputil.mac_to_ip(site.node_prefix6(), sysconfig.primary_mac)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					uci:set('network', 'loopback', 'ip6addr', ip)
 | 
				
			||||||
 | 
					uci:save('network')
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user