From a6918178d1edd2ddaace88ce1a0fcc41e2fadd42 Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Mon, 19 Dec 2005 15:03:25 +0000 Subject: [PATCH] Fixed up spacing/coding style on netboot. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@975 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 7 ++- targets/netboot/netboot-chroot.sh | 5 ++- targets/netboot/netboot-combine.sh | 45 +++++++++++-------- targets/netboot/netboot-controller.sh | 63 ++++++++++++--------------- targets/netboot/netboot-image.sh | 7 ++- 5 files changed, 68 insertions(+), 59 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9017b676..664ce4e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.462 2005/12/16 19:32:31 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.463 2005/12/19 15:03:25 wolf31o2 Exp $ + + 19 Dec 2005; Chris Gianelloni + targets/netboot/netboot-chroot.sh, targets/netboot/netboot-combine.sh, + targets/netboot/netboot-controller.sh, targets/netboot/netboot-image.sh: + Fixed up spacing/coding style on netboot. 16 Dec 2005; Chris Gianelloni targets/livecd-stage1/livecd-stage1-chroot.sh, diff --git a/targets/netboot/netboot-chroot.sh b/targets/netboot/netboot-chroot.sh index 7a888194..30bdfc85 100755 --- a/targets/netboot/netboot-chroot.sh +++ b/targets/netboot/netboot-chroot.sh @@ -1,7 +1,8 @@ #!/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-chroot.sh,v 1.4 2005/12/09 19:03:07 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/netboot-chroot.sh,v 1.5 2005/12/19 15:03:25 wolf31o2 Exp $ + . /tmp/chroot-functions.sh update_env_settings @@ -9,7 +10,7 @@ update_env_settings setup_myfeatures setup_myemergeopts -# setup our environment +# Setup our environment export FEATURES="${clst_myfeatures}" export USE_ORDER="env:pkg:conf:defaults" diff --git a/targets/netboot/netboot-combine.sh b/targets/netboot/netboot-combine.sh index a7b27543..e8c07589 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.6 2005/12/09 19:03:07 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/netboot-combine.sh,v 1.7 2005/12/19 15:03:25 wolf31o2 Exp $ . ${clst_sharedir}/targets/support/chroot-functions.sh . ${clst_sharedir}/targets/support/functions.sh @@ -12,19 +12,32 @@ update_env_settings setup_myfeatures setup_myemergeopts -# setup our environment +# Ssetup our environment export FEATURES="${clst_myfeatures}" # First install the boot package that we need booter="" case ${clst_mainarch} in - alpha) booter="";; - arm) booter="";; - hppa) booter=palo;; - sparc*) booter=sparc-utils;; - x86) booter=netboot;; - *) exit 1;; + alpha) + booter="" + ;; + arm) + booter="" + ;; + hppa) + booter=palo + ;; + sparc*) + booter=sparc-utils + ;; + x86|amd64) + booter=netboot + ;; + *) + exit 1 + ;; esac + #if [ ! -z "${booter}" ] ; then # run_emerge ${booter} || exit 1 #fi @@ -34,18 +47,15 @@ extract_kernels ${clst_chroot_path}/tmp # Then generate the netboot image ! :D 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} - - case ${clst_mainarch} in alpha) - # Until aboot is patched this is broken currently. + # Until aboot is patched this is broken currently. # please use catalyst 1.1.5 or older #TEST TEST TEST TEST @@ -69,11 +79,11 @@ do # || 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. + # 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 \ @@ -91,7 +101,6 @@ do #${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 \ @@ -100,6 +109,8 @@ do -a "root=/dev/ram0 ${cmdline_opts}" \ || exit 1 ;; - *) exit 1;; + *) + exit 1 + ;; esac done diff --git a/targets/netboot/netboot-controller.sh b/targets/netboot/netboot-controller.sh index 76bd38e7..7aa7f1ab 100755 --- a/targets/netboot/netboot-controller.sh +++ b/targets/netboot/netboot-controller.sh @@ -1,80 +1,73 @@ #!/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.7 2005/11/30 21:34:03 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/netboot-controller.sh,v 1.8 2005/12/19 15:03:25 wolf31o2 Exp $ + . ${clst_sharedir}/targets/support/functions.sh . ${clst_sharedir}/targets/support/filesystem-functions.sh case ${1} in - #### Couldnt busybox step be in packages .... - build_packages) shift clst_root_path="/" \ clst_packages="$*" \ - exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh + exec_in_chroot \ + ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh ;; - busybox) # Custom busybox config support if [ -f "${clst_netboot_busybox_config}" ] then mkdir -p ${clst_chroot_path}/etc/busybox/${clst_CHOST} - cp -v ${clst_netboot_busybox_config} ${clst_chroot_path}/etc/busybox/${clst_CHOST}/busybox.config + cp -v ${clst_netboot_busybox_config} \ + ${clst_chroot_path}/etc/busybox/${clst_CHOST}/busybox.config clst_use="savedconfig" fi - + # Main Busybox emerge clst_root_path="/" \ clst_use="${clst_use} netboot" \ clst_myemergeopts="${clst_myemergeopts} -O" \ clst_packages="busybox" \ - exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh + 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 - ;; - image) #Creates the base initrd image for the netboot - shift - - # Could this step be a parameter in case there is a different baselayout to add??? + # Could this step be a parameter in case there is a different + # baselayout to add??? clst_myemergeopts="${clst_myemergeopts} --nodeps" \ clst_packages="netboot-base" \ - exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh - + exec_in_chroot \ + ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh + clst_files="${@}" \ - exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-image.sh + exec_in_chroot \ + ${clst_sharedir}/targets/${clst_target}/${clst_target}-image.sh ;; - finish) - - - ${clst_sharedir}/targets/${clst_target}/${clst_target}-combine.sh ;; - clean) exit 0;; *) diff --git a/targets/netboot/netboot-image.sh b/targets/netboot/netboot-image.sh index d1351ff2..2690040e 100644 --- a/targets/netboot/netboot-image.sh +++ b/targets/netboot/netboot-image.sh @@ -1,17 +1,16 @@ #!/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-image.sh,v 1.6 2005/07/05 21:53:41 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/netboot-image.sh,v 1.7 2005/12/19 15:03:25 wolf31o2 Exp $ . /tmp/chroot-functions.sh update_env_settings - -echo "copying files to ${clst_root_path}" +echo "Copying files to ${clst_root_path}" clst_files="/bin/busybox ${clst_files} " for f in ${clst_files} do copy_file ${f} done -echo "done copying files" +echo "Done copying files" -- 2.26.2