Added gamecd/conf option to livecd_stage2_target.py, added gamecd.conf.example to...
authorChris Gianelloni <wolf31o2@gentoo.org>
Thu, 16 Dec 2004 17:51:23 +0000 (17:51 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Thu, 16 Dec 2004 17:51:23 +0000 (17:51 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@497 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
examples/gamecd.conf.example [new file with mode: 0644]
livecd/files/gamecd-xinitrc [deleted file]
livecd/runscript-support/gamecdfs-update.sh
livecd/runscript-support/livecdfs-update.sh
livecd/runscript/default-runscript.sh
modules/livecd_stage2_target.py

index 0523d3883141683eb066dd6bbb844e97e0eec836..d9c217709104c71e63b12ab7d6703f0a050c54e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,20 @@
 # ChangeLog for gentoo/src/catalyst 
 # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.124 2004/12/16 15:26:22 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.125 2004/12/16 17:51:22 wolf31o2 Exp $
+
+  16 Dec 2004; Chris Gianelloni <wolf31o2@gentoo.org>
+  +examples/gamecd.conf.example, -livecd/files/gamecd-xinitrc,
+  livecd/runscript/default-runscript.sh,
+  livecd/runscript-support/gamecdfs-update.sh,
+  livecd/runscript-support/livecdfs-update.sh,
+  modules/livecd_stage2_target.py:
+  Added gamecd/conf option to livecd_stage2_target.py, added
+  gamecd.conf.example to /examples, cleaned up game-specific code in
+  gamecdfs-update.sh to make it more generic, added more fundtionality to
+  livecdfs-update.sh and default-runscript.sh for gentoo-release-environmental
+  and gentoo-gamecd to make spec files simpler and to remove the need for
+  specifying a gamecd/environmental fsscript in livecd/fsscript, allowing the
+  user to still use a custom fsscript of their own.
 
   16 Dec 2004; Chris Gianelloni <wolf31o2@gentoo.org>
   +livecd/files/environmental.motd.txt,
diff --git a/examples/gamecd.conf.example b/examples/gamecd.conf.example
new file mode 100644 (file)
index 0000000..e7c8ef9
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo/src/catalyst/examples/gamecd.conf.example,v 1.1 2004/12/16 17:51:23 wolf31o2 Exp $
+
+# these variables are to be used for creating the menu entry and also to tell
+# the CD what to execute
+GAME_NAME="Unreal Tournament 2004 Demo"
+GAME_EXECUTABLE="/usr/games/bin/ut2004demo"
diff --git a/livecd/files/gamecd-xinitrc b/livecd/files/gamecd-xinitrc
deleted file mode 100644 (file)
index 92c0814..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-##GAME_EXECUTABLE &
-exec fluxbox
index b88744dfba682458fe43e4475ac0470bc3b668b7..39f106e6f110b3a1683f92e7d4d92252691b2400 100644 (file)
@@ -1,52 +1,17 @@
 #!/bin/bash
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/gamecdfs-update.sh,v 1.5 2004/11/19 18:19:23 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/gamecdfs-update.sh,v 1.6 2004/12/16 17:51:23 wolf31o2 Exp $
 
-# These variables are to be used for creating the menu entry and also to tell
-# the CD what to execute
-GAME_NAME="Unreal Tournament 2004 Demo"
-GAME_SHORT_NAME="UT2004 Demo"
-GAME_EXECUTABLE="/usr/games/bin/ut2004demo"
+# we grab our configuration
+source "${clst_gamecd_conf}" || exit 1
 
-sed -i -e "s:localhost:gamecd.gentoo localhost:" /etc/hosts
+# here we replace out game information into several files
+sed -i -e "s:livecd:gamecd:" /etc/hosts
 sed -i -e "s:##GAME_NAME:${GAME_NAME}:" /etc/motd
-sed -i -e "s:##GAME_EXECUTABLE:${GAME_EXECUTABLE}:" /etc/X11/xinit/xinitrc
 
-[ -x /usr/sbin/openglify ] && /usr/sbin/openglify
-touch /etc/asound.state /etc/startx
+# here we setup our xinitrc
+echo "exec ${GAME_EXECUTABLE}" > /etc/X11/xinit/xinitrc
 
-cat > /usr/share/fluxbox/menu << EOF
-
-[begin] (Gentoo)
-       [exec] (GAME_SHORT_NAME) {GAME_EXECUTABLE}
-       [exec] (Mozilla Firefox) {firefox http://www.gentoo.org}
-       [exec] (Volume) {xterm -e "alsamixer"}
-
-[submenu] (Setup Network)
-       [exec] (net-setup eth0) {xterm -e "net-setup eth0"}
-       [exec] (net-setup eth1) {xterm -e "net-setup eth1"}
-
-[end]
-
-[submenu] (Terminals)
-       [exec] (xterm) {xterm -fg white -bg black}
-[end]
-
-[submenu] (Settings)
-       [workspaces]   (Workspace List)
-[submenu] (Styles) {Choose a style...}
-       [stylesdir] (/usr/share/fluxbox/styles)
-[end]
-
-       [config] (Configure)
-       [reconfig] (Reload config)
-[end]
-
-       [restart] (Restart)
-[end]
-EOF
-
-sed -i -e 's:GAME_SHORT_NAME:${GAME_SHORT_NAME}:' \
-    -i -e 's:GAME_EXECUTABLE:${GAME_EXECUTABLE}:' \
-    /usr/share/fluxbox/menu
+# we add spind to default here since we don't want the CD to spin down
+rc-update add spind default
index 79c21724e08ea583033238d95ac1f6a4fe4e6e82..39daaa7c2832f452b69e51c0ab7c27493c38857f 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/livecdfs-update.sh,v 1.23 2004/12/16 03:49:49 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/livecdfs-update.sh,v 1.24 2004/12/16 17:51:23 wolf31o2 Exp $
 
 /usr/sbin/env-update
 source /etc/profile
@@ -20,11 +20,17 @@ rc-update del netmount default
 rc-update add autoconfig default
 rc-update del keymaps
 rc-update del consolefont
-rc-update add metalog default
 rc-update add modules default
 rc-update add pwgen default
 [ -e /etc/init.d/bootsplash ] && rc-update add bootsplash default
 [ -e /etc/init.d/splash ] && rc-update add splash default
+[ -e /etc/init.d/sysklogd ] && rc-update add sysklogd default
+[ -e /etc/init.d/metalog ] && rc-update add metalog default
+[ -e /etc/init.d/syslog-ng ] && rc-update add syslog-ng default
+[ -e /etc/init.d/alsasound ] && rc-update add alsasound default
+[ -e /etc/init.d/hdparm ] && rc-update add hdparm default
+
+[ -e /etc/startx ] && rc-update add mkxf86config default
 
 # perform any rcadd then any rcdel
 if [ -n "${clst_livecd_rcadd}" ] || [ -n "${clst_livecd_rcdel}" ]
@@ -97,6 +103,12 @@ then
        ln -s /usr/share/hwdata/usb.ids /usr/share/misc/usb.ids
 fi
 
+# setup opengl in /etc (if configured)
+[ -x /usr/sbin/openglify ] && /usr/sbin/openglify
+
+# touch /etc/asound.state if alsa is configured
+[ -d /proc/asound/card0 ] && touch /etc/asound.state
+
 # tweak the motd for gentoo releases 
 if [ "${clst_livecd_type}" = "gentoo-release-universal" ]
 then
index 549a4600825130e0f348f8ec68a71a4bc505c475..c918371c5bb7869b7642ece98c2bddb94eb44b40 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/default-runscript.sh,v 1.19 2004/12/16 03:49:49 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/default-runscript.sh,v 1.20 2004/12/16 17:51:23 wolf31o2 Exp $
 
 #return codes to be used by archscript
 die() {
@@ -145,11 +145,26 @@ case $1 in
                        ${clst_chroot_path}/root/.bash_profile
                cp -a ${clst_sharedir}/livecd/files/livecd-local.start \
                        ${clst_chroot_path}/etc/conf.d/local.start
+
+               # touch /etc/startx if our livecd/type requires it
+               if [ "${clst_livecd_type}" = "gentoo-release-environmental" ] \
+               || [ "${clst_livecd_type}" = "gentoo-gamecd" ]
+               then
+                       touch ${clst_chroot_path}/etc/startx
+               fi
                
                # now, finalize and tweak the livecd fs (inside of the chroot)
                cp ${clst_sharedir}/livecd/runscript-support/livecdfs-update.sh ${clst_chroot_path}/tmp
                ${clst_CHROOT} ${clst_chroot_path} /tmp/livecdfs-update.sh || exit 1
                rm -f ${clst_chroot_path}/tmp/livecdfs-update.sh
+
+               # execute gamecdfs-update.sh if we're a gamecd
+               if [ "${clst_livecd_type}" = "gentoo-gamecd" ]
+               then
+                       cp ${clst_sharedir}/livecd/runscript-support/gamecdfs-update.sh ${clst_chroot_path}/tmp
+                       ${clst_CHROOT} ${clst_chroot_path} /tmp/gamecdfs-update.sh || exit 1
+                       rm -f ${clst_chroot_path}/tmp/gamecdfs-update.sh
+               fi
                
                # if the user has their own fs update script, execute it
                if [ -n "${clst_livecd_fsscript}" ]
index 872b4ac901dadfb610e3f00e46b33525fdb2214d..72a77e1f99d225abb9255f728db00c20bf95edd4 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.23 2004/10/16 13:38:09 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.24 2004/12/16 17:51:23 wolf31o2 Exp $
 
 """
 Builder class for a LiveCD stage2 build.
@@ -39,7 +39,8 @@ class livecd_stage2_target(generic_stage_target):
                        "livecd/unmerge","livecd/iso","livecd/gk_mainargs","livecd/type",\
                        "livecd/motd","livecd/overlay","livecd/modblacklist","livecd/splash_theme",\
                        "livecd/rcadd","livecd/rcdel","livecd/fsscript","livecd/xinitrc",\
-                       "livecd/root_overlay","livecd/devmanager","livecd/splash_type"])
+                       "livecd/root_overlay","livecd/devmanager","livecd/splash_type",\
+                       "gamecd/conf"])
                
                generic_stage_target.__init__(self,spec,addlargs)
                file_locate(self.settings, ["livecd/cdtar","livecd/archscript","livecd/runscript"])