mirror of
				https://github.com/flynx/proxmox-utils.git
				synced 2025-10-30 19:50:09 +00:00 
			
		
		
		
	more work on bridge configuration...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									83216179de
								
							
						
					
					
						commit
						a0b7e2c9d1
					
				
							
								
								
									
										25
									
								
								host/make.sh
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								host/make.sh
									
									
									
									
									
								
							| @ -12,7 +12,7 @@ source ../.pct-helpers | |||||||
| 
 | 
 | ||||||
| #---------------------------------------------------------------------- | #---------------------------------------------------------------------- | ||||||
| 
 | 
 | ||||||
| need ifupdown2 | need ifreload | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| #---------------------------------------------------------------------- | #---------------------------------------------------------------------- | ||||||
| @ -23,10 +23,11 @@ readConfig | |||||||
| DFL_WAN_PORT=${DFL_WAN_PORT:-enp5s0} | DFL_WAN_PORT=${DFL_WAN_PORT:-enp5s0} | ||||||
| DFL_ADMIN_PORT=${DFL_ADMIN_PORT:-enp2s0} | DFL_ADMIN_PORT=${DFL_ADMIN_PORT:-enp2s0} | ||||||
| 
 | 
 | ||||||
| # XXX move this to root config... |  | ||||||
| DFL_HOST_ADMIN_IP=${PROXMOX_ADMIN_IP:-10.0.0.254/24} | DFL_HOST_ADMIN_IP=${PROXMOX_ADMIN_IP:-10.0.0.254/24} | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| SOFTWARE=( | SOFTWARE=( | ||||||
|  | 	ifupdown2 | ||||||
| 	make | 	make | ||||||
| 	w3m links | 	w3m links | ||||||
| 	tree | 	tree | ||||||
| @ -52,22 +53,30 @@ fi | |||||||
| #		- bootstrap this | #		- bootstrap this | ||||||
| #		- setup the gate, ssh, and wireguard | #		- setup the gate, ssh, and wireguard | ||||||
| #		- inalize | #		- inalize | ||||||
|  | # XXX /etc/hosts | ||||||
| if xreadYes "# Create bridges?" BRIDGES ; then | if xreadYes "# Create bridges?" BRIDGES ; then | ||||||
| 	xread "WAN port: " WAN_PORT  | 	xread "WAN port: " WAN_PORT  | ||||||
| 	xread "ADMIN port: " ADMIN_PORT  | 	xread "ADMIN port: " ADMIN_PORT  | ||||||
| 	xread "Host ADMIN IP: " HOST_ADMIN_IP | 	xread "Host ADMIN IP: " HOST_ADMIN_IP | ||||||
| 	xread "Gate ADMIN IP: " GATE_ADMIN_IP | 	xread "Gate ADMIN IP: " GATE_ADMIN_IP | ||||||
| 
 | 
 | ||||||
| 	INTERFACES="${cat bridges.tpl \ | 	BRIDGES="${\ | ||||||
| 		| expandPCTTemplate}" | 		cat bridges.tpl \ | ||||||
|  | 			| expandPCTTemplate WAN_PORT ADMIN_PORT}" | ||||||
| 
 | 
 | ||||||
| 	# XXX add $INTERFACES to /etc/network/interfaces either before the  | 	@ cp /etc/network/interfaces{,.new} | ||||||
|  | 
 | ||||||
|  | 	# XXX add $BRIDGES to /etc/network/interfaces either before the  | ||||||
| 	#		source command or at the end... | 	#		source command or at the end... | ||||||
| 	# XXX | 	# XXX | ||||||
| 
 | 
 | ||||||
| 	# XXX /etc/hosts | 	echo "# Review updated: /etc/network/interfaces.new:" | ||||||
| 
 | 	@ cat /etc/network/interfaces.new | ||||||
| 	#@ ifupdown2 -a | 	echo | ||||||
|  | 	if xreadYes "# Apply changes?" ; then | ||||||
|  | 		@ mv -b /etc/network/interfaces{.new,} | ||||||
|  | 		@ ifreload -a | ||||||
|  | 	fi | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| # Firewall | # Firewall | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user