On Fri, 2013-10-18 at 19:11 +0800, Ming Liu wrote:
>  pkg_postinst_${PN} () {
> -     touch $D${sysconfdir}/shells
> -     grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> 
> $D${sysconfdir}/shells
> -     grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> 
> $D${sysconfdir}/shells
> +     if [ ! -f $D${sysconfdir}/shells ]; then
> +             touch $D${sysconfdir}/shells
> +     fi
> +
> +     grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo 
> ${base_bindir}/bash >> $D${sysconfdir}/shells
> +}

This patch contains significant changes to the postinst script which
aren't described in the commit message.

p.

> +
> +pkg_postrm_${PN} () {
> +     if [ -f $D${sysconfdir}/shells ]; then
> +             printf "$(grep -v "^${base_bindir}/bash$" 
> $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
> +
> +             if [ ! -s $D${sysconfdir}/shells ]; then
> +                     rm $D${sysconfdir}/shells
> +             fi
> +     fi
>  }


_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to