Untrap EXIT before run-parts

This commit is contained in:
Ghe Rivero 2012-11-26 19:05:12 +01:00
parent 3d596d7e9c
commit a3f9f12a4a

View File

@ -116,7 +116,9 @@ function run_d_in_target() {
sudo mkdir $TMP_MOUNT_PATH/tmp/in_target.d
sudo mount --bind ${TMP_HOOKS_PATH} $TMP_MOUNT_PATH/tmp/in_target.d
sudo mount -o remount,ro,bind ${TMP_HOOKS_PATH} $TMP_MOUNT_PATH/tmp/in_target.d
trap - EXIT
run_in_target run-parts -v /tmp/in_target.d/$1.d
trap cleanup EXIT
sudo umount -f $TMP_MOUNT_PATH/tmp/in_target.d
sudo rmdir $TMP_MOUNT_PATH/tmp/in_target.d
fi