Changeset 578cada9 in freewrt


Ignore:
Timestamp:
Jun 5, 2007, 2:05:27 PM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Children:
129d907
Parents:
e92088b
Message:

fix rc.conf entry generation

  • quote properly
  • handle case of $2 and $3 omission correctly
  • make it possible to define empty default values

MFC to 1.0-stable branch recommended

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

Location:
package/base-files
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • package/base-files/Makefile

    re92088b r578cada9  
    1010PKG_NAME:=              base-files
    1111PKG_VERSION:=           1.0
    12 PKG_RELEASE:=           30
     12PKG_RELEASE:=           31
    1313WRKDIST=                ${WRKDIR}/base-files
    1414NO_DISTFILES:=          1
  • package/base-files/files/etc/functions.sh

    re92088b r578cada9  
    5858
    5959add_rcconf() {
    60         rcconf_exists $2 || {
     60        rcconf_exists ${2-$1} || {
    6161                echo "adding service $1 to /etc/rc.conf"
    62                 printf '%s\t\t# %s\n' "${2:-$1}=${3:-NO}" "$1" \
     62                printf '%s="%s"\t\t# %s\n' "${2-$1}" "${3-NO}" "$1" \
    6363                    >>$IPKG_INSTROOT/etc/rc.conf
    6464        }
Note: See TracChangeset for help on using the changeset viewer.