I have an overo build, and now I want to tweak /etc/environment, and the /etc/init.d/dbus-1 startup script. I've been googling all over, but haven't found anything that actually tells me how to do it (it's a TODO in the OE documentation). I've got complicated version, where I create my own new recipe file in user.local, and then create a version of the file, build the .ipk, and install it manually with a --force option, but this isn't going to work very well long term. Next step is to just hardcode the path to the files in rootfs/sysroot and sed edit them there so they get bundled up as I want them. This is highly not portable.

BTW, trying to just overwrite the existing versions doesn't seem to work, although my recipe might be broken. It's included below.

What have other people done? Thanks for any help.

DESCRIPTION = "Modify /etc/environment with some project specific details"
DEPENDS = "libpam"
PR = "1"

S = "${WORKDIR}"

SRC_URI = " \
file://etc/environment \

# Don't do anything for the next two functions. We don't need to
do_configure() {

do_compile() {

do_install() {
sed -i 's#@@CONSOLE_PORT@@#ttymxc0#' etc/environment
sed -i 's#@@KERNEL_VERSION@@#2.6.34#' etc/environment
sed -i 's#@@NVM_DIR@@#/tmp#' etc/environment
sed -i 's#@@NVM_PRI_DIR@@#/tmp#' etc/environment
install -d ${sysconfdir}
install -m 0644 etc/environment ${sysconfdir}
install -d ${S}/image/etc
install -m 0644 etc/environment ${S}/image/etc


FILES_${PN} = " \
/etc/environment \