[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 11:06:08 UTC 2013


On 10/17/2013 06:53 PM, Phil Blundell wrote:
> On Thu, 2013-10-17 at 18:28 +0800, Ming Liu wrote:
>> 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?
> I guess there are two things to say about this:
>
> 1) not everybody wants /etc/shells, and having screen (or any other
> recipe) create that file unilaterally seems like a bad thing.
> Especially since there doesn't seem to be any corresponding postrm to
> clear it up if screen is then removed again, nor is /etc/shells
> mentioned in CONFFILES.
>
> 2) even if you did want to create /etc/shells, the touch is unnecessary
> because "echo foo >> FILE" is perfectly capable of creating the FILE if
> it didn't already exist.
Yes, you are correct for both of the two points, I will send the V3, 
includes the changes:
1 add postrm script, removing the entry in /etc/shells.
2 rm the unnecessary 'touch'.
3 change the regex for screen and bash recipes.(As Martin pointed out)

Anything else?

//Ming Liu
>
> p.
>
>
>
>




More information about the Openembedded-core mailing list