set -e
        # Add path to remove dir in case we removed our only grep
        if [ "x$D" = "x" ] ; then
           for busybox_rmdir in /tmp/busyboxrm-*; do
               if [ "$busybox_rmdir" != '/tmp/busyboxrm-*' ] ; then
                  export PATH=$busybox_rmdir:$PATH
               fi
           done
        fi

	if grep -q "^/usr/bin/bash$" $D/etc/busybox.links* && [ ! -e $D/usr/bin/bash ]; then
		printf "$(grep -v "^/usr/bin/bash$" $D/etc/shells)\n" > $D/etc/shells
	fi
