HACK: Ensure that rootfs is r/w

Well, this is largely a hack. I wanted to ensure that the existing
buildroot options are not modified (I pretty much like the /var-on-tmpfs
which I get for free in R/O rootfs), and at the same time, sysrepo
*needs* to store its data somewhere.

This is intended as a stopgap measure until I'm ready with a setup that
uses a separate data partition.

Change-Id: Ie040ba68266a31e627048b7ea7adcbfdb5e9555f
diff --git a/board/czechlight/common/hack-systemd-rw-root.sh b/board/czechlight/common/hack-systemd-rw-root.sh
new file mode 100755
index 0000000..4416b20
--- /dev/null
+++ b/board/czechlight/common/hack-systemd-rw-root.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+sed -i 's|^\(/dev/root.*\) ro|\1 rw|' ${TARGET_DIR}/etc/fstab
diff --git a/configs/czechlight_clearfog_defconfig b/configs/czechlight_clearfog_defconfig
index 1c5275f..ef3fdac 100644
--- a/configs/czechlight_clearfog_defconfig
+++ b/configs/czechlight_clearfog_defconfig
@@ -10,7 +10,7 @@
 BR2_INIT_SYSTEMD=y
 # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
 BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/common/overlay/ $(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/overlay/"
-BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/post-build.sh"
+BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/post-build.sh $(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/common/hack-systemd-rw-root.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="-c $(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/genimage.cfg"
 BR2_LINUX_KERNEL=y