From: Michael Prokop Date: Fri, 20 Jun 2014 09:20:39 +0000 (+0200) Subject: 21-usersetup: check for existing /bin/zsh inside the chroot X-Git-Tag: v0.25.0~5 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=184eabc67a016efb8b42364b1dab400ef72a00e0 21-usersetup: check for existing /bin/zsh inside the chroot /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 for reporting the problem Acked-by: Alexander Wirt --- diff --git a/etc/grml/fai/config/scripts/GRMLBASE/21-usersetup b/etc/grml/fai/config/scripts/GRMLBASE/21-usersetup index 123e39c..a83224f 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/21-usersetup +++ b/etc/grml/fai/config/scripts/GRMLBASE/21-usersetup @@ -55,7 +55,7 @@ add_user_to_group voice 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