From 96f6b78bf4648a6865696409344e094f40ea2e4f Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Wed, 30 Nov 2005 21:34:03 +0000 Subject: [PATCH] Changed multiple spaces to tabs to satisfy my OCD. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@919 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 15 ++- arch/ppc.py | 4 +- targets/embedded/embedded-controller.sh | 22 ++-- targets/embedded/embedded-fs-runscript.sh | 22 ++-- .../livecd-stage2/livecd-stage2-controller.sh | 16 +-- targets/netboot/netboot-combine.sh | 124 +++++++++--------- targets/netboot/netboot-controller.sh | 26 ++-- targets/stage1/stage1-chroot.sh | 10 +- targets/stage4/stage4-controller.sh | 20 +-- targets/support/bootloader-setup.sh | 20 +-- targets/support/chroot-functions.sh | 102 +++++++------- targets/support/create-iso.sh | 12 +- targets/support/filesystem-functions.sh | 50 +++---- targets/support/functions.sh | 24 ++-- targets/support/kill-chroot-pids.sh | 58 ++++---- targets/support/kmerge.sh | 22 ++-- targets/support/livecdfs-update.sh | 24 ++-- targets/support/rc-update.sh | 82 ++++++------ 18 files changed, 330 insertions(+), 323 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b6eb8d1..5b54a0fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,18 @@ # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.406 2005/11/29 20:47:25 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.407 2005/11/30 21:34:03 wolf31o2 Exp $ + + 30 Nov 2005; Chris Gianelloni arch/ppc.py, + targets/embedded/embedded-controller.sh, + targets/embedded/embedded-fs-runscript.sh, + targets/livecd-stage2/livecd-stage2-controller.sh, + targets/netboot/netboot-combine.sh, targets/netboot/netboot-controller.sh, + targets/stage1/stage1-chroot.sh, targets/stage4/stage4-controller.sh, + targets/support/bootloader-setup.sh, targets/support/chroot-functions.sh, + targets/support/create-iso.sh, targets/support/filesystem-functions.sh, + targets/support/functions.sh, targets/support/kill-chroot-pids.sh, + targets/support/kmerge.sh, targets/support/livecdfs-update.sh, + targets/support/rc-update.sh: + Changed multiple spaces to tabs to satisfy my OCD. 29 Nov 2005; Eric Edgar targets/support/chroot-functions.sh: diff --git a/arch/ppc.py b/arch/ppc.py index 583a05e6..e540f4ff 100644 --- a/arch/ppc.py +++ b/arch/ppc.py @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/arch/ppc.py,v 1.14 2005/07/06 22:07:46 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/arch/ppc.py,v 1.15 2005/11/30 21:34:03 wolf31o2 Exp $ import os,builder from catalyst_support import * @@ -20,7 +20,7 @@ class generic_ppc(builder.generic): if not os.path.exists("/usr/bin/linux32"): raise CatalystError,"required /usr/bin/linux32 executable not found." self.settings["CHROOT"]="/usr/bin/linux32 chroot" - else: + else: self.settings["CHROOT"]="chroot" class arch_power_ppc(generic_ppc): diff --git a/targets/embedded/embedded-controller.sh b/targets/embedded/embedded-controller.sh index 10c48acf..fc295226 100755 --- a/targets/embedded/embedded-controller.sh +++ b/targets/embedded/embedded-controller.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-controller.sh,v 1.6 2005/10/17 19:01:06 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-controller.sh,v 1.7 2005/11/30 21:34:03 wolf31o2 Exp $ . ${clst_sharedir}/targets/support/functions.sh . ${clst_sharedir}/targets/support/filesystem-functions.sh @@ -29,14 +29,14 @@ case $1 in # ;; - pre-kmerge) - # Sets up the build environment before any kernels are compiled - exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh - ;; - post-kmerge) - # Cleans up the build environment after the kernels are compiled - exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh - ;; + pre-kmerge) + # Sets up the build environment before any kernels are compiled + exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh + ;; + post-kmerge) + # Cleans up the build environment after the kernels are compiled + exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh + ;; kernel) shift @@ -55,8 +55,8 @@ case $1 in ${clst_sharedir}/targets/support/target_image_setup.sh $1 ;; - livecd-update) - # now, finalize and tweak the livecd fs (inside of the chroot) + livecd-update) + # now, finalize and tweak the livecd fs (inside of the chroot) exec_in_chroot ${clst_sharedir}/targets/support/livecdfs-update.sh ;; diff --git a/targets/embedded/embedded-fs-runscript.sh b/targets/embedded/embedded-fs-runscript.sh index 2db728e5..e31995ff 100644 --- a/targets/embedded/embedded-fs-runscript.sh +++ b/targets/embedded/embedded-fs-runscript.sh @@ -9,34 +9,34 @@ die() { # 1 = mkfs path, 2 = fs name, 3 = pkg name fs_check() { - if [ ! -e ${1} ]; then + if [ ! -e ${1} ]; then die "You must install ${3} in order to produce ${2} images" - fi + fi } case $1 in - jffs) + jffs) fs_check /usr/sbin/mkfs.jffs jffs sys-fs/mtd mkfs.jffs -d ${root_fs_path} -o ${clst_image_path}/root.img \ - ${clst_embedded_fs_ops} || die "Could not create a jffs filesystem" + ${clst_embedded_fs_ops} || die "Could not create a jffs filesystem" ;; - jffs2) + jffs2) fs_check /usr/sbin/mkfs.jffs2 jffs2 sys-fs/mtd mkfs.jffs2 --root=${root_fs_path} --output=${clst_image_path}/root.img\ - ${clst_embedded_fs_ops} || die "Could not create a jffs2 filesystem" + ${clst_embedded_fs_ops} || die "Could not create a jffs2 filesystem" ;; - cramfs) + cramfs) fs_check /sbin/mkcramfs cramfs sys-fs/cramfs mkcramfs ${clst_embedded_fs_ops} ${root_fs_path} \ - ${clst_image_path}/root.img || die "Could not create a cramfs filesystem" + ${clst_image_path}/root.img || die "Could not create a cramfs filesystem" ;; - squashfs) + squashfs) fs_check /usr/bin/mksquashfs squashfs sys-fs/squashfs-tools mksquashfs ${root_fs_path} ${clst_image_path}/root.img \ - ${clst_embedded_fs_ops} || die "Could not create a squashfs filesystem" + ${clst_embedded_fs_ops} || die "Could not create a squashfs filesystem" ;; - *) + *) ;; esac diff --git a/targets/livecd-stage2/livecd-stage2-controller.sh b/targets/livecd-stage2/livecd-stage2-controller.sh index 9879cb6b..dc94b260 100755 --- a/targets/livecd-stage2/livecd-stage2-controller.sh +++ b/targets/livecd-stage2/livecd-stage2-controller.sh @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/livecd-stage2-controller.sh,v 1.15 2005/11/14 19:20:30 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/livecd-stage2-controller.sh,v 1.16 2005/11/30 21:34:03 wolf31o2 Exp $ . ${clst_sharedir}/targets/support/functions.sh . ${clst_sharedir}/targets/support/filesystem-functions.sh @@ -56,13 +56,13 @@ case $1 in # execute copy gamecd.conf if we're a gamecd if [ "${clst_livecd_type}" = "gentoo-gamecd" ] then - if [ -n "${clst_gamecd_conf}" ] - then - cp ${clst_gamecd_conf} ${clst_chroot_path}/tmp/gamecd.conf - else - echo "gamecd/conf is required for a gamecd!" - exit 1 - fi + if [ -n "${clst_gamecd_conf}" ] + then + cp ${clst_gamecd_conf} ${clst_chroot_path}/tmp/gamecd.conf + else + echo "gamecd/conf is required for a gamecd!" + exit 1 + fi fi ;; livecd-update) diff --git a/targets/netboot/netboot-combine.sh b/targets/netboot/netboot-combine.sh index b3f6c164..7d24bd29 100644 --- a/targets/netboot/netboot-combine.sh +++ b/targets/netboot/netboot-combine.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/netboot-combine.sh,v 1.4 2005/07/05 21:53:41 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/netboot-combine.sh,v 1.5 2005/11/30 21:34:03 wolf31o2 Exp $ . ${clst_sharedir}/targets/support/chroot-functions.sh . ${clst_sharedir}/targets/support/functions.sh @@ -35,71 +35,71 @@ extract_kernels ${clst_chroot_path}/tmp for kname in ${clst_boot_kernel} do - mkdir -p ${clst_chroot_path}/tmp/staging/initrd-${kname} - cp -r ${clst_chroot_path}/tmp/image ${clst_chroot_path}/tmp/staging/initrd-${kname} - extract_modules ${clst_chroot_path}/tmp/staging/initrd-${kname} ${kname} - create_normal_loop ${clst_chroot_path}/tmp/staging/initrd-${kname} ${clst_target_path} initrd-${kname}.igz - rm -r ${clst_chroot_path}/tmp/staging/initrd-${kname} + mkdir -p ${clst_chroot_path}/tmp/staging/initrd-${kname} + cp -r ${clst_chroot_path}/tmp/image ${clst_chroot_path}/tmp/staging/initrd-${kname} + extract_modules ${clst_chroot_path}/tmp/staging/initrd-${kname} ${kname} + create_normal_loop ${clst_chroot_path}/tmp/staging/initrd-${kname} ${clst_target_path} initrd-${kname}.igz + rm -r ${clst_chroot_path}/tmp/staging/initrd-${kname} - case ${clst_mainarch} in - alpha) + case ${clst_mainarch} in + alpha) # Until aboot is patched this is broken currently. - # please use catalyst 1.1.5 or older + # please use catalyst 1.1.5 or older - #TEST TEST TEST TEST - #http://lists.debian.org/debian-alpha/2004/07/msg00094.html - #make \ - # -C /usr/src/linux \ - # INITRD=/initrd.gz \ - # HPATH="/usr/src/linux/include" \ - # vmlinux bootpfile \ - # || exit 1 - #cp /usr/src/linux/arch/alpha/boot/bootpfile /netboot.alpha || exit 1 - ;; - arm) - #TEST TEST TEST TEST - cp /${clst_chroot_path}/tmp/${kname} /netboot-${kname}.arm || exit 1 - cat /${clst_target_path}/initrd-${kname}.igz >> /${clst_target_path}/netboot-${kname}.arm || exit 1 - #make \ - # -C /usr/src/linux \ - # INITRD=/initrd.gz \ - # bootpImage \ - # || exit 1 - ;; - hppa) - # We have to remove the previous image because the file is considered - # as a tape by palo and then not truncated but rewritten. - #TEST TEST TEST TEST - rm -f /netboot-${kname}.hppa + #TEST TEST TEST TEST + #http://lists.debian.org/debian-alpha/2004/07/msg00094.html + #make \ + # -C /usr/src/linux \ + # INITRD=/initrd.gz \ + # HPATH="/usr/src/linux/include" \ + # vmlinux bootpfile \ + # || exit 1 + #cp /usr/src/linux/arch/alpha/boot/bootpfile /netboot.alpha || exit 1 + ;; + arm) + #TEST TEST TEST TEST + cp /${clst_chroot_path}/tmp/${kname} /netboot-${kname}.arm || exit 1 + cat /${clst_target_path}/initrd-${kname}.igz >> /${clst_target_path}/netboot-${kname}.arm || exit 1 + #make \ + # -C /usr/src/linux \ + # INITRD=/initrd.gz \ + # bootpImage \ + # || exit 1 + ;; + hppa) + # We have to remove the previous image because the file is considered + # as a tape by palo and then not truncated but rewritten. + #TEST TEST TEST TEST + rm -f /netboot-${kname}.hppa - palo \ - -k /${clst_chroot_path}/tmp/${kname} \ - -r /${clst_target_path}/initrd-${kname}.igz \ - -s /${clst_target_path}/netboot-${kname}.hppa \ - -f foo \ - -b /usr/share/palo/iplboot \ - -c "0/vmlinux root=/dev/ram0 ${cmdline_opts}" \ - || exit 1 - ;; - sparc*) - #TEST TEST TEST TEST - #elftoaout -o /netboot-${kname}.${clst_mainarch} /usr/src/linux/vmlinux - #elftoaout -o /netboot-${kname}.${clst_mainarch} /${kname} - #piggy=${clst_mainarch/sparc/piggyback} - #${piggy} /netboot-${kname}.${clst_mainarch} /usr/src/linux/System.map /initrd-${kname}.igz - ;; - x86) - - mknbi-linux \ - -k /${clst_chroot_path}/tmp/${kname} \ - -r /${clst_target_path}/initrd-${kname}.igz \ - -o /${clst_target_path}/netboot-${kname}.x86 \ - -x \ - -a "root=/dev/ram0 ${cmdline_opts}" \ - || exit 1 - ;; - *) exit 1;; - esac + palo \ + -k /${clst_chroot_path}/tmp/${kname} \ + -r /${clst_target_path}/initrd-${kname}.igz \ + -s /${clst_target_path}/netboot-${kname}.hppa \ + -f foo \ + -b /usr/share/palo/iplboot \ + -c "0/vmlinux root=/dev/ram0 ${cmdline_opts}" \ + || exit 1 + ;; + sparc*) + #TEST TEST TEST TEST + #elftoaout -o /netboot-${kname}.${clst_mainarch} /usr/src/linux/vmlinux + #elftoaout -o /netboot-${kname}.${clst_mainarch} /${kname} + #piggy=${clst_mainarch/sparc/piggyback} + #${piggy} /netboot-${kname}.${clst_mainarch} /usr/src/linux/System.map /initrd-${kname}.igz + ;; + x86) + + mknbi-linux \ + -k /${clst_chroot_path}/tmp/${kname} \ + -r /${clst_target_path}/initrd-${kname}.igz \ + -o /${clst_target_path}/netboot-${kname}.x86 \ + -x \ + -a "root=/dev/ram0 ${cmdline_opts}" \ + || exit 1 + ;; + *) exit 1;; + esac done diff --git a/targets/netboot/netboot-controller.sh b/targets/netboot/netboot-controller.sh index d66d1862..76bd38e7 100755 --- a/targets/netboot/netboot-controller.sh +++ b/targets/netboot/netboot-controller.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/netboot-controller.sh,v 1.6 2005/11/29 20:30:42 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/netboot-controller.sh,v 1.7 2005/11/30 21:34:03 wolf31o2 Exp $ . ${clst_sharedir}/targets/support/functions.sh . ${clst_sharedir}/targets/support/filesystem-functions.sh @@ -34,22 +34,22 @@ case ${1} in exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh ;; - pre-kmerge) - # Sets up the build environment before any kernels are compiled - #exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh - ;; - post-kmerge) - # Cleans up the build environment after the kernels are compiled - #exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh - ;; + pre-kmerge) + # Sets up the build environment before any kernels are compiled + #exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh + ;; + post-kmerge) + # Cleans up the build environment after the kernels are compiled + #exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh + ;; kernel) shift - export clst_kname="$1" + export clst_kname="$1" export clst_root_path="/" - #exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh - #exec_in_chroot ${clst_sharedir}/targets/support/kmerge.sh - #exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh + #exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh + #exec_in_chroot ${clst_sharedir}/targets/support/kmerge.sh + #exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh #extract_kernels kernels ;; diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index df3c72d4..f8cb0a56 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-chroot.sh,v 1.36 2005/08/09 19:02:31 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-chroot.sh,v 1.37 2005/11/30 21:34:03 wolf31o2 Exp $ . /tmp/chroot-functions.sh @@ -23,10 +23,10 @@ export FEATURES="${clst_myfeatures} nodoc noman noinfo" ## Sanity check profile if [ -z "${clst_buildpkgs}" ] then - echo "Your profile seems to be broken." - echo "Could not build a list of build packages." - echo "Double check your /etc/make.profile link and the 'packages' files." - exit 1 + echo "Your profile seems to be broken." + echo "Could not build a list of build packages." + echo "Double check your /etc/make.profile link and the 'packages' files." + exit 1 fi diff --git a/targets/stage4/stage4-controller.sh b/targets/stage4/stage4-controller.sh index 3062f640..45613632 100755 --- a/targets/stage4/stage4-controller.sh +++ b/targets/stage4/stage4-controller.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage4/stage4-controller.sh,v 1.9 2005/10/17 19:01:06 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage4/stage4-controller.sh,v 1.10 2005/11/30 21:34:03 wolf31o2 Exp $ . ${clst_sharedir}/targets/support/functions.sh @@ -11,14 +11,14 @@ case $1 in enter) ${clst_CHROOT} ${clst_chroot_path} ;; - pre-kmerge) - # Sets up the build environment before any kernels are compiled - exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh - ;; - post-kmerge) - # Cleans up the build environment after the kernels are compiled - exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh - ;; + pre-kmerge) + # Sets up the build environment before any kernels are compiled + exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh + ;; + post-kmerge) + # Cleans up the build environment after the kernels are compiled + exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh + ;; kernel) shift export clst_kname="$1" @@ -55,7 +55,7 @@ case $1 in exec_in_chroot ${clst_sharedir}/targets/support/livecdfs-update.sh ;; - bootloader) + bootloader) exit 0 ;; diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh index ae15edcd..33e7fc39 100755 --- a/targets/support/bootloader-setup.sh +++ b/targets/support/bootloader-setup.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/bootloader-setup.sh,v 1.19 2005/11/21 17:14:32 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/bootloader-setup.sh,v 1.20 2005/11/30 21:34:03 wolf31o2 Exp $ . ${clst_sharedir}/targets/support/functions.sh . ${clst_sharedir}/targets/support/filesystem-functions.sh @@ -51,7 +51,7 @@ case ${clst_mainarch} in # For now we supply a prebuilt file, prebuilt configuration # and prebuilt boot message. This can be enhanced later on # but the following suffices for now: - + # this sets up the config file for yaboot icfg=$1/boot/yaboot.conf kmsg=$1/boot/boot.msg @@ -68,19 +68,19 @@ case ${clst_mainarch} in echo "APPENDING CUSTOM KERNEL ARGS: ${custom_kopts}" echo >> ${icfg} echo "image=/boot/${x}" >> ${icfg} - + if [ -e "/boot/${x}.igz" ] then - echo "initrd=/boot/${x}.igz" >> ${icfg} + echo "initrd=/boot/${x}.igz" >> ${icfg} fi - + echo "label=${x}" >> ${icfg} echo "read-write" >> ${icfg} if [ "${clst_livecd_splash_type}" == "gensplash" -a -n "${clst_livecd_splash_theme}" ] then - echo "append=\"${default_append_line} splash=silent,theme:${clst_livecd_splash_theme}\"" >> ${icfg} + echo "append=\"${default_append_line} splash=silent,theme:${clst_livecd_splash_theme}\"" >> ${icfg} else - echo "append=\"${default_append_line} splash=silent\"" >> ${icfg} + echo "append=\"${default_append_line} splash=silent\"" >> ${icfg} fi done ;; @@ -169,7 +169,7 @@ case ${clst_mainarch} in else echo " append ${default_append_line} initrd=${x}.igz vga=791 splash=silent" >> ${icfg} fi - + echo >> ${icfg} echo " ${x}" >> ${kmsg} echo "label ${x}-nofb" >> ${icfg} @@ -207,7 +207,7 @@ case ${clst_mainarch} in echo "APPENDING CUSTOM KERNEL ARGS: ${custom_kopts}" echo >> ${icfg} echo "title ${x}" >> ${icfg} - + if [ "${clst_livecd_splash_type}" == "gensplash" -a -n "${clst_livecd_splash_theme}" ] then echo "kernel /boot/${x} ${default_append_line} vga=791 splash=silent,theme:${clst_livecd_splash_theme} CONSOLE=/dev/tty1 quiet" >> ${icfg} @@ -219,7 +219,7 @@ case ${clst_mainarch} in then echo "initrd /boot/${x}.igz" >> ${icfg} fi - + echo >> ${icfg} echo "title ${x} [ No FrameBuffer ]" >> ${icfg} echo "kernel ${x} /boot/${x} ${default_append_line}" >> ${icfg} diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh index 83db0efb..8114ee90 100755 --- a/targets/support/chroot-functions.sh +++ b/targets/support/chroot-functions.sh @@ -6,15 +6,13 @@ trap "echo SIGTERM signal recieved killing $0 with pid $$;kill -9 $$" SIGTERM trap "echo SIGHUP signal recieved killing $0 with pid $$;kill -9 $$" SIGHUP trap "echo SIGKILL signal recieved killing $0 with pid $$;kill -9 $$" SIGKILL -#SIGINT interrupt character (usually Ctrl-C) +#SIGINT interrupt character (usually Ctrl-C) # * example: high-level sequence of events # * my process (call it "P") is running # * user types ctrl-c # * kernel recognizes this and generates SIGINT signal trap "echo SIGINT signal recieved killing $0 with pid $$;kill -9 $$" SIGINT - - check_portage_version(){ portage_version=`/usr/lib/portage/bin/portageq best_version / sys-apps/portage \ | cut -d/ -f2 | cut -d- -f2,3` @@ -27,26 +25,26 @@ check_portage_version(){ } check_genkernel_version(){ - if [ -x /usr/bin/genkernel ] - then - genkernel_version=$(genkernel --version) - genkernel_version_major=${genkernel_version%%.*} - genkernel_version_minor_sub=${genkernel_version#${genkernel_version_major}.} - genkernel_version_minor=${genkernel_version_minor_sub%%.*} - genkernel_version_sub=${genkernel_version##*.} - if [ -n "${genkernel_version}" -a "${genkernel_version_major}" -eq '3' -a "${genkernel_version_minor}" -ge '3' ] - then - echo "Genkernel version ${genkernel_version} found ... continuing" - else - echo "ERROR: Your genkernel version is too low in your seed stage. genkernel version 3.3.0" - echo "or greater is required." - exit 1 - fi - else - exit 1 - fi + if [ -x /usr/bin/genkernel ] + then + genkernel_version=$(genkernel --version) + genkernel_version_major=${genkernel_version%%.*} + genkernel_version_minor_sub=${genkernel_version#${genkernel_version_major}.} + genkernel_version_minor=${genkernel_version_minor_sub%%.*} + genkernel_version_sub=${genkernel_version##*.} + if [ -n "${genkernel_version}" -a "${genkernel_version_major}" -eq '3' -a "${genkernel_version_minor}" -ge '3' ] + then + echo "Genkernel version ${genkernel_version} found ... continuing" + else + echo "ERROR: Your genkernel version is too low in your seed stage. genkernel version 3.3.0" + echo "or greater is required." + exit 1 + fi + else + exit 1 + fi } - + setup_myfeatures(){ if [ -n "${clst_CCACHE}" ] @@ -54,10 +52,10 @@ setup_myfeatures(){ export clst_myfeatures="${clst_myfeatures} ccache" #if [ "${clst_AUTORESUME}" = "1" -a -e /tmp/.clst_ccache ] #then - # echo "CCACHE Autoresume point found not emerging ccache" + # echo "CCACHE Autoresume point found not emerging ccache" #else - emerge --oneshot --nodeps -b -k ccache || exit 1 - # touch /tmp/.clst_ccache + emerge --oneshot --nodeps -b -k ccache || exit 1 + # touch /tmp/.clst_ccache #fi fi @@ -67,14 +65,13 @@ setup_myfeatures(){ export DISTCC_HOSTS="${clst_distcc_hosts}" #if [ "${clst_AUTORESUME}" = "1" -a -e /tmp/.clst_distcc ] #then - # echo "DISTCC Autoresume point found not emerging distcc" + # echo "DISTCC Autoresume point found not emerging distcc" #else - USE="-gtk -gnome" emerge --oneshot --nodeps -b -k distcc || exit 1 - #touch /tmp/.clst_distcc + USE="-gtk -gnome" emerge --oneshot --nodeps -b -k distcc || exit 1 + #touch /tmp/.clst_distcc #fi mkdir -p /etc/distcc echo "${clst_distcc_hosts}" > /etc/distcc/hosts - fi } @@ -82,22 +79,22 @@ setup_myemergeopts(){ if [ -n "${clst_PKGCACHE}" ] then export clst_myemergeopts="--usepkg --buildpkg --newuse" - export bootstrap_opts="-r" + export bootstrap_opts="-r" fi } setup_portage(){ - # portage needs to be merged manually with USE="build" set to avoid frying our - # make.conf. emerge system could merge it otherwise. + # portage needs to be merged manually with USE="build" set to avoid frying our + # make.conf. emerge system could merge it otherwise. - if [ "${clst_AUTORESUME}" = "1" -a -e /tmp/.clst_portage ] - then + if [ "${clst_AUTORESUME}" = "1" -a -e /tmp/.clst_portage ] + then echo "Portage Autoresume point found not emerging portage" - else + else USE="build" emerge --oneshot --nodeps portage touch /tmp/.clst_portage || exit 1 - fi + fi } setup_gcc(){ @@ -125,14 +122,14 @@ setup_binutils(){ } update_env_settings(){ - /usr/sbin/env-update - source /etc/profile - [ -f /tmp/envscript ] && source /tmp/envscript + /usr/sbin/env-update + source /etc/profile + [ -f /tmp/envscript ] && source /tmp/envscript } die() { - echo "$1" - exit 1 + echo "$1" + exit 1 } make_destpath() { @@ -143,18 +140,18 @@ make_destpath() { export ROOT=${1} if [ ! -d ${ROOT} ] then - install -d ${ROOT} + install -d ${ROOT} fi fi } run_emerge() { - # Sets up the ROOT= parameter - # with no options ROOT=/ - make_destpath ${clst_root_path} + # Sets up the ROOT= parameter + # with no options ROOT=/ + make_destpath ${clst_root_path} - if [ -n "${clst_VERBOSE}" ] + if [ -n "${clst_VERBOSE}" ] then echo "ROOT=${ROOT} emerge ${clst_myemergeopts} -vpt $@" || exit 1 emerge ${clst_myemergeopts} -vpt $@ || exit 3 @@ -168,13 +165,13 @@ run_emerge() { fi echo "emerge ${clst_myemergeopts} $@" || exit 1 - + if [ -n "${clst_FETCH}" ] then - export bootstrap_opts="-f" + export bootstrap_opts="-f" emerge ${clst_myemergeopts} -f $@ || exit 1 fi - + emerge ${clst_myemergeopts} $@ || exit 1 } @@ -185,7 +182,7 @@ function copy_libs() { # Check if it's a dynamix exec ldd ${1} > /dev/null 2>&1 || return - + for lib in `ldd ${1} | awk '{ print $3 }'` do echo ${lib} @@ -200,7 +197,6 @@ function copy_libs() { echo "WARNING : Some library was not found for ${lib} !" fi done - } function copy_symlink() { @@ -224,7 +220,7 @@ function copy_symlink() { else copy_file ${TARGET} fi - } + } function copy_file() { @@ -247,5 +243,3 @@ function copy_file() { copy_symlink ${f} fi } - - diff --git a/targets/support/create-iso.sh b/targets/support/create-iso.sh index 7f82967a..a2cb3b39 100755 --- a/targets/support/create-iso.sh +++ b/targets/support/create-iso.sh @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/create-iso.sh,v 1.17 2005/11/22 15:37:03 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/create-iso.sh,v 1.18 2005/11/30 21:34:03 wolf31o2 Exp $ . ${clst_sharedir}/targets/support/functions.sh . ${clst_sharedir}/targets/support/filesystem-functions.sh @@ -8,7 +8,7 @@ # Check for our CD ISO creation tools case ${clst_mainarch} in - mips) cdmaker="sgibootcd"; cdmakerpkg="sys-boot/sgibootcd" ;; + mips) cdmaker="sgibootcd"; cdmakerpkg="sys-boot/sgibootcd" ;; *) cdmaker="mkisofs"; cdmakerpkg="app-cdr/cdrtools" ;; esac @@ -124,20 +124,20 @@ case ${clst_mainarch} in # when booting from CD (current as of silo 1.4.8) mv ${clst_target_path}/boot/mkisofs.sparc.fu /tmp case ${clst_livecd_cdfstype} in - zisofs) + zisofs) echo "Running mkisofs.sparc.fu to create iso image...." echo "/tmp/mkisofs.sparc.fu -z -o ${1} -D -r -pad -quiet -S 'boot/cd.b' -B '/boot/second.b' -s '/boot/silo.conf'" echo "-V \"${clst_iso_volume_id}\" ${clst_target_path}" /tmp/mkisofs.sparc.fu -z -o ${1} -D -r -pad -quiet -S 'boot/cd.b' -B '/boot/second.b' -s '/boot/silo.conf'\ -V "${clst_iso_volume_id}" ${clst_target_path} || die "Cannot make ISO image" - ;; - *) + ;; + *) echo "Running mkisofs.sparc.fu to create iso image...." echo "/tmp/mkisofs.sparc.fu -o ${1} -D -r -pad -quiet -S 'boot/cd.b' -B '/boot/second.b' -s '/boot/silo.conf'" echo "-V \"${clst_iso_volume_id}\" ${clst_target_path}" /tmp/mkisofs.sparc.fu -o ${1} -D -r -pad -quiet -S 'boot/cd.b' -B '/boot/second.b' -s '/boot/silo.conf'\ -V "${clst_iso_volume_id}" ${clst_target_path} || die "Cannot make ISO image" - ;; + ;; esac rm /tmp/mkisofs.sparc.fu diff --git a/targets/support/filesystem-functions.sh b/targets/support/filesystem-functions.sh index 6ab39d96..740a0683 100755 --- a/targets/support/filesystem-functions.sh +++ b/targets/support/filesystem-functions.sh @@ -2,33 +2,33 @@ # $1 is the target directory for the filesystem create_normal_loop() { - export source_path="${clst_destpath}" - export destination_path="$1" - export loopname="image.loop" + export source_path="${clst_destpath}" + export destination_path="$1" + export loopname="image.loop" - #We get genkernel-built kernels and initrds in place, create the loopback fs on - #$clst_target_path, mount it, copy our bootable filesystem over, umount it, and - #we then have a ready-to-burn ISO tree at $clst_target_path. + #We get genkernel-built kernels and initrds in place, create the loopback fs on + #$clst_target_path, mount it, copy our bootable filesystem over, umount it, and + #we then have a ready-to-burn ISO tree at $clst_target_path. - echo "Calculating size of loopback filesystem..." - loopsize=`du -ks ${source_path} | cut -f1` - [ "${loopsize}" = "0" ] && loopsize=1 - # Add 4MB for filesystem slop - loopsize=`expr ${loopsize} + 4096` - echo "Creating loopback file..." - dd if=/dev/zero of=${destination_path}/${loopname} bs=1k count=${loopsize} || die "${loopname} creation failure" - mke2fs -m 0 -F -q ${destination_path}/${loopname} || die "Couldn't create ext2 filesystem" - install -d ${destination_path}/loopmount - sync; sync; sleep 3 #try to work around 2.6.0+ loopback bug - mount -t ext2 -o loop ${destination_path}/${loopname} ${destination_path}/loopmount || die "Couldn't mount loopback ext2 filesystem" - sync; sync; sleep 3 #try to work around 2.6.0+ loopback bug - echo "cp -a ${source_path}/* ${destination_path}/loopmount" - cp -a ${source_path}/* ${destination_path}/loopmount - [ $? -ne 0 ] && { umount ${destination_path}/${loopname}; die "Couldn't copy files to loopback ext2 filesystem"; } - umount ${destination_path}/loopmount || die "Couldn't unmount loopback ext2 filesystem" - rm -rf ${destination_path}/loopmount - #now, $clst_target_path should contain a proper bootable image for our iso, including - #boot loader and loopback filesystem. + echo "Calculating size of loopback filesystem..." + loopsize=`du -ks ${source_path} | cut -f1` + [ "${loopsize}" = "0" ] && loopsize=1 + # Add 4MB for filesystem slop + loopsize=`expr ${loopsize} + 4096` + echo "Creating loopback file..." + dd if=/dev/zero of=${destination_path}/${loopname} bs=1k count=${loopsize} || die "${loopname} creation failure" + mke2fs -m 0 -F -q ${destination_path}/${loopname} || die "Couldn't create ext2 filesystem" + install -d ${destination_path}/loopmount + sync; sync; sleep 3 #try to work around 2.6.0+ loopback bug + mount -t ext2 -o loop ${destination_path}/${loopname} ${destination_path}/loopmount || die "Couldn't mount loopback ext2 filesystem" + sync; sync; sleep 3 #try to work around 2.6.0+ loopback bug + echo "cp -a ${source_path}/* ${destination_path}/loopmount" + cp -a ${source_path}/* ${destination_path}/loopmount + [ $? -ne 0 ] && { umount ${destination_path}/${loopname}; die "Couldn't copy files to loopback ext2 filesystem"; } + umount ${destination_path}/loopmount || die "Couldn't unmount loopback ext2 filesystem" + rm -rf ${destination_path}/loopmount + #now, $clst_target_path should contain a proper bootable image for our iso, including + #boot loader and loopback filesystem. } diff --git a/targets/support/functions.sh b/targets/support/functions.sh index 6fb1f78b..f6306b96 100755 --- a/targets/support/functions.sh +++ b/targets/support/functions.sh @@ -20,8 +20,8 @@ copy_to_chroot(){ delete_from_chroot(){ if [ -e ${clst_chroot_path}${1} ] then - echo "removing ${clst_chroot_path}${1} from the chroot" - rm -f ${clst_chroot_path}${1} + echo "removing ${clst_chroot_path}${1} from the chroot" + rm -f ${clst_chroot_path}${1} fi } @@ -67,7 +67,7 @@ die() { extract_cdtar() { # Create a filesystem tree for the ISO at - # $clst_target_path. We extract the "cdtar" to this directory, + # $clst_target_path. We extract the "cdtar" to this directory, # which will normally contains a pre-built binary # boot-loader/filesystem skeleton for the ISO. @@ -83,7 +83,7 @@ extract_kernels() { # Takes the relative desination dir for the kernel as an arguement # i.e boot or isolinux - [ -z "$clst_boot_kernel" ] && die "Required key boot/kernel not defined, exiting" + [ -z "$clst_boot_kernel" ] && die "Required key boot/kernel not defined, exiting" # install the kernels built in kmerge.sh for x in ${clst_boot_kernel} do @@ -109,13 +109,13 @@ extract_kernels() { # change kernel name from "kernel" to "gentoo", for example if [ -e ${1}/kernel-* ] then - mv ${1}/kernel-* ${1}/${x} + mv ${1}/kernel-* ${1}/${x} fi # change kernel name from "kernelz" to "gentoo", for example if [ -e ${1}/kernelz-* ] then - mv ${1}/kernelz-* ${1}/${x} + mv ${1}/kernelz-* ${1}/${x} fi # change initrd name from "initrd" to "gentoo.igz", for example @@ -138,10 +138,10 @@ extract_modules() { if [ -f "${kmodules}" ] then - mkdir -p ${1}/ - tar xjf ${kmodules} -C ${1} lib + mkdir -p ${1}/ + tar xjf ${kmodules} -C ${1} lib else - echo "Can't find kernel modules tarball at ${kmodules}. Skipping...." + echo "Can't find kernel modules tarball at ${kmodules}. Skipping...." fi } extract_kernel() { @@ -168,7 +168,7 @@ extract_kernel() { # change initramfs name from "initramfs" to "gentoo.igz", for example if [ -e ${1}/initramfs-* ] then - mv ${1}/initramfs-* ${1}/${2}.igz + mv ${1}/initramfs-* ${1}/${2}.igz fi } @@ -196,9 +196,9 @@ check_bootargs(){ check_filesystem_type(){ case ${clst_fstype} in - normal) + normal) cmdline_opts="${cmdline_opts} looptype=normal loop=/image.loop" - ;; + ;; zisofs) cmdline_opts="${cmdline_opts} looptype=zisofs loop=/zisofs" ;; diff --git a/targets/support/kill-chroot-pids.sh b/targets/support/kill-chroot-pids.sh index 9d37e3db..8af4fe9e 100755 --- a/targets/support/kill-chroot-pids.sh +++ b/targets/support/kill-chroot-pids.sh @@ -3,16 +3,16 @@ if [ "${clst_chroot_path}" == "/" ] then - echo "Aborting .... clst_chroot_path is set to /" - echo "This is very dangerous" - exit 1 + echo "Aborting .... clst_chroot_path is set to /" + echo "This is very dangerous" + exit 1 fi if [ "${clst_chroot_path}" == "" ] then - echo "Aborting .... clst_chroot_path is NOT set" - echo "This is very dangerous" - exit 1 + echo "Aborting .... clst_chroot_path is NOT set" + echo "This is very dangerous" + exit 1 fi j=0 @@ -20,39 +20,39 @@ declare -a pids # get files and dirs in /proc for i in `ls /proc` do - # Test for directories - if [ -d /proc/$i ] - then + # Test for directories + if [ -d /proc/$i ] + then # Search for exe containing string inside ${clst_chroot_path} ls -la --color=never /proc/$i 2>&1 |grep exe|grep ${clst_chroot_path} > /dev/null # If found if [ $? == 0 ] then - # Assign the pid into the pids array - pids[$j]=$i - j=$(($j+1)) + # Assign the pid into the pids array + pids[$j]=$i + j=$(($j+1)) + fi fi - fi done if [ ${j} -gt 0 ] then - echo - echo "Killing process(es)" - echo "pid: process name" - for pid in ${pids[@]} - do - P_NAME=$(ls -la --color=never /proc/${pid} 2>&1 |grep exe|grep ${clst_chroot_path}|awk '{print $11}') - echo ${pid}: ${P_NAME} - done - echo - echo "Press Ctrl-C within 10 seconds to abort" - - sleep 10 + echo + echo "Killing process(es)" + echo "pid: process name" + for pid in ${pids[@]} + do + P_NAME=$(ls -la --color=never /proc/${pid} 2>&1 |grep exe|grep ${clst_chroot_path}|awk '{print $11}') + echo ${pid}: ${P_NAME} + done + echo + echo "Press Ctrl-C within 10 seconds to abort" + + sleep 10 - for pid in ${pids[@]} - do - kill -9 ${pid} - done + for pid in ${pids[@]} + do + kill -9 ${pid} + done fi diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh index c68fc267..13a9f9fe 100755 --- a/targets/support/kmerge.sh +++ b/targets/support/kmerge.sh @@ -132,13 +132,13 @@ then #echo "USE Flags match" USE_MATCH=1 else - if [ -n "${clst_KERNCACHE}" ] - then + if [ -n "${clst_KERNCACHE}" ] + then [ -d /usr/portage/packages/gk_binaries/${clst_kname}/ebuilds ] && \ rm -r /usr/portage/packages/gk_binaries/${clst_kname}/ebuilds [ -e /usr/portage/packages/gk_binaries/${clst_kname}/usr/src/linux/.config ] && \ rm /usr/portage/packages/gk_binaries/${clst_kname}/usr/src/linux/.config - fi + fi fi fi @@ -199,23 +199,23 @@ then echo "${KERNELVERSION}" >> /etc/portage/profile/package.provided fi fi - [ -d /usr/src/linux ] && rm /usr/src/linux + [ -d /usr/src/linux ] && rm /usr/src/linux ln -s /usr/portage/packages/gk_binaries/${clst_kname}/usr/src/linux /usr/src/linux else - USE="${USE} symlink build" emerge "${clst_ksource}" || exit 1 + USE="${USE} symlink build" emerge "${clst_ksource}" || exit 1 fi #if catalyst has set to a empty string, extraversion wasn't specified so we skip this part if [ "${EXTRAVERSION_MATCH}" != "1" ] then - if [ "${clst_kextraversion}" != "" ] - then + if [ "${clst_kextraversion}" != "" ] + then echo "Setting extraversion to ${clst_kextraversion}" sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile - echo ${clst_kextraversion} > /usr/portage/packages/gk_binaries/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION - else - touch /usr/portage/packages/gk_binaries/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION - fi + echo ${clst_kextraversion} > /usr/portage/packages/gk_binaries/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION + else + touch /usr/portage/packages/gk_binaries/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION + fi fi diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh index 272d9ad8..126acef2 100755 --- a/targets/support/livecdfs-update.sh +++ b/targets/support/livecdfs-update.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/livecdfs-update.sh,v 1.23 2005/11/17 22:27:13 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/livecdfs-update.sh,v 1.24 2005/11/30 21:34:03 wolf31o2 Exp $ . /tmp/chroot-functions.sh update_env_settings @@ -100,8 +100,8 @@ sed -i '/dev-state/ s:^:#:' /etc/devfsd.conf # http://bugs.gentoo.org/show_bug.cgi?id=60887 mv /etc/fstab /etc/fstab.old echo "####################################################" >> /etc/fstab -echo "## ATTENTION: THIS IS THE FSTAB ON THE LIVECD ##" >> /etc/fstab -echo "## PLEASE EDIT THE FSTAB at /mnt/gentoo/etc/fstab ##" >> /etc/fstab +echo "## ATTENTION: THIS IS THE FSTAB ON THE LIVECD ##" >> /etc/fstab +echo "## PLEASE EDIT THE FSTAB at /mnt/gentoo/etc/fstab ##" >> /etc/fstab echo "####################################################" >> /etc/fstab cat /etc/fstab.old >> /etc/fstab rm /etc/fstab.old @@ -216,9 +216,9 @@ fi # Clear out locales case ${clst_livecd_type} in - gentoo-release-minimal|gentoo-release-universal|gentoo-gamecd) - rm -rf /usr/lib/locale/{a,b,c,d,e{l,n_{A,B,C,D,G,H,I,N,P,S,US.,Z},s,t,u},f,g,h,i,j,k,l,m,n,o,p,r,s,t,u,v,w,x,y,z}* - ;; + gentoo-release-minimal|gentoo-release-universal|gentoo-gamecd) + rm -rf /usr/lib/locale/{a,b,c,d,e{l,n_{A,B,C,D,G,H,I,N,P,S,US.,Z},s,t,u},f,g,h,i,j,k,l,m,n,o,p,r,s,t,u,v,w,x,y,z}* + ;; esac # Post configuration @@ -228,14 +228,14 @@ case ${clst_livecd_type} in if [ -e /tmp/gamecd.conf ] then - source /tmp/gamecd.conf || exit 1 - rm /tmp/gamecd.conf + source /tmp/gamecd.conf || exit 1 + rm /tmp/gamecd.conf - # here we replace out game information into several files - sed -i -e "s:##GAME_NAME:${GAME_NAME}:" /etc/motd + # here we replace out game information into several files + sed -i -e "s:##GAME_NAME:${GAME_NAME}:" /etc/motd - # here we setup our xinitrc - echo "exec ${GAME_EXECUTABLE}" > /etc/X11/xinit/xinitrc + # here we setup our xinitrc + echo "exec ${GAME_EXECUTABLE}" > /etc/X11/xinit/xinitrc fi # This is my hack to reduce tmpfs usage diff --git a/targets/support/rc-update.sh b/targets/support/rc-update.sh index e9f189d6..15f2e885 100644 --- a/targets/support/rc-update.sh +++ b/targets/support/rc-update.sh @@ -4,29 +4,29 @@ if [ "${clst_spec_prefix}" == "livecd" ] then - # default programs that we always want to start - rc-update del iptables default - rc-update del netmount default - rc-update add autoconfig default - rc-update del keymaps - rc-update del serial - rc-update del consolefont - 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 + # default programs that we always want to start + rc-update del iptables default + rc-update del netmount default + rc-update add autoconfig default + rc-update del keymaps + rc-update del serial + rc-update del consolefont + 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 - # Do some livecd_type specific rc-update changes - case ${clst_livecd_type} in - gentoo-gamecd ) + # Do some livecd_type specific rc-update changes + case ${clst_livecd_type} in + gentoo-gamecd ) rc-update add spind default rc-update add x-setup default - ;; + ;; gentoo-release-livecd ) rc-update add spind default rc-update add x-setup default @@ -36,44 +36,44 @@ then rc-update add spind default rc-update add x-setup default ;; - *) - ;; - esac + *) + ;; + esac fi # perform any rcadd then any rcdel if [ -n "${clst_rcadd}" ] || [ -n "${clst_rcdel}" ] then - if [ -n "${clst_rcadd}" ] - then + if [ -n "${clst_rcadd}" ] + then for x in ${clst_rcadd} do - echo "Adding ${x%%|*} to ${x##*|}" - if [ ! -d /etc/runlevels/${x%%|*} ] - then + echo "Adding ${x%%|*} to ${x##*|}" + if [ ! -d /etc/runlevels/${x%%|*} ] + then echo "Runlevel ${x##*|} doesn't exist .... creating it" mkdir -p "/etc/runlevels/${x##*|}" - fi - rc-update add "${x%%|*}" "${x##*|}" + fi + rc-update add "${x%%|*}" "${x##*|}" done - fi + fi - if [ -n "${clst_rcdel}" ] - then + if [ -n "${clst_rcdel}" ] + then for x in ${clst_rcdel} do - rc-update del "${x%%|*}" "${x##*|}" + rc-update del "${x%%|*}" "${x##*|}" done for x in $(ls /etc/runlevels) do - CONTENTS=$(find /etc/runlevels/${x} -type f) - if [ -z "${CONTENTS}" ] - then - echo "${x}: Empty runlevel found.... deleting" + CONTENTS=$(find /etc/runlevels/${x} -type f) + if [ -z "${CONTENTS}" ] + then + echo "${x}: Empty runlevel found.... deleting" rmdir "/etc/runlevels/${x}" - fi + fi done - - fi + + fi fi -- 2.26.2