Proper gateway mode and maintenance handling.

The first patch will prevent clients to renew their lease, the second will prevent services to come up after a reboot when we are still in maintenance.