Changeset 2709

Show
Ignore:
Timestamp:
06/05/07 14:05:27 (1 year ago)
Author:
tg
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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/freewrt/package/base-files/Makefile

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

    r2418 r2709  
    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        }