FDS/OS 1.0
This commit is contained in:
@@ -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