mirror of
				https://github.com/iiab/iiab.git
				synced 2025-03-09 15:40:17 +00:00 
			
		
		
		
	method to creat ap0 and have hostapd use it
This commit is contained in:
		
							parent
							
								
									93d787f3d2
								
							
						
					
					
						commit
						87b86000b2
					
				
					 4 changed files with 13 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -21,6 +21,14 @@
 | 
			
		|||
    mode: 0644
 | 
			
		||||
  when: discovered_wireless_iface != "none"
 | 
			
		||||
 | 
			
		||||
- name: Use custom udev rule to create ap0
 | 
			
		||||
  template:
 | 
			
		||||
    src: hostapd/70-persistent-net.rules
 | 
			
		||||
    dest: /etc/udev/rules.d/70-persistent-net.rules
 | 
			
		||||
    owner: root
 | 
			
		||||
    group: root
 | 
			
		||||
    mode: 0644
 | 
			
		||||
 | 
			
		||||
- name: Use custom systemd unit file to start 'hostapd' service
 | 
			
		||||
  template:
 | 
			
		||||
    src: hostapd/hostapd.service.j2
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										3
									
								
								roles/network/templates/hostapd/70-persistent-net.rules
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								roles/network/templates/hostapd/70-persistent-net.rules
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,3 @@
 | 
			
		|||
SUBSYSTEM=="ieee80211", ACTION=="add|change", KERNEL=="phy0", \
 | 
			
		||||
  RUN+="/sbin/iw phy phy0 interface add ap0 type __ap", \
 | 
			
		||||
  RUN+="MAC=`iw dev wlan0 info | grep addr | sed -e s/addr//` && /bin/ip link set ap0 address $MAC"
 | 
			
		||||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
# Basic configuration
 | 
			
		||||
 | 
			
		||||
interface={% if iiab_wireless_lan_iface is defined %}{{ iiab_wireless_lan_iface }}{% endif %}
 | 
			
		||||
 | 
			
		||||
interface=ap0
 | 
			
		||||
 | 
			
		||||
ssid={{ host_ssid }}
 | 
			
		||||
channel={{ host_channel }}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
# Basic configuration
 | 
			
		||||
 | 
			
		||||
interface={{ discovered_wireless_iface }}
 | 
			
		||||
interface=ap0
 | 
			
		||||
 | 
			
		||||
ssid={{ host_ssid }}
 | 
			
		||||
channel={{ host_channel }}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue