From 2ace4e62a0335f53d237aeb1793400d720d9e245 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Wed, 17 Aug 2022 07:13:04 +0200 Subject: [PATCH] Trap ctrl+c in wdvn-chroot --- path/wdvn-chroot | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/path/wdvn-chroot b/path/wdvn-chroot index 47fda0f..344e5ab 100755 --- a/path/wdvn-chroot +++ b/path/wdvn-chroot @@ -1,4 +1,12 @@ #!/bin/bash + +trap ctrl_c INT + +function ctrl_c() { + wdvn-chroot-end "$1" + exit 1 +} + ( set -e mount -o bind "/dev" "$1/dev"