Changeset 5bef084 in freewrt


Ignore:
Timestamp:
Jul 22, 2006, 6:03:52 PM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
577a1bfe
Parents:
c04ece1
Message:

don't use echo -e or echo -n because it's unportable
if you were using mksh you could use the standardised print builtin
which bash doesn't have (don't know about ash), but as of now you've
got to use the (external) /usr/bin/printf programme for that

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package/base-files/default/etc/functions.sh

    rc04ece1 r5bef084  
    127127        service_exists $1 $2 || {
    128128                echo "adding service $1 to /etc/services"
    129                 echo -e "$1\t$2" >>$IPKG_INSTROOT/etc/services
     129                printf '%s\t%s\n' "$1" "$2" >>$IPKG_INSTROOT/etc/services
    130130        }
    131131}
     
    133133add_rcconf() {
    134134        rcconf_exists $1 $2 || {
    135                  echo "adding service $1 to /etc/rc.conf"
    136                  echo -e "$2" >>$IPKG_INSTROOT/etc/rc.conf
     135                echo "adding service $1 to /etc/rc.conf"
     136                echo "$2" >>$IPKG_INSTROOT/etc/rc.conf
    137137        }
    138138}
Note: See TracChangeset for help on using the changeset viewer.