Changeset f2e3b63e in freewrt


Ignore:
Timestamp:
Jul 27, 2006, 2:43:02 PM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
356d3a6
Parents:
6d052bd
Message:
  • adding mksh to /etc/shells is no longer necessary as of r441
  • while here, instead of patching /etc/profile on mksh postinstall time, add a hook for /etc/mkshrc reading to standard /etc/profile and create that; bump mksh patchlevel note: the next _upstream_ mksh version will already come with a sample ~/.mkshrc which we will install (patched appropriately) as /etc/mkshrc (read from within our /etc/profile, not by mksh default) then, to get rid of the postinstall script as well

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

Location:
package
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • package/base-files/default/etc/profile

    r6d052bd rf2e3b63e  
    1212[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
    1313reboot() { ifdown wan >&- 2>&-; /sbin/reboot; }
     14
     15[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
  • package/mksh/Makefile

    r6d052bd rf2e3b63e  
    55PKG_NAME=               mksh
    66PKG_VERSION=            27.4
    7 PKG_RELEASE=            5
     7PKG_RELEASE=            6
    88PKG_SOURCE=             ${PKG_NAME}-R27e.cpio.gz
    99PKG_MD5SUM=             2eeb5c5fab32cc7a20ca3c7c2c6fda46
  • package/mksh/ipkg/mksh.postinst

    r6d052bd rf2e3b63e  
    22# $FreeWRT$
    33
    4 if ! grep /bin/mksh ${IPKG_INSTROOT}/etc/shells >/dev/null 2>&1; then
    5         echo /bin/mksh >>${IPKG_INSTROOT}/etc/shells
    6 fi
    7 
    8 if ! grep KSH_VERSION ${IPKG_INSTROOT}/etc/profile >/dev/null 2>&1; then
    9         echo 'if test -n "$KSH_VERSION"; then' >>${IPKG_INSTROOT}/etc/profile
    10         echo '  : ${HOSTNAME:=$(</proc/sys/kernel/hostname)}' >>${IPKG_INSTROOT}/etc/profile
    11         echo '  PS1='\''$(((rv=$?)) && print $rv\|)${USER:=$(id -un)}@${HOSTNAME:=nil}:$(' >>${IPKG_INSTROOT}/etc/profile
    12         echo '          local pfx=~ wd=${PWD:-$(pwd)}' >>${IPKG_INSTROOT}/etc/profile
    13         echo '          [[ ${wd#$pfx} = $wd || $pfx = ?(/) ]] || wd=\~${wd#$pfx}' >>${IPKG_INSTROOT}/etc/profile
    14         echo '          pfx=; let n="( (n = ${COLUMNS:-80} / 3) < 7 ? 7 : n)"' >>${IPKG_INSTROOT}/etc/profile
    15         echo '          while (( (${#pfx} + ${#wd}) > n )); do' >>${IPKG_INSTROOT}/etc/profile
    16         echo '                  if [[ $wd = */* ]]; then' >>${IPKG_INSTROOT}/etc/profile
    17         echo '                          pfx=.../' >>${IPKG_INSTROOT}/etc/profile
    18         echo '                          wd="${wd#*/}"' >>${IPKG_INSTROOT}/etc/profile
    19         echo '                  else' >>${IPKG_INSTROOT}/etc/profile
    20         echo '                          pfx=...' >>${IPKG_INSTROOT}/etc/profile
    21         echo '                          wd="${wd#?????}"' >>${IPKG_INSTROOT}/etc/profile
    22         echo '                  fi' >>${IPKG_INSTROOT}/etc/profile
    23         echo '          done' >>${IPKG_INSTROOT}/etc/profile
    24         echo '          print -r -- "$pfx$wd")'\''" $(if (( $(id -u) )); then' >>${IPKG_INSTROOT}/etc/profile
    25         echo '                  print \$; else print \#; fi) "' >>${IPKG_INSTROOT}/etc/profile
    26         echo '  export HOSTNAME PS1 USER' >>${IPKG_INSTROOT}/etc/profile
    27         echo 'fi' >>${IPKG_INSTROOT}/etc/profile
    28 fi
     4echo '  : ${HOSTNAME:=$(</proc/sys/kernel/hostname)}' >>${IPKG_INSTROOT}/etc/mkshrc
     5echo '  PS1='\''$(((rv=$?)) && print $rv\|)${USER:=$(id -un)}@${HOSTNAME:=nil}:$(' >>${IPKG_INSTROOT}/etc/mkshrc
     6echo '          local pfx=~ wd=${PWD:-$(pwd)}' >>${IPKG_INSTROOT}/etc/mkshrc
     7echo '          [[ ${wd#$pfx} = $wd || $pfx = ?(/) ]] || wd=\~${wd#$pfx}' >>${IPKG_INSTROOT}/etc/mkshrc
     8echo '          pfx=; let n="( (n = ${COLUMNS:-80} / 3) < 7 ? 7 : n)"' >>${IPKG_INSTROOT}/etc/mkshrc
     9echo '          while (( (${#pfx} + ${#wd}) > n )); do' >>${IPKG_INSTROOT}/etc/mkshrc
     10echo '                  if [[ $wd = */* ]]; then' >>${IPKG_INSTROOT}/etc/mkshrc
     11echo '                          pfx=.../' >>${IPKG_INSTROOT}/etc/mkshrc
     12echo '                          wd="${wd#*/}"' >>${IPKG_INSTROOT}/etc/mkshrc
     13echo '                  else' >>${IPKG_INSTROOT}/etc/mkshrc
     14echo '                          pfx=...' >>${IPKG_INSTROOT}/etc/mkshrc
     15echo '                          wd="${wd#?????}"' >>${IPKG_INSTROOT}/etc/mkshrc
     16echo '                  fi' >>${IPKG_INSTROOT}/etc/mkshrc
     17echo '          done' >>${IPKG_INSTROOT}/etc/mkshrc
     18echo '          print -r -- "$pfx$wd")'\''" $(if (( $(id -u) )); then' >>${IPKG_INSTROOT}/etc/mkshrc
     19echo '                  print \$; else print \#; fi) "' >>${IPKG_INSTROOT}/etc/mkshrc
     20echo '  export HOSTNAME PS1 USER' >>${IPKG_INSTROOT}/etc/mkshrc
Note: See TracChangeset for help on using the changeset viewer.