ddhcpd-nextnode: init
This commit is contained in:
		
							parent
							
								
									1874e7b155
								
							
						
					
					
						commit
						7c45e7740f
					
				
							
								
								
									
										19
									
								
								package/ddhcpd-nextnode/Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								package/ddhcpd-nextnode/Makefile
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,19 @@ | |||||||
|  | include $(TOPDIR)/rules.mk | ||||||
|  | 
 | ||||||
|  | PKG_NAME:=ddhcpd-nextnode | ||||||
|  | PKG_RELEASE:=1 | ||||||
|  | 
 | ||||||
|  | include ../gluon.mk | ||||||
|  | 
 | ||||||
|  | define Package/ddhcpd-nextnode | ||||||
|  | 	SECTION:=net | ||||||
|  | 	CATEGORY:=Network | ||||||
|  | 	DEPENDS:=+ddhcpd | ||||||
|  | 	TITLE:=ddhcpd nextnode integration | ||||||
|  | endef | ||||||
|  | 
 | ||||||
|  | define Package/ddhcpd-nextnode/description | ||||||
|  |   nextnode integration for ddhcpd | ||||||
|  | endef | ||||||
|  | 
 | ||||||
|  | $(eval $(call BuildPackage,ddhcpd-nextnode)) | ||||||
							
								
								
									
										1
									
								
								package/ddhcpd-nextnode/check_site.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								package/ddhcpd-nextnode/check_site.lua
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | need_string_match(in_domain({'next_node', 'ip4'}), '^%d+.%d+.%d+.%d+$') | ||||||
							
								
								
									
										21
									
								
								package/ddhcpd-nextnode/luasrc/lib/gluon/upgrade/500-ddhcpd-option-nextnode
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										21
									
								
								package/ddhcpd-nextnode/luasrc/lib/gluon/upgrade/500-ddhcpd-option-nextnode
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,21 @@ | |||||||
|  | #!/usr/bin/lua | ||||||
|  | 
 | ||||||
|  | local uci = require('simple-uci').cursor() | ||||||
|  | local site = require "gluon.site" | ||||||
|  | 
 | ||||||
|  | local payload = site.next_node.ip4() | ||||||
|  | local len = 4 -- this has to be 4 | ||||||
|  | 
 | ||||||
|  | uci:section('ddhcpd', 'dhcp_option', 'nextnode_router', { | ||||||
|  | 	len = len, | ||||||
|  | 	payload = payload, | ||||||
|  | 	code = '3', | ||||||
|  | }) | ||||||
|  | 
 | ||||||
|  | uci:section('ddhcpd', 'dhcp_option', 'nextnode_dns', { | ||||||
|  | 	len = len, | ||||||
|  | 	payload = payload, | ||||||
|  | 	code = '6', | ||||||
|  | }) | ||||||
|  | 
 | ||||||
|  | uci:save('ddhcpd') | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user