• David Johnson's avatar
    Make sure systemd does not "initialize" bogus MFS-added /etc/fstab swap devs. · cbfed516
    David Johnson authored
    This is a hack to avoid Emulab and systemd conflicts.  Basically, sometimes
    our MFSes add swap devices to /etc/fstab that are incorrect (i.e., /dev/hda
    instead of /dev/sda).  We could always add 'noauto' to the mount options so
    systemd would ignore it, but we have legacy or deployed MFSes to deal with.
    When systemd encounters one of these, it tries to start the device and halts
    the boot process for a long time while waiting for the device to "start".
    We can't edit the bogus /etc/fstab entry before system reads it, because
    system reads it while the root is still mounted read-only, very early
    on in the startup process.
    systemd doesn't allow us to remove units (a swap device is a unit, just like
    a service is a unit), so all we can do is, before the swap unit runs, cancel
    any pending systemd jobs before they try to initialize the the bogus device(s).
emulab-fstab-fixup.service 422 Bytes