Rail unions vowed in a late-night compromise to cease industrial action if the NSW government dropped its legal case against them and offered free fares.