Add modern Raspberry Pi OS compatibility

This commit is contained in:
v3d 2026-06-29 09:42:14 +02:00
parent 4636a4f4f6
commit 3b7a16564b
35 changed files with 725 additions and 15678 deletions

View file

@ -1,19 +1,8 @@
interface=br0
# Documentation template; mode.sh generates /etc/dnsmasq.d/pivilion-runtime.conf.
interface=@WIFI_INTERFACE@
bind-dynamic
listen-address=10.1.1.1
no-hosts
dhcp-range=10.1.1.2,10.1.1.254,72h
dhcp-range=10.1.1.2,10.1.1.254,255.255.255.0,72h
dhcp-option=option:router,10.1.1.1
dhcp-authoritative
address=/#/10.1.1.1
address=/clients1.google.com/1.2.3.4
address=/clients3.google.com/1.2.3.4
address=/connectivitycheck.android.com/1.2.3.4
address=/connectivitycheck.gstatic.com/1.2.3.4
address=/connect.rom.miui.com/generate_204/1.2.3.4
address=/www.apple.com/library/test/success.html/1.2.3.4
server=/0.debian.pool.ntp.org/#
server=/1.debian.pool.ntp.org/#
server=/2.debian.pool.ntp.org/#
server=/3.debian.pool.ntp.org/#
server=/deb.debian.org/debian/#
#server=/formatc.hr/#

View file

@ -1,9 +1,8 @@
interface=wlan0
# Documentation template; mode.sh substitutes the detected interface and SSID.
interface=@WIFI_INTERFACE@
driver=nl80211
channel=6
hw_mode=g
ssid=pivilion
bridge=br0
ssid=@HOTSPOT_SSID@
auth_algs=1
wmm_enabled=0
wmm_enabled=0

View file

@ -1,35 +1,2 @@
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
iface eth0 inet manual
#avoid stupid Rasbian static IP config via dhcpcd.conf (WTF???)
#auto eth0
#iface eth0 inet static
#address 192.168.1.5
#netmask 255.255.255.0
#gateway 192.168.1.1
allow-hotplug wlan0
iface wlan0 inet static
address 10.1.0.1
netmask 255.255.255.0
network 10.1.0.1
broadcast 10.1.0.255
#allow-hotplug wlan0
#iface wlan0 inet manual
# wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
#allow-hotplug wlan1
#iface wlan1 inet manual
# wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
# Compatibility note: hotspot addressing is generated at runtime by
# /usr/local/lib/pivilion/mode.sh. This file is intentionally not installed.

View file

@ -1,35 +1,2 @@
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
iface eth0 inet manual
#avoid stupid Rasbian static IP config via dhcpcd.conf (WTF???)
#auto eth0
#iface eth0 inet static
#address 192.168.1.5
#netmask 255.255.255.0
#gateway 192.168.1.1
#allow-hotplug wlan0
#iface wlan0 inet static
# address 10.1.0.1
# netmask 255.255.255.0
# network 10.1.0.1
# broadcast 10.1.0.255
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
# Compatibility note: upstream Wi-Fi is managed by NetworkManager or the
# system wpa_supplicant/dhcpcd configuration. This file is not installed.

View file

@ -1,20 +1,3 @@
#!/bin/bash
service apache2 start
sleep 1
ifconfig wlan0 down
ifconfig wlan0 up
sleep 1
hostapd -B /etc/hostapd/hostapd.conf
sleep 2
ifconfig br0 up
ifconfig br0 10.1.1.1 netmask 255.255.255.0
sysctl net.ipv4.ip_forward=1
iptables --flush
iptables -t nat --flush
iptables -t nat -A PREROUTING -i br0 -p udp -m udp --dport 53 -j DNAT --to-destination 10.1.1.1:53
iptables -t nat -A PREROUTING -i br0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.1.1.1:80
iptables -t nat -A PREROUTING -i br0 -p tcp -m tcp --dport 443 -j DNAT --to-destination 10.1.1.1:80
iptables -t nat -A POSTROUTING -j MASQUERADE
service dnsmasq start
exit 0
# Compatibility entry point. Boot-time mode selection is handled by systemd.
exec /usr/local/lib/pivilion/mode.sh hotspot

View file

@ -1,20 +1,3 @@
#!/bin/bash
service apache2 start
sleep 1
ifconfig wlan0 down
ifconfig wlan0 up
sleep 1
hostapd -B /etc/hostapd/hostapd.conf
sleep 2
ifconfig br0 up
ifconfig br0 10.1.1.1 netmask 255.255.255.0
sysctl net.ipv4.ip_forward=1
iptables --flush
iptables -t nat --flush
iptables -t nat -A PREROUTING -i br0 -p udp -m udp --dport 53 -j DNAT --to-destination 10.1.1.1:53
iptables -t nat -A PREROUTING -i br0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.1.1.1:80
iptables -t nat -A PREROUTING -i br0 -p tcp -m tcp --dport 443 -j DNAT --to-destination 10.1.1.1:80
iptables -t nat -A POSTROUTING -j MASQUERADE
service dnsmasq start
exit 0
# Deprecated compatibility entry point; /etc/rc.local is no longer modified.
exec /usr/local/lib/pivilion/mode.sh hotspot

View file

@ -1,23 +1,3 @@
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
# Display onion domain in MOTD
cat /var/lib/tor/hidden_service/hostname > /home/pi/torname
exit 0
#!/bin/bash
# Deprecated compatibility entry point; /etc/rc.local is no longer modified.
exec /usr/local/lib/pivilion/mode.sh onion