db-ctl-base: make use of user supplied exit function