Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2011-07-15 16:55:59 (GMT)
committer Daniel Drake <dsd@laptop.org>2011-07-15 16:58:53 (GMT)
commit1ea4fc0bd140a43075f529bcfadeb7b9f922ed7f (patch)
tree8a3d5292a67becc0973b4b16cad25610b1a9befb
parent590b3365b8f9f187222c0dc450256c438f17fff1 (diff)
base: /etc/sysconfig/network is now written to disk on first boot (#11060)
The version kept on persistent storage was not available early enough during boot.
-rw-r--r--modules/base/kspost.10.core.inc11
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/base/kspost.10.core.inc b/modules/base/kspost.10.core.inc
index 01b4eba..91c4b58 100644
--- a/modules/base/kspost.10.core.inc
+++ b/modules/base/kspost.10.core.inc
@@ -39,6 +39,16 @@ sed -i -e '1,6s/^#auth/auth/' /etc/pam.d/su
# solution: don't ship this file in the image, then it won't get checked
rm -f /etc/sysconfig/keyboard
+# A similarly sticky situation is encountered with /etc/sysconfig/network
+# We must program our hostname in this file to keep NetworkManager happy
+# (#10852), but modifying this file which is ordinarily shipped with the image
+# would break pristine-ness. We cannot put this file in statetab for storage
+# in the persistent overlay, because /etc/rc.d/rc.sysinit reads this file in
+# early boot, before statetab mounts have been put in place (#11060).
+# So we resort to removing the file from the image and writing it in
+# olpc-configure on first boot.
+rm -f /etc/sysconfig/hostname
+
cat >/etc/sysconfig/i18n <<__EOF__
# LANG=C considerably speeds up boot (measured 5sec) -- bernie
LANG=C
@@ -69,7 +79,6 @@ sed -i -e 's/RW_OPTIONS=/RW_OPTIONS="-o size=1M -o nr_inodes=1024"/' /etc/syscon
cat >/etc/statetab.d/olpc <<EOF
/etc/ssh
/etc/sysconfig/i18n
-/etc/sysconfig/network
/etc/hosts
/etc/timezone
/var/lib/dbus