configure: simplify trap commands