wok-undigest view busybox-boot/receipt @ rev 424

busybox-boot: launch udhcpc
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Sep 04 13:51:35 2011 +0200 (2011-09-04)
parents 30caefbd49e0
children a9194946e154
line source
1 # SliTaz package receipt.
3 PACKAGE="busybox-boot"
4 VERSION="1.19.1"
5 CATEGORY="base-system"
6 SHORT_DESC="Many common UNIX utilities for core-5in1/boot flavor."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 DEPENDS="slitaz-base-files slitaz-boot-scripts linux syslinux"
9 WANTED="busybox"
10 WEB_SITE="http://www.busybox.net/"
11 CONFIG_FILES=""
13 # Rules to gen a SliTaz package suitable for Tazpkg.
14 genpkg_rules()
15 {
16 mkdir -p $fs/bin $fs/etc/init.d
17 cp -a $src/busybox-static $fs/bin/busybox
18 ln -s bin/busybox $fs/init
19 cat > $fs/etc/init.d/rcS <<EOT
20 #!/bin/busybox sh
21 for i in \$(busybox --list) ; do busybox ln /bin/busybox /bin/\$i; done
22 mount proc
23 [ -d /proc/bus/usb ] && mount -t usbfs usbfs /proc/bus/usb
24 mount sys
25 ifconfig lo 127.0.0.1
26 udhcpc -b -i eth0
27 busybox | sed '/Current/,\$!d'
28 EOT
29 # Udhcpc stuff.
30 mkdir -p $fs/usr/share/udhcpc
31 cp $WOK/$WANTED/stuff/udhcp.script $fs/usr/share/udhcpc/default.script
32 chmod +x $fs/usr/share/udhcpc/default.script $fs/etc/init.d/rcS
33 }
35 pre_install()
36 {
37 rm -rf $1/lib $1/usr $1/var $1/bin $1/sbin $1/home $1/root $1/media
38 }
40 post_install()
41 {
42 sed -i 's|sbin/getty.*|bin/sh|;/tty[3-9]/d' $1/etc/inittab
43 }