#! /bin/bash error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code # Remove APT proxy rm -f $target/etc/apt/apt.conf.d/02proxy exit $error