X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_sbin%2Fgrml-chroot;fp=usr_sbin%2Fgrml-chroot;h=bdd6bc919f7ef0473bcb8bae810ffe4ba3c0fa81;hb=d0d52e5940b21fccec06d3e2707bfcc529ed7f28;hp=b3d118487a399f0cc277229aed2fe91ae62460a7;hpb=80e422b789147a8706e450722c6e45bd42b3a5d1;p=grml-scripts.git diff --git a/usr_sbin/grml-chroot b/usr_sbin/grml-chroot index b3d1184..bdd6bc9 100755 --- a/usr_sbin/grml-chroot +++ b/usr_sbin/grml-chroot @@ -89,7 +89,8 @@ mountit "proc" "proc" mountit "sysfs" "sys" mountit "/dev" "dev" "--bind" if (( $# < 1 )); then - chroot "$DEST_" + shell=$(awk '/^root:/{ split($0,a,":"); print a[7] }' < "$DEST_/etc/passwd") + chroot "$DEST_" "$shell" RC=$? else chroot "$DEST_" "$@"