[OE-core] [PATCH V2 2/2] screen: add pkg_postinst to register entry to /etc/shells

Ming Liu ming.liu at windriver.com
Thu Oct 17 10:28:10 UTC 2013


On 10/17/2013 06:11 PM, Phil Blundell wrote:
> On Thu, 2013-10-17 at 18:03 +0800, Ming Liu wrote:
>> +pkg_postinst_${PN} () {
>> +	touch $D${sysconfdir}/shells
>> +	grep -q "${bindir}/screen" $D${sysconfdir}/shells || echo ${bindir}/screen >> $D${sysconfdir}/shells
>> +}
> Is that "touch" really desirable?  It seems as though screen ought not
> really to be creating /etc/shells if it isn't there already,
No, it's supposed to be created if /etc/shells doesn't exist already, 
otherwise, how could we echo text to it?

> and
> probably ought not to be updating the timestamp if it isn't actually
> changing the file either.
Yes, it may happen that the timestamp be updated even the it isn't 
actually changing the file, but only for upgrade case, and I think it's 
not a big deal. Actually I copied this piece of script from bash recipe, 
it's doing the same thing there.

//Ming Liu

>
> p.
>
>
>




More information about the Openembedded-core mailing list