You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qubes-installer-qubes-os/anaconda/dracut/anaconda-ifdown

17 lines
389 B

#!/bin/bash
#
# Turn off given network interface and remove all its flags from Dracut.
#
# Author: Jiri Konecny
#
netif="$1"
# ip down/flush ensures that routing info goes away as well
ip link set $netif down
ip addr flush dev $netif
rm -f -- /tmp/*.$netif.*
if [ -e /sys/class/net/$netif/address ]; then
address=$(cat /sys/class/net/$netif/address)
rm -f -- /tmp/*.$address.*
fi