title: How do I modify a rootfs configuration file with Yocto?
body: <p>I'm using Thud (2.6) and I'd like to clear the contents of /etc/default/dropbear. <code>ROOTFS_POSTPROCESS_COMMAND</code> seemed promising but the following failed to create the empty file. There were no errors.</p>
  
  <p>Other work done by the recipe succeeds.</p>
  
  <pre><code>SRC_URI += "file://authorized_keys"
  SRC_URI += "file://dropbear_rsa_host_key"
  # Configuration file to be installed in /etc/default.
  # SRC_URI += "file://dropbear"
  
  S = "${WORKDIR}"
  
  do_install() {
  
  install -d ${D}/etc/dropbear
  install -m 0600 ${S}/authorized_keys ${D}/etc/dropbear
  install -m 0600 ${S}/dropbear_rsa_host_key ${D}/etc/dropbear
  
  }
  
  clear_dropbear_default_configuration() {
  
  rm ${D}/etc/default/dropbear
  touch ${D}/etc/default/dropbear
  echo "Hello" &gt; hello.txt
  
  }
  
  FILES_${PN} += "/etc/dropbear"
  
  FILES_${PN} += "/etc/dropbear/authorized_keys"
  
  FILES_${PN} += "/etc/dropbear/dropbear_rsa_host_key"
  
  ROOTFS_POSTPROCESS_COMMAND += "clear_dropbear_default_configuration;"
  
  # FILES_${PN} += "/etc/default/dropbear"
  </code></pre>