network-uplink-wait.sh 636 B

12345678910111213141516
  1. #!/bin/sh
  2. # Source Qubes library.
  3. # shellcheck source=init/functions
  4. . /usr/lib/qubes/init/functions
  5. # Setup IP address at specific time of system boot, instead of asynchronously
  6. # by udev
  7. QUBES_MANAGED_IFACE="$(get_qubes_managed_iface)"
  8. if [ "x$QUBES_MANAGED_IFACE" != "x" ]; then
  9. # systemd does not support conditional After= dependencies, nor a tool to
  10. # just wait for the unit to be activated
  11. # if the network interface is expected, use `systemctl start` to wait for
  12. # it to be started - it would be started by udev (SYSTEMD_WANTS) anyway
  13. systemctl start "qubes-network-uplink@$QUBES_MANAGED_IFACE.service"
  14. fi