# Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney
# 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,
gen_cmdline.sh, gen_determineargs.sh, netboot/linuxrc.x:
Initial support for --netboot option integrate functionality from netboot
then
rm -rf "${TEMP}/initramfs-base-temp" > /dev/null
fi
+
mkdir -p ${TEMP}/initramfs-base-temp/dev
mkdir -p ${TEMP}/initramfs-base-temp/bin
mkdir -p ${TEMP}/initramfs-base-temp/etc
mknod -m 660 console c 5 1
mknod -m 660 null c 1 3
mknod -m 600 tty1 c 4 1
+
+ date '+%Y%m%d' > ${TEMP}/initramfs-base-temp/etc/build_date
+
cd "${TEMP}/initramfs-base-temp/"
find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
rm -rf "${TEMP}/initramfs-base-temp" > /dev/null
cp "${CMD_LINUXRC}" "${TEMP}/initramfs-aux-temp/init"
print_info 2 " >> Copying user specified linuxrc: ${CMD_LINUXRC} to init"
else
- if [ -f "${GK_SHARE}/arch/${ARCH}/linuxrc" ]
+ if isTrue ${NETBOOT}
then
- cp "${GK_SHARE}/arch/${ARCH}/linuxrc" "${TEMP}/initramfs-aux-temp/init"
+ cp "${GK_SHARE}/netboot/linuxrc.x" "${TEMP}/initramfs-aux-temp/init"
else
- cp "${GK_SHARE}/defaults/linuxrc" "${TEMP}/initramfs-aux-temp/init"
+ if [ -f "${GK_SHARE}/arch/${ARCH}/linuxrc" ]
+ then
+ cp "${GK_SHARE}/arch/${ARCH}/linuxrc" "${TEMP}/initramfs-aux-temp/init"
+ else
+ cp "${GK_SHARE}/defaults/linuxrc" "${TEMP}/initramfs-aux-temp/init"
+ fi
fi
fi
chmod +x "${TEMP}/initramfs-aux-temp/etc/initrd.scripts"
chmod +x "${TEMP}/initramfs-aux-temp/etc/initrd.defaults"
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/"
find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
cd "${TEMP}"
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
#// 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)"
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)"