TTTT
This commit is contained in:
parent
af84822358
commit
071e1217bf
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
apt update && apt install -y parprouted dhcp-helper
|
||||
|
||||
systemctl stop dhcp-helper
|
||||
systemctl enable dhcp-helper
|
||||
|
||||
# Configure dhcp-helper.
|
||||
cat > /etc/default/dhcp-helper <<EOF
|
||||
DHCPHELPER_OPTS="-b wlxc8d7193710f4"
|
||||
EOF
|
||||
|
||||
# Enable avahi reflector if it's not already enabled.
|
||||
sed -i'' 's/#enable-reflector=no/enable-reflector=yes/' /etc/avahi/avahi-daemon.conf
|
||||
grep '^enable-reflector=yes$' /etc/avahi/avahi-daemon.conf || {
|
||||
printf "something went wrong...\n\n"
|
||||
printf "Manually set 'enable-reflector=yes in /etc/avahi/avahi-daemon.conf'\n"
|
||||
}
|
||||
|
||||
ip addr add $(/sbin/ip -4 -br addr show wlxc8d7193710f4 | /bin/grep -Po "\\d+\\.\\d+\\.\\d+\\.\\d+")/32 dev enp0s31f6
|
||||
ip link set dev enp0s31f6 up
|
||||
ip link set wlxc8d7193710f4 promisc on
|
||||
|
||||
# parprouted enp0s31f6 wlxc8d7193710f4
|
||||
|
||||
|
||||
systemctl restart dhcp-helper
|
||||
systemctl status --no-pager dhcp-helper
|
Loading…
Reference in New Issue