Untrap EXIT before run-parts
This commit is contained in:
parent
3d596d7e9c
commit
a3f9f12a4a
@ -116,7 +116,9 @@ function run_d_in_target() {
|
|||||||
sudo mkdir $TMP_MOUNT_PATH/tmp/in_target.d
|
sudo mkdir $TMP_MOUNT_PATH/tmp/in_target.d
|
||||||
sudo mount --bind ${TMP_HOOKS_PATH} $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
|
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
|
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 umount -f $TMP_MOUNT_PATH/tmp/in_target.d
|
||||||
sudo rmdir $TMP_MOUNT_PATH/tmp/in_target.d
|
sudo rmdir $TMP_MOUNT_PATH/tmp/in_target.d
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user