From 217db9ebd98625db7d40e56dc52813db475d76ea Mon Sep 17 00:00:00 2001 From: aheirman <48590738+aheirman@users.noreply.github.com> Date: Sun, 21 Feb 2021 15:30:04 +0100 Subject: [PATCH] chroot login shell fix --- chroot_fetch | 8 +++++--- chroot_iglunix | 19 +------------------ 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/chroot_fetch b/chroot_fetch index de7886f..3a64ec3 100755 --- a/chroot_fetch +++ b/chroot_fetch @@ -57,10 +57,12 @@ mkdir ${root}/etc/profile.d cp ${root}/../dont_use_here/profile ${root}/etc/profile + +cat << EOF > ${root}/login_shell +exec -a "-ash" /bin/ash +EOF + echo "---------------------" echo "finished chroot_fetch" echo "---------------------" - - - diff --git a/chroot_iglunix b/chroot_iglunix index 208be83..6d43e93 100755 --- a/chroot_iglunix +++ b/chroot_iglunix @@ -19,24 +19,7 @@ then fi -if false; then -sudo chroot ./ /usr/bin/env -i \ - HOME="/root" \ - TERM="$TERM" \ - PS1='chroot: ' \ - PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" \ - /bin/bash -l +h -fi -if false; then -sudo chroot ./ /usr/bin/env -i \ - /bin/bash source /etc/profile\ - /bin/bash -l +h -fi - -sudo chroot ./ /bin/bash -l - - -cd .. +sudo chroot ./ /bin/ash login_shell sudo umount root/tmp/ sudo umount root/proc/