use regex for comparison

This commit is contained in:
Nikos Mavrogiannopoulos
2013-12-05 16:26:47 +01:00
committed by Nikos Mavrogiannopoulos
parent 4eebd6eaa7
commit 190e81707e

View File

@@ -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