04-net-misc.sh 308 B

12345678910111213141516
  1. # shellcheck shell=sh
  2. (
  3. msg 'setting up lo interface'
  4. ip addr add 127.0.0.1/8 dev lo brd +
  5. ip link set up dev lo
  6. : "${DUMMY_INTERFACE:=dummy0}"
  7. if ip a s type dummy "${DUMMY_INTERFACE}" 2>/dev/null 1>/dev/null; then
  8. msg "deleting dummy interface: ${DUMMY_INTERFACE}"
  9. ip l d "${DUMMY_INTERFACE}"
  10. fi
  11. ) &