Joey Boggs wrote:
This completes the read only rootfs, all needed writable directories are in the 
tmpfs.

Signed-off-by: Joey Boggs <[email protected]>
---
 common-post.ks      |   12 ++++++++++++
 ovirt-node-image.ks |    1 +
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/common-post.ks b/common-post.ks
index 0c0a3f4..44a0270 100644
--- a/common-post.ks
+++ b/common-post.ks
@@ -146,3 +146,15 @@ EOF
 # Remove the default logrotate daily cron job
 # since we run it every 10 minutes instead.
 rm -f /etc/cron.daily/logrotate
+
+# comment out /etc/* entries in rwtab to prevent overlapping mounts
+sed -i '/^files        \/etc*/ s/^/#/' /etc/rwtab
+cat > /etc/rwtab.d/ovirt <<EOF
+files  /etc
+files  /var/cache/libvirt
+files  /var/cache/hald
+files  /var/empty/sshd/etc/localtime
+files  /var/lib/dbus
+files  /var/lib/libvirt
+empty  /mnt
+EOF
diff --git a/ovirt-node-image.ks b/ovirt-node-image.ks
index 802b6a5..6b9e2ac 100644
--- a/ovirt-node-image.ks
+++ b/ovirt-node-image.ks
@@ -19,6 +19,7 @@ augtool <<\EOF
 set /files/etc/sysconfig/readonly-root/TEMPORARY_STATE NOT_OVIRT_FIRSTBOOT
 set /files/etc/sysconfig/readonly-root/STATE_LABEL CONFIG
 set /files/etc/sysconfig/readonly-root/STATE_MOUNT /config
+set /files/etc/sysconfig/readonly-root/READONLY yes
 save
 EOF
 # use persistent state unless firstboot is forced
pushed per pmyers/apevec

_______________________________________________
Ovirt-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/ovirt-devel

Reply via email to