/bin/zsh usually points to /etc/alternatives/zsh, but if
/etc/alternatives/zsh doesn't exist on the *build* system,
the test for existing /bin/zsh fails, so we need to verify
the existence of /bin/zsh *inside* the chroot.
Thanks: Krisztian VASAS <iron@ironiq.hu> for reporting the problem
Acked-by: Alexander Wirt <formorer@grml.org>
sed -i 's/^root::/root:*:/' $target/etc/shadow
sed -i "s/^$USERNAME:!:/$USERNAME:*:/" $target/etc/shadow
-if [ -r $target/bin/zsh ] ; then
+if $ROOTCMD [ -r /bin/zsh ] ; then
$ROOTCMD chsh -s /bin/zsh root
$ROOTCMD chsh -s /bin/zsh $USERNAME
fi