FDS/OS 1.0
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# Intentionally uncalibrated: no physical Pi wiring has been measured.
|
||||
# Use fds topology, then follow docs/cartridges.md to assign controller/ports.
|
||||
# USB 2 and USB 3 companion roots need explicit aliases for the same bays.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Recognition only: catalog entries cannot contain commands or actions.
|
||||
# Unknown USB devices are reported by VID/PID and class without auto-execution.
|
||||
device = []
|
||||
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
mapfile -t interfaces < /run/fds/network/interfaces
|
||||
(( ${#interfaces[@]} > 0 ))
|
||||
for interface in "${interfaces[@]}"; do
|
||||
[[ $interface =~ ^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,14}$ ]]
|
||||
# This profile is IPv4 DHCP. Do not leave autonomous kernel IPv6 routing
|
||||
# active outside the managed client's lifetime.
|
||||
if [[ -e /proc/sys/net/ipv6/conf/$interface/disable_ipv6 ]]; then
|
||||
printf '1\n' >"/proc/sys/net/ipv6/conf/$interface/disable_ipv6"
|
||||
fi
|
||||
done
|
||||
exec /usr/bin/dhcpcd --nobackground --noipv6 --noipv4ll "${interfaces[@]}"
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
install -d -m 0750 -o root -g fds /run/log/network
|
||||
install -d -m 0755 /run/dhcpcd /run/dhcpcd/db
|
||||
chown _dhcpcd:_dhcpcd /run/dhcpcd/db
|
||||
: > /run/fds/resolv.conf
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
[[ -r /run/fds/network/interfaces ]] || exit 0
|
||||
mapfile -t interfaces < /run/fds/network/interfaces
|
||||
for interface in "${interfaces[@]}"; do
|
||||
[[ $interface =~ ^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,14}$ ]]
|
||||
if [[ -e /sys/class/net/$interface ]]; then
|
||||
ip link set dev "$interface" down || [[ ! -e /sys/class/net/$interface ]]
|
||||
fi
|
||||
done
|
||||
: > /run/fds/resolv.conf
|
||||
Reference in New Issue
Block a user