Changeset 6be9a4d9 in freewrt


Ignore:
Timestamp:
Jul 27, 2006, 2:08:18 PM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
bc417a4
Parents:
601a699
Message:

let the user decide which of the available shells he
wants as /bin/sh - not only these included with busybox

(ash and mksh are probably the only ones which will
work, but like this I won't affect any existing con-
figuration)

git-svn-id: svn://www.freewrt.org/trunk/freewrt@437 afb5a338-a214-0410-bd46-81f09a774fd1

Location:
package
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • package/Config.in

    r601a699 r6be9a4d9  
    1212source "package/ipkg/Config.in"
    1313source "package/iptables/Config.in"
     14source "package/mksh/Config.in"
    1415source "package/mtd/Config.in"
    1516source "package/nvram/Config.in"
    1617source "package/webif/Config.in"
     18comment "/bin/sh"
     19choice
     20        prompt "Choose your default shell"
     21        default BUSYBOX_CONFIG_FEATURE_SH_IS_ASH
     22        help
     23          Choose a shell which is to be used for /bin/sh.
     24          The ash shell is the most bash-compatible shell
     25          and full-featured one in busybox; mksh is a bit
     26          more heavy-weight but feature-complete.
     27
     28config BUSYBOX_CONFIG_FEATURE_SH_IS_ASH
     29        select BUSYBOX_CONFIG_ASH
     30        bool "ash (busybox)"
     31        help
     32          Tha 'ash' shell adds about 60k in the default configuration and is
     33          the most complete and most pedantically correct shell included with
     34          busybox.  This shell is actually a derivative of the Debian 'dash'
     35          shell (by Herbert Xu), which was created by porting the 'ash' shell
     36          (written by Kenneth Almquist) from NetBSD.
     37
     38config FWRT_PACKAGE_MKSH_AS_BINSH
     39        select FWRT_PACKAGE_MKSH
     40        select BUSYBOX_CONFIG_FEATURE_SH_IS_NONE
     41        bool "mksh"
     42        help
     43          mksh is the MirBSD enhanced version of the Public Domain Korn
     44          shell (pdksh), a bourne-compatible shell which is largely similar
     45          to the original AT&T Korn shell. It includes bug fixes and
     46          feature improvements in order to produce a modern, robust shell
     47          good for interactive and especially script use. Some sh/ksh/pdksh
     48          compatibility kludges have been removed.
     49
     50config BUSYBOX_CONFIG_FEATURE_SH_IS_HUSH
     51        select BUSYBOX_CONFIG_HUSH
     52        bool "hush (busybox)"
     53        help
     54          hush is a very small shell (just 18k) and it has fairly complete
     55          Bourne shell grammar.  It even handles all the normal flow control
     56          options such as if/then/elif/else/fi, for/in/do/done, while loops,
     57          etc.
     58
     59          It does not handle case/esac, select, function, here documents ( <<
     60          word ), arithmetic expansion, aliases, brace expansion, tilde
     61          expansion, &> and >& redirection of stdout+stderr, etc.
     62
     63config BUSYBOX_CONFIG_FEATURE_SH_IS_LASH
     64        select BUSYBOX_CONFIG_LASH
     65        bool "lash (busybox)"
     66        help
     67          lash is the very smallest shell (adds just 10k) and it is quite
     68          usable as a command prompt, but it is not suitable for any but the
     69          most trivial scripting (such as an initrd that calls insmod a few
     70          times) since it does not understand any Bourne shell grammar.  It
     71          does handle pipes, redirects, and job control though.  Adding in
     72          command editing makes it a very nice lightweight command prompt.
     73
     74config BUSYBOX_CONFIG_FEATURE_SH_IS_MSH
     75        select BUSYBOX_CONFIG_MSH
     76        bool "msh (busybox)"
     77        help
     78          The minix shell (adds just 30k) is quite complete and handles things
     79          like for/do/done, case/esac and all the things you expect a Bourne
     80          shell to do.  It is not always pedantically correct about Bourne
     81          shell grammar (try running the shell testscript "tests/sh.testcases"
     82          on it and compare vs bash) but for most things it works quite well.
     83          It also uses only vfork, so it can be used on uClinux systems.
     84
     85endchoice
    1786endmenu
    1887
     
    37106source "package/lua/Config.in"
    38107source "package/microperl/Config.in"
    39 source "package/mksh/Config.in"
    40108source "package/monit/Config.in"
    41109source "package/motion/Config.in"
  • package/busybox/Makefile

    r601a699 r6be9a4d9  
    33include $(TOPDIR)/rules.mk
    44
    5 PKG_NAME:=busybox
    6 PKG_RELEASE:=1
    7 PKG_VERSION:=1.1.3
     5PKG_NAME:=              busybox
     6PKG_RELEASE:=           2
     7PKG_VERSION:=           1.1.3
    88
    9 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    10 PKG_SOURCE_URL:=http://www.busybox.net/downloads
    11 PKG_MD5SUM:=19a0b475169335f17e421cf644616fe7
     9PKG_SOURCE:=            $(PKG_NAME)-$(PKG_VERSION).tar.bz2
     10PKG_SOURCE_URL:=        http://www.busybox.net/downloads
     11PKG_MD5SUM:=            19a0b475169335f17e421cf644616fe7
    1212
    1313include $(TOPDIR)/package/rules.mk
  • package/busybox/config/shell/Config.in

    r601a699 r6be9a4d9  
    55
    66menu "Shells"
    7 
    8 choice
    9         prompt "Choose your default shell"
    10         default BUSYBOX_CONFIG_FEATURE_SH_IS_ASH
    11         help
    12           Choose a shell. The ash shell is the most bash compatible
    13           and full featured one.
    14 
    15 config BUSYBOX_CONFIG_FEATURE_SH_IS_ASH
    16         select BUSYBOX_CONFIG_ASH
    17         bool "ash"
    18 
    19 config BUSYBOX_CONFIG_FEATURE_SH_IS_HUSH
    20         select BUSYBOX_CONFIG_HUSH
    21         bool "hush"
    22 
    23 config BUSYBOX_CONFIG_FEATURE_SH_IS_LASH
    24         select BUSYBOX_CONFIG_LASH
    25         bool "lash"
    26 
    27 config BUSYBOX_CONFIG_FEATURE_SH_IS_MSH
    28         select BUSYBOX_CONFIG_MSH
    29         bool "msh"
    30 
    31 config BUSYBOX_CONFIG_FEATURE_SH_IS_NONE
    32         bool "none"
    33 
    34 endchoice
    357
    368config BUSYBOX_CONFIG_ASH
  • package/mksh/Makefile

    r601a699 r6be9a4d9  
    55PKG_NAME=               mksh
    66PKG_VERSION=            27.4
    7 PKG_RELEASE=            4
     7PKG_RELEASE=            5
    88PKG_SOURCE=             ${PKG_NAME}-R27e.cpio.gz
    99PKG_MD5SUM=             2eeb5c5fab32cc7a20ca3c7c2c6fda46
     
    4141        $(CP) $(WRKINST)/bin/mksh $(IDIR_MKSH)/bin/
    4242        $(RSTRIP) $(IDIR_MKSH)
     43ifeq (${FWRT_PACKAGE_MKSH_AS_BINSH},y)
     44        cd $(IDIR_MKSH)/bin/; ln -sf mksh sh
     45endif
     46ifeq (${FWRT_PACKAGE_MKSH_AS_BINASH},y)
     47        cd $(IDIR_MKSH)/bin/; ln -sf mksh ash
     48endif
    4349        $(IPKG_BUILD) $(IDIR_MKSH) $(PACKAGE_DIR)
Note: See TracChangeset for help on using the changeset viewer.