mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
use regex for comparison
This commit is contained in:
committed by
Nikos Mavrogiannopoulos
parent
4eebd6eaa7
commit
190e81707e
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2013 Nikos Mavrogiannopoulos
|
||||
#
|
||||
@@ -41,7 +41,7 @@ if [ ! -f test-iroute.tmp ];then
|
||||
fi
|
||||
|
||||
CONTENTS=`cat ./test-iroute.tmp`
|
||||
if [ "$CONTENTS" != "192.168.1.0/24 vpns0" -a "$CONTENTS" != "192.168.1.0/24 tun0" ];then
|
||||
if [[ "$CONTENTS" =~ "192.168.1.0/24 [vpns|tun]$" ]];then
|
||||
fail $PID "Temporary file contents are not correct"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user