Post installation script can be called during image creation so paths
should relative to $D.
Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
# TODO: pattern based configuration update
pkg_postinst_${PN} () {
- cat /etc/nsswitch.conf | grep "hosts:\s*files dns$" > /dev/null && {
- cat /etc/nsswitch.conf | sed 's/hosts:\s*files dns/& mdns4/' > /tmp/nsswitch.conf
- mv /tmp/nsswitch.conf /etc/nsswitch.conf
+ cat $D/etc/nsswitch.conf | grep "hosts:\s*files dns$" > /dev/null && {
+ cat $D/etc/nsswitch.conf | sed 's/hosts:\s*files dns/& mdns4/' > /tmp/nsswitch.conf
+ mv /tmp/nsswitch.conf $D/etc/nsswitch.conf
}
}