move some stuff from the archscript to the default runscript
authorBrad House <brad_mssw@gentoo.org>
Sun, 18 Jan 2004 21:24:28 +0000 (21:24 +0000)
committerBrad House <brad_mssw@gentoo.org>
Sun, 18 Jan 2004 21:24:28 +0000 (21:24 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@180 d1e1f19c-881f-0410-ab34-b69fee027534

examples/livecd/runscript/default-runscript.sh
examples/livecd/runscript/x86-runscript.sh

index 73cabb308fd12a95131606497c68a20a6141b350..54de337c977ed6be2c0e33e97b530bdb1ef56705 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/examples/livecd/runscript/Attic/default-runscript.sh,v 1.6 2004/01/17 22:13:40 brad_mssw Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/examples/livecd/runscript/Attic/default-runscript.sh,v 1.7 2004/01/18 21:24:28 brad_mssw Exp $
 
 # Section has been handled, do not execute additional scripts
 RETURN_GOOD=0
@@ -9,14 +9,6 @@ RETURN_BAD=1
 # Should continue
 RETURN_CONTINUE=2
 
-# Set default looptype to zisofs
-if [ "${LOOPTYPE}" == "" ]
-then
-       LOOPTYPE="zisofs"
-fi
-
-export LOOPTYPE
-
 die() {
        echo "$1"
        exit $RETURN_BAD
@@ -43,6 +35,28 @@ die() {
 # runscript: cdroot_setup
 
 # livecd-stage3 completes.
+# Set default looptype to zisofs
+
+if [ "${LOOPTYPE}" == "" ]
+then
+       LOOPTYPE="zisofs"
+fi
+
+export LOOPTYPE
+
+if [ "${LOOPTYPE}" = "zisofs" ]
+then
+       loop_opts="looptype=zisofs loop=/zisofs"
+elif [ "${LOOPTYPE}" = "normal" ]
+then
+       loop_opts="looptype=normal loop=/livecd.loop"
+elif [ "${LOOPTYPE}" = "noloop" ]
+then
+       # no loop at all wanted, just a raw copy on a cd
+       loop_opts="looptype=noloop"
+fi
+# loop options to be passed to the kernel
+export loop_opts
 
 if [ "${ARCH_RUNSCRIPT}" == "" -o ! -f "${ARCH_RUNSCRIPT}" ]
 then
index 1bc90c8c0cf9ad94688580fb79ebc13edb4566d9..e5b11cd3eb5e4e7aa97cbbfaaf02d9708f010ef8 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/examples/livecd/runscript/Attic/x86-runscript.sh,v 1.6 2004/01/17 18:37:25 brad_mssw Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/examples/livecd/runscript/Attic/x86-runscript.sh,v 1.7 2004/01/18 21:24:28 brad_mssw Exp $
 
 # Section has been handled, do not execute additional scripts
 RETURN_GOOD=0
@@ -36,19 +36,8 @@ case $1 in
        ;;
 
        setup_bootloader)
-               # LOOPTYPE should be exported from default runscript, we use it to
-               # determine kernel args
-               if [ "${LOOPTYPE}" = "zisofs" ]
-               then
-                       loop_opts="looptype=zisofs loop=/zisofs"
-               elif [ "${LOOPTYPE}" = "normal" ]
-               then
-                       loop_opts="looptype=normal loop=/livecd.loop"
-               elif [ "${LOOPTYPE}" = "noloop" ]
-               then
-                       # no loop at all wanted, just a raw copy on a cd
-                       loop_opts="looptype=noloop"
-               fi
+               # LOOPTYPE and loop_opts are exported from the default
+               # runscript
 
                #Time to create a filesystem tree for the ISO at $clst_cdroot_path.
                #We extract the "cdtar" to this directory, which will normally contains a pre-built