Phi Nguyen
Phi Nguyen

Reputation: 98

How to run a linux command imediatly after exit chroot

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

Answers (1)

aep
aep

Reputation: 806

simply wrap your chroot command.

$chroot() {
> /bin/chroot "$@"
> echo goodby
> }
$ chroot /
exit
goodby

Upvotes: 1

Related Questions