Reputation: 98
I am in change root, then I type exit command.
How to make a command run autimatically(in real environment, not change root)after that command excute.
Please help me.
Upvotes: 0
Views: 959
Reputation: 806
simply wrap your chroot command.
$chroot() {
> /bin/chroot "$@"
> echo goodby
> }
$ chroot /
exit
goodby
Upvotes: 1