[OE-core] [PATCH] tzdata_2011n: provide pkg_postinst and timezone defaults

Koen Kooi koen at dominion.thruhere.net
Sat Jan 14 19:16:16 UTC 2012


Op 14 jan. 2012, om 16:54 heeft Eric Bénard het volgende geschreven:

> Le Sat, 14 Jan 2012 16:10:55 +0100,
> Koen Kooi <koen at dominion.thruhere.net> a écrit :
>>> +        # Install defaults
>>> +        install -d ${D}${sysconfdir}
>>> +        echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
>>> +        cp -pP ${S}/${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
>> 
>> Shouldn't that be an 'ln -sf' instead of a 'cp'?
>> 
> that would make a link from ${D} to ${S}

How about this one:

if [ -e ${S}/${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ] ; then
	ln -sf ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
else
	echo "Timezone ${DEFAULT_TIMEZONE} not found, exiting"
	exit 1
fi





More information about the Openembedded-core mailing list