Merge remote-tracking branch 'flapflap/de-network_configuration'
[tails-test.git] / config / chroot_local-includes / usr / local / sbin / tails-unblock-network
blob6ed8ed5168f41424bbb082f4fafecab0735dafcb
1 #!/bin/sh
3 set -e
5 BLACKLIST=/etc/modprobe.d/all-net-blacklist.conf
7 rm -f "${BLACKLIST}"
8 if [ -e "${BLACKLIST}" ]; then
9 log "${BLACKLIST} wasn't removed so the network will still be blocked"
12 # Now we'll load any present network device previously blocked by
13 # BLACKLIST. In particular, the MAC spoofing udev rule should trigger
14 # for each network device added.
15 /sbin/udevadm trigger --action=add
17 # Make this script block until all triggers have been run. We normally
18 # start NetworkManager immediately after this script, and without the
19 # blocking behaviour there's a race between NM and the MAC spoof udev
20 # triggers. When NM takes control of some network device, some
21 # operations are not possible on the device, like MAC spoofing. Hence,
22 # if NM wins, the udev trigger's run of tails-spoof-mac will fail.
23 /sbin/udevadm settle
25 service network-manager start