diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-03-02 11:17:29 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-03-02 11:17:29 +0000 |
commit | a01dc23d1702101952732387a02a97efd2763de7 (patch) | |
tree | 867bffdb2984d83de6c4157c077530354df591aa | |
parent | 85b05f67d96aa51b87efcb5794e59ea18ee9df79 (diff) |
base-files: remove trailing whitespaces from lib/functions.sh
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30775 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-x | package/base-files/files/lib/functions.sh | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index f6ec3d7be6..8c6cd07344 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -27,7 +27,7 @@ append() { local var="$1" local value="$2" local sep="${3:- }" - + eval "export ${NO_EXPORT:+-n} -- \"$var=\${$var:+\${$var}\${value:+\$sep}}\$value\"" } @@ -74,7 +74,7 @@ package() { config () { local cfgtype="$1" local name="$2" - + export ${NO_EXPORT:+-n} CONFIG_NUM_SECTIONS=$(($CONFIG_NUM_SECTIONS + 1)) name="${name:-cfg$CONFIG_NUM_SECTIONS}" append CONFIG_SECTIONS "$name" @@ -110,7 +110,7 @@ config_rename() { local NEW="$2" local oldvar local newvar - + [ -n "$OLD" -a -n "$NEW" ] || return for oldvar in `set | grep ^CONFIG_${OLD}_ | \ sed -e 's/\(.*\)=.*$/\1/'` ; do @@ -119,7 +119,7 @@ config_rename() { unset "$oldvar" done export ${NO_EXPORT:+-n} CONFIG_SECTIONS="$(echo " $CONFIG_SECTIONS " | sed -e "s, $OLD , $NEW ,")" - + [ "$CONFIG_SECTION" = "$OLD" ] && export ${NO_EXPORT:+-n} CONFIG_SECTION="$NEW" } @@ -135,8 +135,8 @@ config_clear() { export ${NO_EXPORT:+-n} CONFIG_SECTIONS="${SECTION:+$CONFIG_SECTIONS}" for oldvar in `set | grep ^CONFIG_${SECTION:+${SECTION}_} | \ - sed -e 's/\(.*\)=.*$/\1/'` ; do - unset $oldvar + sed -e 's/\(.*\)=.*$/\1/'` ; do + unset $oldvar done } @@ -178,7 +178,7 @@ config_foreach() { local type="$1" [ "$#" -ge 1 ] && shift local section cfgtype - + [ -z "$CONFIG_SECTIONS" ] && return 0 for section in ${CONFIG_SECTIONS}; do config_get cfgtype "$section" TYPE @@ -214,7 +214,7 @@ load_modules() { include() { local file - + for file in $(ls $1/*.sh 2>/dev/null); do . $file done @@ -223,7 +223,7 @@ include() { find_mtd_part() { local PART="$(grep "\"$1\"" /proc/mtd | awk -F: '{print $1}')" local PREFIX=/dev/mtdblock - + PART="${PART##mtd}" [ -d /dev/mtdblock ] && PREFIX=/dev/mtdblock/ echo "${PART:+$PREFIX$PART}" @@ -382,7 +382,7 @@ service_reload() { service_kill() { cat 1>&2 << __END_OF_WARNING__ # -# WARNING: the 'service_kill' function is now deprecated and might be +# WARNING: the 'service_kill' function is now deprecated and might be # removed soon. Consider using the other new service_* wrappers instead. # __END_OF_WARNING__ |