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