[Et-mgmt-commits-list] [SCM] koan branch, master now at v0.2.9-21-gf071835

Michael DeHaan mdehaan at redhat.com
Mon Jul 9 20:13:15 UTC 2007


Hello,

This is an automated email from the git hooks/update script, it was
generated because a ref change was pushed to the repository.

Updating branch, master,
       via  f071835a8b6e6dd55fb9504f4c376aac1895b02f (commit)
      from  143aaa25469f546d8fc1e66256ea736d4ddf09ae (commit)

- Log -----------------------------------------------------------------
commit f071835a8b6e6dd55fb9504f4c376aac1895b02f
Author: Michael DeHaan <mdehaan at mdehaan.rdu.redhat.com>
Date:   Mon Jul 9 16:14:59 2007 -0400

    Working on live CD.
-----------------------------------------------------------------------

Diffstat:
 koan/app.py   |   14 +++++++++++++-
 live/base.cfg |   26 ++++++++++++++++++--------
 live/build.py |    3 ++-
 3 files changed, 33 insertions(+), 10 deletions(-)

diff --git a/koan/app.py b/koan/app.py
index a7f9234..cfbabd0 100755
--- a/koan/app.py
+++ b/koan/app.py
@@ -40,6 +40,10 @@ def main():
     Command line stuff...
     """
     p = optparse.OptionParser()
+    p.add_option("-C", "--livecd",
+                 dest="live_cd",
+                 action="store_true",
+                 help="(experimental) indicates running from custom LiveCD")
     p.add_option("-l", "--list-profiles",
                  dest="list_profiles",
                  action="store_true",
@@ -101,6 +105,7 @@ def main():
         k.profile           = options.profile
         k.system            = options.system
         k.verbose           = options.verbose
+        k.live_cd           = options.live_cd
         if options.virtname is not None:
             k.virtname          = options.virtname
         if options.port is not None:
@@ -357,6 +362,8 @@ class Koan:
                     "--args", k_args,
                     "--copy-default"
             ]
+            if self.live_cd:
+               cmd = cmd.append("--bad-image-okay")
             self.subprocess_call(cmd, fake_it=self.dryrun)
 
             if loader == "--lilo":
@@ -365,7 +372,12 @@ class Koan:
                 sub_process.Popen(cmd, stdout=sub_process.PIPE).communicate()[0]
 
             self.debug("reboot to apply changes")
-        return self.do_net_install("/boot",after_download)
+
+        boot_path = "/boot"
+        if self.live_cd:
+            boot_path = "/tmp/boot/boot"
+
+        return self.do_net_install(boot_path,after_download)
 
     def get_kickstart_data(self,kickstart,data):
         """
diff --git a/live/base.cfg b/live/base.cfg
index 4d83273..e6f8278 100644
--- a/live/base.cfg
+++ b/live/base.cfg
@@ -2,8 +2,9 @@ lang en_US.UTF-8
 keyboard us
 timezone US/Eastern
 auth --useshadow --enablemd5
-selinux --enforcing
+selinux --disabled
 firewall --disabled
+rootpw --iscrypted \$1\$mF86/UHC\$WvcIcX2t6crBz2onWxyac.
 
 # TODO: how to replace i386 with $basearch
 
@@ -31,10 +32,9 @@ part swap --size=1027 --ondisk=/dev/sda --asprimary
 syslinux
 kernel
 bash
-kernel
 util-linux
 koan
-aspell-*
+#aspell-*
 -m17n-db-*
 -man-pages-*
 # gimp help is huge
@@ -71,12 +71,13 @@ cat > /etc/rc.d/init.d/fedora-live << EOF
 #
 # live: Init script for live image
 #
-# chkconfig: 345 00 99
+# chkconfig: 345 99 99
+
 # description: Init script for live image.
 
-if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ] || [ -e /.liveimg-configured ] ; then
-    exit 0
-fi
+#if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ] || [ -e /.liveimg-configured ] ; then
+#    exit 0
+#fi
 
 exists() {
     which \$1 >/dev/null 2>&1 || return
@@ -87,6 +88,9 @@ touch /.liveimg-configured
 
 echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
 
+useradd -c "Fedora Live" fedora
+passwd -d fedora > /dev/null
+
 # don't start cron/at as they tend to spawn things which are
 # disk intensive that are painful on a live image
 chkconfig --level 345 crond off
@@ -107,7 +111,13 @@ mkfs -t ext3 /dev/sda1
 
 grub-install /dev/sda1
 
-INSERT_KOAN_ARGS
+# make a boot directory on the filesystem so grub can be happy
+# FIXME: is this required?
+mkdir /tmp/boot
+mount /dev/sda /tmp/boot
+mkdir -p /tmp/boot/boot
+
+INSERT_KOAN_ARGS --livecd
 
 EOF
 
diff --git a/live/build.py b/live/build.py
index c6b5683..ca7d538 100644
--- a/live/build.py
+++ b/live/build.py
@@ -14,6 +14,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 """
 
 # usage: --server=bootserver.example.com --koan="--profile=FOO"
+# requires latest git://git.fedoraproject.org/git/hosted/livecd
 
 import optparse
 import subprocess
@@ -76,7 +77,7 @@ def main(args):
 
    # write config file
    cfg = open("/tmp/koanlive.cfg","w+")
-   cfg.write(base_config.replace("INSERT_KOAN_ARGS", options.koan))
+   cfg.write(base_config.replace("INSERT_KOAN_ARGS", "/usr/bin/koan %s" % options.koan))
    cfg.close()
 
    # ======

hooks/update
---
Git Source Code Management System
hooks/update refs/heads/master \
  143aaa25469f546d8fc1e66256ea736d4ddf09ae \
  f071835a8b6e6dd55fb9504f4c376aac1895b02f




More information about the Et-mgmt-commits-list mailing list