Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: llandwerlin at gmail.com <llandwerlin@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 08/17] busybox: move udhcp script from skeleton to package
Date: Wed,  8 Dec 2010 10:54:00 +0100	[thread overview]
Message-ID: <1291802049-18764-9-git-send-email-llandwerlin@gmail.com> (raw)
In-Reply-To: <1291802049-18764-1-git-send-email-llandwerlin@gmail.com>

From: Lionel Landwerlin <llandwerlin@gmail.com>

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
---
 fs/skeleton/usr/share/udhcpc/default.script |   39 ---------------------------
 package/busybox/busybox.mk                  |    2 +-
 package/busybox/udhcpc.script               |   39 +++++++++++++++++++++++++++
 3 files changed, 40 insertions(+), 40 deletions(-)
 delete mode 100755 fs/skeleton/usr/share/udhcpc/default.script
 create mode 100755 package/busybox/udhcpc.script

diff --git a/fs/skeleton/usr/share/udhcpc/default.script b/fs/skeleton/usr/share/udhcpc/default.script
deleted file mode 100755
index a52a7f8..0000000
--- a/fs/skeleton/usr/share/udhcpc/default.script
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-
-# udhcpc script edited by Tim Riker <Tim@Rikers.org>
-
-[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
-
-RESOLV_CONF="/etc/resolv.conf"
-[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
-[ -n "$subnet" ] && NETMASK="netmask $subnet"
-
-case "$1" in
-	deconfig)
-		/sbin/ifconfig $interface 0.0.0.0
-		;;
-
-	renew|bound)
-		/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
-
-		if [ -n "$router" ] ; then
-			echo "deleting routers"
-			while route del default gw 0.0.0.0 dev $interface ; do
-				:
-			done
-
-			for i in $router ; do
-				route add default gw $i dev $interface
-			done
-		fi
-
-		echo -n > $RESOLV_CONF
-		[ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
-		for i in $dns ; do
-			echo adding dns $i
-			echo nameserver $i >> $RESOLV_CONF
-		done
-		;;
-esac
-
-exit 0
diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index b7f4740..da391ba 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -141,7 +141,7 @@ endif
 
 define BUSYBOX_INSTALL_TARGET_CMDS
 	$(BUSYBOX_INSTALL_BINARY)
-	-chmod a+rx $(TARGET_DIR)/usr/share/udhcpc/default.script
+	$(INSTALL) -m 0755 -D package/busybox/udhcpc.script $(TARGET_DIR)/usr/share/udhcpc/default.script
 endef
 
 define BUSYBOX_UNINSTALL_TARGET_CMDS
diff --git a/package/busybox/udhcpc.script b/package/busybox/udhcpc.script
new file mode 100755
index 0000000..a52a7f8
--- /dev/null
+++ b/package/busybox/udhcpc.script
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# udhcpc script edited by Tim Riker <Tim@Rikers.org>
+
+[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
+
+RESOLV_CONF="/etc/resolv.conf"
+[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
+[ -n "$subnet" ] && NETMASK="netmask $subnet"
+
+case "$1" in
+	deconfig)
+		/sbin/ifconfig $interface 0.0.0.0
+		;;
+
+	renew|bound)
+		/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
+
+		if [ -n "$router" ] ; then
+			echo "deleting routers"
+			while route del default gw 0.0.0.0 dev $interface ; do
+				:
+			done
+
+			for i in $router ; do
+				route add default gw $i dev $interface
+			done
+		fi
+
+		echo -n > $RESOLV_CONF
+		[ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
+		for i in $dns ; do
+			echo adding dns $i
+			echo nameserver $i >> $RESOLV_CONF
+		done
+		;;
+esac
+
+exit 0
-- 
1.7.2.3

  parent reply	other threads:[~2010-12-08  9:54 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08  9:53 [Buildroot] [pull request] For branch pre-package-generation-2011.02 llandwerlin at gmail.com
2010-12-08  9:53 ` [Buildroot] [PATCH 01/17] gdk-pixbuf: fix dependency on libiconv llandwerlin at gmail.com
2010-12-08 19:08   ` Thomas Petazzoni
2010-12-08 21:00     ` Lionel Landwerlin
2010-12-08  9:53 ` [Buildroot] [PATCH 02/17] dbus: ensure startup script is well installed llandwerlin at gmail.com
2010-12-08  9:53 ` [Buildroot] [PATCH 03/17] hostapd: ensure hostapd binaries are installed in the right place llandwerlin at gmail.com
2010-12-08  9:53 ` [Buildroot] [PATCH 04/17] cloop: ensure target directory exist before copying into llandwerlin at gmail.com
2010-12-08  9:53 ` [Buildroot] [PATCH 05/17] ifplugd: ensure target directories " llandwerlin at gmail.com
2010-12-12 22:59   ` Peter Korsgaard
2010-12-08  9:53 ` [Buildroot] [PATCH 06/17] i2c-tools: ensure binaries are installed in the right place llandwerlin at gmail.com
2010-12-08 19:10   ` Thomas Petazzoni
2010-12-12 23:00     ` Peter Korsgaard
2010-12-12 23:01   ` Peter Korsgaard
2010-12-08  9:53 ` [Buildroot] [PATCH 07/17] udev: ensure startup script is well installed llandwerlin at gmail.com
2010-12-08  9:54 ` llandwerlin at gmail.com [this message]
2010-12-08 19:12   ` [Buildroot] [PATCH 08/17] busybox: move udhcp script from skeleton to package Thomas Petazzoni
2010-12-08 20:55     ` Lionel Landwerlin
2010-12-08 21:16       ` Thomas Petazzoni
2010-12-12 23:04       ` Peter Korsgaard
2010-12-08  9:54 ` [Buildroot] [PATCH 09/17] sdl_sound: avoid using non reevaluated $(STAGING_DIR) llandwerlin at gmail.com
2010-12-08  9:54 ` [Buildroot] [PATCH 10/17] sdl_gfx: " llandwerlin at gmail.com
2010-12-08  9:54 ` [Buildroot] [PATCH 11/17] cups: " llandwerlin at gmail.com
2010-12-08  9:54 ` [Buildroot] [PATCH 12/17] rsync: avoid using non reevaluated $(TARGET_DIR) in RSYNC_INSTALL_TARGET_OPT llandwerlin at gmail.com
2010-12-08  9:54 ` [Buildroot] [PATCH 13/17] gdk-pixbuf: ensure startup script is well installed llandwerlin at gmail.com
2010-12-08  9:54 ` [Buildroot] [PATCH 14/17] pango: " llandwerlin at gmail.com
2010-12-08 19:13   ` Thomas Petazzoni
2010-12-08  9:54 ` [Buildroot] [PATCH 15/17] at: " llandwerlin at gmail.com
2010-12-08  9:54 ` [Buildroot] [PATCH 16/17] bzip2: ensure target directories exist before copying into llandwerlin at gmail.com
2010-12-12 23:08   ` Peter Korsgaard
2010-12-08  9:54 ` [Buildroot] [PATCH 17/17] directfb-examples: rework target installation rule to match package infrastructure llandwerlin at gmail.com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1291802049-18764-9-git-send-email-llandwerlin@gmail.com \
    --to=llandwerlin@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox