diff options
author | Andrew Gaffney <agaffney@gentoo.org> | 2008-12-13 14:36:16 -0600 |
---|---|---|
committer | Andrew Gaffney <agaffney@gentoo.org> | 2008-12-13 14:36:16 -0600 |
commit | 8bc0328be83a557f02139df8479ba2b4fc1297bd (patch) | |
tree | 2851a78855da52f1c10eeff48871d14b920c592b | |
parent | Enable support klogd and syslogd for netboot (diff) | |
download | genkernel-8bc0328be83a557f02139df8479ba2b4fc1297bd.tar.gz genkernel-8bc0328be83a557f02139df8479ba2b4fc1297bd.tar.bz2 genkernel-8bc0328be83a557f02139df8479ba2b4fc1297bd.zip |
Move udhcpc's script to default location
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | defaults/initrd.scripts | 2 | ||||
-rw-r--r-- | gen_initramfs.sh | 11 | ||||
-rw-r--r-- | netboot/linuxrc.x | 3 |
4 files changed, 13 insertions, 7 deletions
@@ -2,6 +2,10 @@ # Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney # Distributed under the GPL v2 + 13 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> defaults/initrd.scripts, + gen_initramfs.sh, netboot/linuxrc.x: + Move udhcpc's script to default location + 13 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> defaults/busy-config: Enable support klogd and syslogd for netboot diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 512da6a5..beec6de2 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -196,7 +196,7 @@ mount_sysfs() { } findnfsmount() { - if [ "${IP}" != '' ] || busybox udhcpc -n -T 15 -q -s /bin/udhcpc.scripts + if [ "${IP}" != '' ] || busybox udhcpc -n -T 15 -q then [ -e /rootpath ] && NFSROOT=`cat /rootpath` diff --git a/gen_initramfs.sh b/gen_initramfs.sh index e14604c9..b6bfb9fe 100644 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -42,15 +42,18 @@ append_busybox() { then rm -rf "${TEMP}/initramfs-busybox-temp" > /dev/null fi - mkdir -p "${TEMP}/initramfs-busybox-temp/bin/" - cp "${GK_SHARE}/defaults/udhcpc.scripts" ${TEMP}/initramfs-busybox-temp/bin/ - chmod +x "${TEMP}/initramfs-busybox-temp/bin/udhcpc.scripts" + mkdir -p "${TEMP}/initramfs-busybox-temp/bin/" tar -xjf "${BUSYBOX_BINCACHE}" -C "${TEMP}/initramfs-busybox-temp/bin" busybox || gen_die 'Could not extract busybox bincache!' chmod +x "${TEMP}/initramfs-busybox-temp/bin/busybox" - for i in '[' ash sh mount uname echo cut; do + mkdir -p "${TEMP/initramfs-busybox-temp/usr/share/udhcpc/" + cp "${GK_SHARE}/defaults/udhcpc.scripts" ${TEMP}/initramfs-busybox-temp/usr/share/udhcpc/default.script + chmod +x "${TEMP}/initramfs-busybox-temp/usr/share/udhcpc/default.script" + + # Set up a few default symlinks + for i in '[' ash sh mount uname echo cut cat; do rm -f ${TEMP}/initramfs-busybox-temp/bin/$i > /dev/null ln ${TEMP}/initramfs-busybox-temp/bin/busybox ${TEMP}/initramfs-busybox-temp/bin/$i || gen_die "Busybox error: could not link ${i}!" diff --git a/netboot/linuxrc.x b/netboot/linuxrc.x index 5285fa5f..da377f5e 100644 --- a/netboot/linuxrc.x +++ b/netboot/linuxrc.x @@ -10,7 +10,7 @@ export PATH="/usr/sbin:/usr/bin:/sbin:/bin" BasicSetup() { #// Copyright year, Build date in YYYYMMDD format, and in MMDDYYYY to make busybox 'date' happy - MYDATE="`cat /etc/build_date`" + MYDATE="`/bin/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)" @@ -97,7 +97,6 @@ StartUp() { #// Misc tasks chmod +x /bin/net-setup - chmod +x /usr/share/udhcpc/default.script fi } |