diff --git a/autoport-chroot b/autoport-chroot index c40fd8f..b462cf1 100755 --- a/autoport-chroot +++ b/autoport-chroot @@ -1,7 +1,7 @@ #!/bin/bash # # autoport-chroot -# (c) 2012 by Silvan Calarco +# (c) 2012-2013 by Silvan Calarco # . /etc/sysconfig/autoport @@ -36,6 +36,9 @@ for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do CMD_PREFIX= fi echo "Entering ${AUTOPORT_CHROOT[$i]} autoport chroot environment" + [ -e /var/autoport/${AUTOPORT_CHROOT[$i]}/etc/profile.d/autoport.sh ] || { + echo "PS1='[\u@${AUTOPORT_CHROOT[$i]} \W]\$ '" > /var/autoport/${AUTOPORT_CHROOT[$i]}/etc/profile.d/autoport.sh + } $CMD_PREFIX /usr/sbin/chroot /var/autoport/${AUTOPORT_CHROOT[$i]} su -l ${AUTOPORT_CHROOT_USER[$i]} exit 0 done