My car being a diesel in recent times is not wanting to start. It will crank over easily but simply won't start.

If I leave the ignition on for a short period 20-30 seconds then it will start.

Given that the fuel management for shutting off the engine is done electrically what components are there that carry out that function that can malfunction.

I suspect some type of solenoid that governs fuel shut off but without a workshop manual it is difficult to diagnose.

Any thoughts?