diff options
-rwxr-xr-x | xchroot | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xchroot b/xchroot index f70179d..2c68623 100755 --- a/xchroot +++ b/xchroot @@ -40,4 +40,10 @@ else INNER_SHELL="/bin/sh" fi -chroot "$CHROOT" ${@:-$INNER_SHELL} +printf "\033[1m=> Entering chroot $CHROOT\033[m\n" +export PS1="[xchroot $CHROOT] $PS1" +if chroot "$CHROOT" ${@:-$INNER_SHELL}; then + printf "\033[1m=> Exited chroot $CHROOT\033[m\n" +else + printf "\033[1m=> Exited chroot $CHROOT with status $?\033[m\n" +fi |