wok-tiny view gpxe/receipt @ rev 35

kernel: no more /proc/config.gz
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Feb 04 18:08:55 2011 +0100 (2011-02-04)
parents 73db4e196b5f
children dc8eca11e97c
line source
1 # SliTaz package receipt.
3 PACKAGE="gpxe"
4 VERSION="0.9.3"
5 CATEGORY="network"
6 SHORT_DESC="Forward PXE to Slitaz Web Boot"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 WEB_SITE="http://boot.slitaz.org/"
9 DEPENDS="base-tiny udhcpd-config"
10 CONFIG_FILES="/etc/rcS.conf /etc/udhcpd.conf /etc/inetd.conf"
12 # Rules to configure and make the package.
13 compile_rules()
14 {
15 while read pkg file ; do
16 if [ ! -s $pkg*/fs$file ]; then
17 tazpkg get $pkg
18 tazpkg extract $pkg*.tazpkg
19 fi
20 mkdir -p fs$(dirname $file)
21 mv $pkg*/fs$file fs$(dirname $file) || return 1
22 done << EOT
23 gpxe-pxe /usr/share/boot/gpxe.pxe
24 EOT
25 }
27 # Rules to gen a SliTaz package suitable for Tazpkg.
28 genpkg_rules()
29 {
30 cp -a fs/. $fs
31 }
33 post_install()
34 {
35 [ -n "$URLS" ] && \
36 echo "$URLS" | dos2unix | sed 's/$/,/' | cat - /dev/null | \
37 dd of=$1/usr/share/boot/gpxe.pxe bs=1 seek=5 count=256 2> /dev/null
38 grep -q inetd $1/etc/rcS.conf ||
39 sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
40 grep -q udhcpd $1/etc/rcS.conf ||
41 sed -i 's/^RUN_DAEMONS="/&udhcpd /' $1/etc/rcS.conf
42 grep -q tftpd $1/etc/rcS.conf ||
43 sed -i 's/^RUN_DAEMONS="/&tftpd /' $1/etc/rcS.conf
44 grep -q tftpd $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
45 tftp dgram udp wait root /usr/bin/tftpd /usr/bin/tftpd -r /usr/share/boot
46 EOT
47 cat >> $1/etc/udhcpd.conf <<EOT
48 opt bootfile gpxe.pxe
49 EOT
50 }
52 config_form()
53 {
54 [ -n "$URLS" ] ||
55 URLS="$(dd if=$1/usr/share/boot/gpxe.pxe bs=1 skip=5 count=256 2> /dev/null | \
56 strings | sed s'/,/\n/g')"
57 cat <<EOT
58 Boot url list :
59 <textarea name="URLS" cols="60" rows="5" wrap="off">
60 $URLS
61 </textarea>
62 EOT
63 }