80-block-network 242 Bytes
Newer Older
1
2
3
4
#!/bin/sh

set -e

5
echo "Generating blocklist for all network devices"
6
7

find /lib/modules/*/kernel/drivers/net \
8
9
     -name "*.ko" -printf "install %f /bin/true\n" | \
  sed 's/\.ko / /' | \
10
  sort -u > /etc/modprobe.d/all-net-blacklist.conf