[olsrd] adapt init script for 0.6.8 (PingCmd option)
olsrd 0.6.8 accepts a PingCmd parameter as of http://olsr.org/git/?p=olsrd.git;a=commitdiff;h=0a26c52af3941eb9060b193cae5552f8d13fd28e. The PingCmd is a string of the form "ping -c 1 -q %s" where %s is replaced with an IP. This commit allows for '%' characters in an olsrd option.
This commit is contained in:
parent
8c62839869
commit
fe84974abb
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ validate_varname() {
|
|||
|
||||
validate_olsrd_option() {
|
||||
local str="$1"
|
||||
[ -z "$str" -o "$str" != "${str%%[! 0-9A-Za-z./|:_-]*}" ] && return 1
|
||||
[ -z "$str" -o "$str" != "${str%%[! 0-9A-Za-z.%/|:_-]*}" ] && return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue