From 87d52fc40d0fc2946a2d4e1bca7a6082ec3a0f81 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Gaul?= Date: Sat, 3 Jan 2015 15:24:46 +0100 Subject: [PATCH] [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. --- olsrd/files/olsrd.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/olsrd/files/olsrd.init b/olsrd/files/olsrd.init index 887a4a2..5bee27a 100644 --- a/olsrd/files/olsrd.init +++ b/olsrd/files/olsrd.init @@ -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 } -- 2.30.2