Move udhcpc's script to default location
authorAndrew Gaffney <agaffney@gentoo.org>
Sat, 13 Dec 2008 20:36:16 +0000 (14:36 -0600)
committerAndrew Gaffney <agaffney@gentoo.org>
Sat, 13 Dec 2008 20:36:16 +0000 (14:36 -0600)
ChangeLog
defaults/initrd.scripts
gen_initramfs.sh
netboot/linuxrc.x

index 369f92e71e07c38157bc9a58512a8ecfcbe7693e..b970f726e0ff61d7e2003b96efb4cef101972f51 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
 
index 512da6a5758da8bae651eb6766c73bc70ff11b7e..beec6de2ed5d4355b1ce6783bf6c7ce2b01464c5 100644 (file)
@@ -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`
 
index e14604c9e949fdb107ee1a9a8cd5d851054e0dbc..b6bfb9fe4ef1e8380e85c825a0674bbc0283ec50 100644 (file)
@@ -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}!"
index 5285fa5f07ded94c7fef09b185ee5c3c09c93f72..da377f5ec65ed65659c9902da3b28edf85f525de 100644 (file)
@@ -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
 
 }