Modify

Opened 10 years ago

Closed 10 years ago

#3054 closed defect (fixed)

Erroneous shell variable substitution in /etc/functions.sh

Reported by: argovela-at-yahoo-com Owned by: developers
Priority: normal Milestone: Kamikaze 7.09
Component: base system Version:
Keywords: function config shell ash Cc:

Description

In the /etc/functions.sh shell script library, the shell substitution "$SECTION" should have been specified, instead of "$OLD".

Note line #78 in the following code from
https://dev.openwrt.org/browser/trunk/package/base-files/files/etc/functions.sh?rev=9082

74 	config_clear() {
75 	        local SECTION="$1"
76 	        local oldvar
77 	       
78 	        export ${NO_EXPORT:+-n} CONFIG_SECTIONS="$(echo " $CONFIG_SECTIONS " | sed -e "s, $OLD , ,")"
79 	        export ${NO_EXPORT:+-n} CONFIG_SECTIONS="${SECTION:+$CONFIG_SECTIONS}"
80 	
81 	        for oldvar in `set | grep ^CONFIG_${SECTION:+${SECTION}_} | \
82 	                sed -e 's/\(.*\)=.*$/\1/'` ; do
83 	                unset $oldvar
84 	        done
85 	}

Attachments (0)

Change History (1)

comment:1 Changed 10 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

fixed in r12036

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.