wok-6.x annotate busybox-boot/receipt @ rev 13591
move from undigest: 0install adminer blktrace busybox-boot blktrace codiad davmail e4rat fbff flashrom fsthost get-softmodem-driver lessfs libmikmod libmikmod-dev lvmts mikmod navit phpeasyvcs puppet qtractor splashutils systemd tokyocabinet tokyocabinet-dev vmware-view-open-client wine-rt-dev xflux
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Nov 08 09:35:38 2012 +0100 (2012-11-08) |
parents | |
children | 4fd8473c8682 |
rev | line source |
---|---|
pascal@13591 | 1 # SliTaz package receipt. |
pascal@13591 | 2 |
pascal@13591 | 3 PACKAGE="busybox-boot" |
pascal@13591 | 4 VERSION="1.20.2" |
pascal@13591 | 5 CATEGORY="base-system" |
pascal@13591 | 6 SHORT_DESC="Many common UNIX utilities for core-5in1/boot flavor." |
pascal@13591 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@13591 | 8 DEPENDS="linux syslinux" |
pascal@13591 | 9 WANTED="busybox" |
pascal@13591 | 10 WEB_SITE="http://www.busybox.net/" |
pascal@13591 | 11 CONFIG_FILES="" |
pascal@13591 | 12 |
pascal@13591 | 13 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@13591 | 14 genpkg_rules() |
pascal@13591 | 15 { |
pascal@13591 | 16 jslinux=false |
pascal@13591 | 17 mkdir -p $fs/bin $fs/sbin $fs/dev/pts $fs/proc $fs/sys $fs/tmp |
pascal@13591 | 18 cp -a $src/busybox-static $fs/bin/busybox |
pascal@13591 | 19 mknod -m 660 $fs/dev/console c 5 1 |
pascal@13591 | 20 mknod -m 771 $fs/dev/null c 1 3 |
pascal@13591 | 21 mknod -m 660 $fs/dev/tty c 5 0 |
pascal@13591 | 22 if $jslinux; then |
pascal@13591 | 23 mknod -m 644 $fs/dev/clipboard c 10 231 |
pascal@13591 | 24 mknod -m 660 $fs/dev/ttyS0 c 4 64 |
pascal@13591 | 25 fi |
pascal@13591 | 26 mknod -m 660 $fs/dev/tty1 c 4 1 |
pascal@13591 | 27 cat > $fs/init <<EOT |
pascal@13591 | 28 #!/bin/busybox sh |
pascal@13591 | 29 |
pascal@13591 | 30 for i in \$(busybox --list) ; do busybox ln /bin/busybox /bin/\$i; done |
pascal@13591 | 31 |
pascal@13591 | 32 export PATH=/bin |
pascal@13591 | 33 export HOME=/ |
pascal@13591 | 34 export TERM=vt100 |
pascal@13591 | 35 |
pascal@13591 | 36 mount -t proc none /proc |
pascal@13591 | 37 [ -d /proc/bus/usb ] && mount -t usbfs usbfs /proc/bus/usb |
pascal@13591 | 38 mount -t sysfs none /sys |
pascal@13591 | 39 mount -t devpts none /dev/pts |
pascal@13591 | 40 |
pascal@13591 | 41 TTY=\$(tty 2>/dev/null) |
pascal@13591 | 42 TTY=\${TTY:-/dev/tty1} |
pascal@13591 | 43 EOT |
pascal@13591 | 44 $jslinux && cat >> $fs/init <<EOT |
pascal@13591 | 45 stty -F \$TTY rows 30 2>/dev/null |
pascal@13591 | 46 EOT |
pascal@13591 | 47 cat >> $fs/init <<EOT |
pascal@13591 | 48 |
pascal@13591 | 49 busybox | sed '/Current/,\$!d' |
pascal@13591 | 50 while true; do |
pascal@13591 | 51 if [ -x /bin/setsid ]; then |
pascal@13591 | 52 setsid sh -c "exec sh <\$TTY >\$TTY 2>&1" |
pascal@13591 | 53 else |
pascal@13591 | 54 sh <\$TTY >\$TTY 2>&1 |
pascal@13591 | 55 fi |
pascal@13591 | 56 done |
pascal@13591 | 57 EOT |
pascal@13591 | 58 chmod +x $fs/init |
pascal@13591 | 59 ln $fs/init $fs/sbin/init |
pascal@13591 | 60 } |
pascal@13591 | 61 |
pascal@13591 | 62 pre_install() |
pascal@13591 | 63 { |
pascal@13591 | 64 rm -rf $1/bin $1/sbin |
pascal@13591 | 65 } |
pascal@13591 | 66 |
pascal@13591 | 67 post_install() |
pascal@13591 | 68 { |
pascal@13591 | 69 rm -rf $1/lib $1/var $1/sbin $1/home $1/root $1/media |
pascal@13591 | 70 } |