Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-10-17 17:06:05 +02:00
parent a09415df67
commit 92a6278317
4 changed files with 61 additions and 10 deletions

View File

@ -0,0 +1,56 @@
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.
# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel
# Inform the DHCP server of our hostname for DDNS.
hostname
# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
#duid
# Persist interface configuration when dhcpcd exits.
persistent
# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit
# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu
# Most distributions have NTP support.
#option ntp_servers
# A ServerID is required by RFC2131.
require dhcp_server_identifier
# Generate SLAAC address using the Hardware Address of the interface
#slaac hwaddr
# OR generate Stable Private IPv6 Addresses based from the DUID
slaac private
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# !! DO NOT EDIT THESE LINES BELOW PLEASE !!
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# static IP configuration:
denyinterfaces wlan0
interface eth0
static domain_name_servers=8.8.8.8 1.1.1.1
interface usb0
static ip_address=10.0.0.2/24
static routers=10.0.0.1
static domain_name_servers=10.0.0.1 8.8.8.8 1.1.1.1

View File

@ -2,6 +2,7 @@
# well ... it blinks the led
blink_led() {
# shellcheck disable=SC2034
for i in $(seq 1 "$1"); do
echo 0 >/sys/class/leds/led0/brightness
sleep 0.3
@ -55,7 +56,7 @@ stop_monitor_interface() {
# returns 0 if the specificed network interface is up
is_interface_up() {
if grep -qi 'up' /sys/class/net/$1/operstate; then
if grep -qi 'up' /sys/class/net/"$1"/operstate; then
return 0
fi
return 1
@ -79,7 +80,7 @@ is_auto_mode() {
# if usb0 is up, we're in MANU
if is_interface_up usb0; then
return 1
return 0
fi
# if eth0 is up (for other boards), we're in MANU
@ -105,7 +106,7 @@ is_auto_mode_no_delete() {
# if usb0 is up, we're in MANU
if is_interface_up usb0; then
return 1
return 0
fi
# if eth0 is up (for other boards), we're in MANU

View File

@ -530,12 +530,6 @@
path: /boot/ssh
state: touch
- name: disable wlan0 in dhcpcd.conf
lineinfile:
dest: /etc/dhcpcd.conf
insertafter: EOF
line: "denyinterfaces wlan0"
- name: adjust /boot/config.txt
lineinfile:
dest: /boot/config.txt

View File

@ -1 +1 @@
__version__ = '2.4.7'
__version__ = '2.4.8'