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
|
||||
@@ -0,0 +1,26 @@
|
||||
pkgname=fds-cartridged
|
||||
version=0.1.0
|
||||
revision=1
|
||||
archs="aarch64"
|
||||
nostrip=yes
|
||||
noverifyrdeps=yes
|
||||
depends="s6 s6-rc execline coreutils fds-cli"
|
||||
short_desc="FDS static cartridge daemon and stable bay discovery"
|
||||
maintainer="FDS/OS maintainers"
|
||||
license="MIT"
|
||||
homepage="https://github.com/void-linux/void-packages"
|
||||
conf_files="/etc/fds/bays.toml /etc/fds/hardware-catalog.toml"
|
||||
do_install() {
|
||||
local input="${XBPS_SRCDISTDIR}/${pkgname}-${version}"
|
||||
(cd "$input" && sha256sum -c SHA256SUMS) || return 1
|
||||
vbin "${input}/fds-cartridged"
|
||||
vbin "${input}/fds-profile"
|
||||
vinstall "${FILESDIR}/network-run" 755 usr/libexec/fds
|
||||
vinstall "${FILESDIR}/network-stop" 755 usr/libexec/fds
|
||||
vinstall "${FILESDIR}/network-runtime" 755 usr/libexec/fds
|
||||
vlicense "${input}/LICENSE"
|
||||
vmkdir etc/s6-rc/source
|
||||
cp -a "${input}/s6-source/." "${DESTDIR}/etc/s6-rc/source/"
|
||||
vinstall "${FILESDIR}/bays.toml" 644 etc/fds
|
||||
vinstall "${FILESDIR}/hardware-catalog.toml" 644 etc/fds
|
||||
}
|
||||
Reference in New Issue
Block a user