udev support for livecds and a new fsscript example
authorJohn P. Davis <zhen@gentoo.org>
Wed, 29 Sep 2004 01:32:51 +0000 (01:32 +0000)
committerJohn P. Davis <zhen@gentoo.org>
Wed, 29 Sep 2004 01:32:51 +0000 (01:32 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@440 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
TODO
examples/fsscript.sh.example [new file with mode: 0644]
examples/livecd-stage2_template.spec
livecd/runscript-support/kmerge.sh
livecd/runscript/x86-archscript.sh
modules/livecd_stage2_target.py

index 6f9c3c61901e77f2fbcdc9c9bfcde8fa6478fadd..2caa1684ef5b0ad2472311492998633e57aab895 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
 # ChangeLog for gentoo/src/catalyst 
 # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.84 2004/09/16 05:53:50 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.85 2004/09/29 01:32:50 zhen Exp $
+
+  28 Sep 2004; John Davis <zhen@gentoo.org> TODO,
+  +examples/fsscript.sh.example, examples/livecd-stage2_template.spec,
+  livecd/runscript/x86-archscript.sh, livecd/runscript-support/kmerge.sh,
+  modules/livecd_stage2_target.py:
+  udev support for livecds
 
   16 Sep 2004; John Davis <zhen@gentoo.org> modules/catalyst_support.py,
   +targets/livecd-stage2/unmerge.sh:
diff --git a/TODO b/TODO
index 73ca715cebcb261d3398b14380579679b5d051ef..86e4013cd16fc1f411d352c5716def0db6f01fdc 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,7 +1,5 @@
 # Copyright 1999-2004 Gentoo Technologies, Inc.
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/Attic/TODO,v 1.8 2004/07/11 21:31:40 zhen Exp $
-
-catalyst man page
+# $Header: /var/cvsroot/gentoo/src/catalyst/Attic/TODO,v 1.9 2004/09/29 01:32:50 zhen Exp $
 
 Fix the hardcoded arch information in modules/generic_stage_target.py
diff --git a/examples/fsscript.sh.example b/examples/fsscript.sh.example
new file mode 100644 (file)
index 0000000..1d40cf4
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+# This is an example fsscript for use with the livecd-stage2 target (key livecd/fsscript)
+# Basically, this file is copied to the livecd rootfs at livecd creation time and then run
+
+# Example, I want to add specific nameservers to the LiveCD's resolv.conf:
+echo "192.168.0.1" >> /etc/resolv.conf
index b70c575f67eb1b227f8541bf28f508f3fb1c3adb..12c17fb2555c1bffb7e25da3d46e412547aaabbe 100644 (file)
@@ -82,6 +82,18 @@ livecd/cdtar: /usr/lib/catalyst/livecd/cdtar/isolinux-2.08-memtest86-cdtar.tar.b
 # livecd-stage1.
 #livecd/bootsplash: livecd-2004.1
 
+# list of services to add to the specified runlevel
+#livecd/rcadd: mkxf86config:default alsasound:boot
+
+# list of services to delete from the specified runlevel
+#livecd/rcdel: net.eth0:boot
+
+# xinitrc to use on the livecd
+#livecd/xinitrc: /tmp/livecd_xinitrc
+
+# directory that is to be overlayed on the livecd rootfs (the booted fs)
+#livecd/root_overlay: /tmp/livecd-root-overlay
+
 # let catalyst know how many kernels to build, and what their names are
 boot/kernel: gentoo smp
 
index 20a9f86bd5a0fbb7e01c732c554fee975c23662a..0a11660a698becd8a26f0c1b36444a121bc5c80d 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2004 Gentoo Technologies, Inc.
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/kmerge.sh,v 1.9 2004/09/08 15:58:12 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/kmerge.sh,v 1.10 2004/09/29 01:32:51 zhen Exp $
 
 die() {
        echo "$1"
@@ -9,27 +9,32 @@ die() {
 }
 
 build_kernel() {
+       # default genkernel args
+       GK_ARGS="${clst_livecd_gk_mainargs} \
+                        ${clst_livecd_gk_kernargs} \
+                        --kerneldir=/usr/src/linux \
+                        --kernel-config=/var/tmp/${clst_kname}.config \
+                        --minkernpackage=/usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.tar.bz2 all"
+       
+       # extra genkernel options that we have to test for
        if [ -n "${clst_livecd_bootsplash}" ]
        then
-               genkernel --bootsplash=${clst_livecd_bootsplash} \
-                       --callback="emerge ${clst_kernel_merge}" ${clst_livecd_gk_mainargs} \
-                       ${clst_livecd_gk_kernargs} --kerneldir=/usr/src/linux \
-                       --kernel-config=/var/tmp/${clst_kname}.config \
-                       --minkernpackage=/usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.tar.bz2 all \
-                               || exit 1
-                               
-               tar cjpf /usr/portage/packages/gk_binaries/${1}-modules-${clst_version_stamp}.tar.bz2 \
-                       /lib/modules/"${1}" || die "Could not package kernel modules, exiting"
-       else
-               genkernel --callback="emerge ${clst_kernel_merge}" \
-                       ${clst_livecd_gk_mainargs} ${clst_livecd_gk_kernargs} \
-                       --kerneldir=/usr/src/linux --kernel-config=/var/tmp/${clst_kname}.config \
-                       --minkernpackage=/usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.tar.bz2 all \
-                               || exit 1
-               
-               tar cjpf /usr/portage/packages/gk_binaries/${1}-modules-${clst_version_stamp}.tar.bz2 \
-                       /lib/modules/"${1}" || die "Could not package kernel modules, exiting"
+               GK_ARGS="${GK_ARGS} --bootsplash=${clst_livecd_bootsplash}"
        fi
+       
+       if [ "${clst_livecd_devmanager}" == "udev" ]
+       then
+               GK_ARGS="${GK_ARGS} --udev"
+       fi
+       
+       # build with genkernel using the set options
+       # callback is put here to avoid escaping issues
+       genkernel ${GK_ARGS} --callback="emerge ${clst_kernel_merge}" || exit 1
+       
+       # pack up the modules for resuming
+       tar cjpf /usr/portage/packages/gk_binaries/${1}-modules-${clst_version_stamp}.tar.bz2 \
+               /lib/modules/"${1}" || die "Could not package kernel modules, exiting"
+
 }
 
 # Script to build each kernel, kernel-related packages
index 9746fbd9cc4a826452343093e035c9de4fb96b0e..3dab4f49d3796b8032c93427ffe12309d2046a29 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Technologies, Inc.
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/x86-archscript.sh,v 1.9 2004/09/08 15:58:12 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/x86-archscript.sh,v 1.10 2004/09/29 01:32:51 zhen Exp $
 
 case $1 in
        kernel)
@@ -59,6 +59,12 @@ case $1 in
                echo "F1 kernels.msg" >> ${icfg}
                echo "F2 help.msg" >> ${icfg}
 
+               # figure out what device manager we are using and handle it accordingly
+               if [ ${clst_livecd_devmanager} == "udev" ]
+               then
+                       cmdline_opts="${cmdline_opts} udev nodevfs"
+               fi      
+
                echo "Available kernels:" > ${kmsg}
                cp ${clst_sharedir}/livecd/files/x86-help.msg ${hmsg}
 
index 79d2c2818fc4c2fd34913a7c346ba209bf4f2072..1230a90774be4e39d8e05d97ecadc5070e66991b 100644 (file)
@@ -1,6 +1,6 @@
 # Distributed under the GNU General Public License version 2
 # Copyright 2003-2004 Gentoo Technologies, Inc.
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.20 2004/09/07 14:04:24 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.21 2004/09/29 01:32:51 zhen Exp $
 
 """
 Builder class for a LiveCD stage2 build.
@@ -38,7 +38,7 @@ class livecd_stage2_target(generic_stage_target):
                        "livecd/unmerge","livecd/iso","livecd/gk_mainargs","livecd/type",\
                        "livecd/motd","livecd/overlay","livecd/modblacklist","livecd/bootsplash",\
                        "livecd/rcadd","livecd/rcdel","livecd/fsscript","livecd/xinitrc",\
-                       "livecd/root_overlay"])
+                       "livecd/root_overlay","livecd/devmanager"])
                
                generic_stage_target.__init__(self,spec,addlargs)
                file_locate(self.settings, ["livecd/cdtar","livecd/archscript","livecd/runscript"])