Move all netboot logic from catalyst into gk

cleanup-cruft
Andrew Gaffney 16 years ago
parent 4387993d2d
commit f82aebc40c

@ -2,6 +2,10 @@
# Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney # Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney
# Distributed under the GPL v2 # Distributed under the GPL v2
07 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> gen_initramfs.sh,
netboot/linuxrc.x:
Move all netboot logic from catalyst into gk
07 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> defaults/udhcpc.scripts, 07 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> defaults/udhcpc.scripts,
gen_cmdline.sh, gen_determineargs.sh, netboot/linuxrc.x: gen_cmdline.sh, gen_determineargs.sh, netboot/linuxrc.x:
Initial support for --netboot option integrate functionality from netboot Initial support for --netboot option integrate functionality from netboot

@ -7,6 +7,7 @@ append_base_layout() {
then then
rm -rf "${TEMP}/initramfs-base-temp" > /dev/null rm -rf "${TEMP}/initramfs-base-temp" > /dev/null
fi fi
mkdir -p ${TEMP}/initramfs-base-temp/dev mkdir -p ${TEMP}/initramfs-base-temp/dev
mkdir -p ${TEMP}/initramfs-base-temp/bin mkdir -p ${TEMP}/initramfs-base-temp/bin
mkdir -p ${TEMP}/initramfs-base-temp/etc mkdir -p ${TEMP}/initramfs-base-temp/etc
@ -28,6 +29,9 @@ append_base_layout() {
mknod -m 660 console c 5 1 mknod -m 660 console c 5 1
mknod -m 660 null c 1 3 mknod -m 660 null c 1 3
mknod -m 600 tty1 c 4 1 mknod -m 600 tty1 c 4 1
date '+%Y%m%d' > ${TEMP}/initramfs-base-temp/etc/build_date
cd "${TEMP}/initramfs-base-temp/" cd "${TEMP}/initramfs-base-temp/"
find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
rm -rf "${TEMP}/initramfs-base-temp" > /dev/null rm -rf "${TEMP}/initramfs-base-temp" > /dev/null
@ -411,6 +415,10 @@ append_auxilary() {
then then
cp "${CMD_LINUXRC}" "${TEMP}/initramfs-aux-temp/init" cp "${CMD_LINUXRC}" "${TEMP}/initramfs-aux-temp/init"
print_info 2 " >> Copying user specified linuxrc: ${CMD_LINUXRC} to init" print_info 2 " >> Copying user specified linuxrc: ${CMD_LINUXRC} to init"
else
if isTrue ${NETBOOT}
then
cp "${GK_SHARE}/netboot/linuxrc.x" "${TEMP}/initramfs-aux-temp/init"
else else
if [ -f "${GK_SHARE}/arch/${ARCH}/linuxrc" ] if [ -f "${GK_SHARE}/arch/${ARCH}/linuxrc" ]
then then
@ -419,6 +427,7 @@ append_auxilary() {
cp "${GK_SHARE}/defaults/linuxrc" "${TEMP}/initramfs-aux-temp/init" cp "${GK_SHARE}/defaults/linuxrc" "${TEMP}/initramfs-aux-temp/init"
fi fi
fi fi
fi
# Make sure it's executable # Make sure it's executable
chmod 0755 "${TEMP}/initramfs-aux-temp/init" chmod 0755 "${TEMP}/initramfs-aux-temp/init"
@ -476,6 +485,13 @@ append_auxilary() {
chmod +x "${TEMP}/initramfs-aux-temp/etc/initrd.scripts" chmod +x "${TEMP}/initramfs-aux-temp/etc/initrd.scripts"
chmod +x "${TEMP}/initramfs-aux-temp/etc/initrd.defaults" chmod +x "${TEMP}/initramfs-aux-temp/etc/initrd.defaults"
chmod +x "${TEMP}/initramfs-aux-temp/sbin/modprobe" chmod +x "${TEMP}/initramfs-aux-temp/sbin/modprobe"
if isTrue ${NETBOOT}
then
cd "${GK_SHARE}/netboot/misc"
cp -pPRf * "${TEMP}/initramfs-aux-temp/"
fi
cd "${TEMP}/initramfs-aux-temp/" cd "${TEMP}/initramfs-aux-temp/"
find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
cd "${TEMP}" cd "${TEMP}"

@ -12,7 +12,7 @@ BasicSetup() {
export PATH=/usr/sbin:/usr/bin:/sbin:/bin export PATH=/usr/sbin:/usr/bin:/sbin:/bin
#// Copyright year, Build date in YYYYMMDD format, and in MMDDYYYY to make busybox 'date' happy #// Copyright year, Build date in YYYYMMDD format, and in MMDDYYYY to make busybox 'date' happy
MYDATE="@@MYDATE@@" MYDATE="`cat /etc/build_date`"
CPYYEAR="$(echo ${MYDATE} | cut -c 1-4)" CPYYEAR="$(echo ${MYDATE} | cut -c 1-4)"
BBDATE="$(echo ${MYDATE} | cut -c 5-8)$(echo ${MYDATE} | cut -c 1-4)" BBDATE="$(echo ${MYDATE} | cut -c 5-8)$(echo ${MYDATE} | cut -c 1-4)"
DISDATE="$(echo ${MYDATE} | cut -c 7-8) $(echo ${MYDATE} | cut -c 5-6) $(echo ${MYDATE} | cut -c 1-4)" DISDATE="$(echo ${MYDATE} | cut -c 7-8) $(echo ${MYDATE} | cut -c 5-6) $(echo ${MYDATE} | cut -c 1-4)"

Loading…
Cancel
Save