From a6521f5755d80ca09be88ca2f719fab526a88b43 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 9 Sep 2011 16:14:15 +0200 Subject: //retiolum/scripts/tinc_setup/tinc-up: use BRE @sed --- retiolum/scripts/tinc_setup/tinc-up | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'retiolum') diff --git a/retiolum/scripts/tinc_setup/tinc-up b/retiolum/scripts/tinc_setup/tinc-up index ae7c68e6..9a557787 100755 --- a/retiolum/scripts/tinc_setup/tinc-up +++ b/retiolum/scripts/tinc_setup/tinc-up @@ -4,15 +4,15 @@ dirname="`dirname "$0"`" conf=$dirname/tinc.conf -name=`sed -rn 's|^ *Name *= *([^ ]*) *$|\1|p' $conf` +name=`sed -n 's|^ *Name *= *\([^ ]*\) *$|\1|p' $conf` host=$dirname/hosts/$name route4=10.7.7.0/24 -addr4=`sed -rn 's|^ *Subnet *= *(10\.[^ ]*) *$|\1|p' $host` +addr4=`sed -n 's|^ *Subnet *= *\(10\.[^ ]*\) *$|\1|p' $host` route6=42::/16 -addr6=`sed -rn 's|^ *Subnet *= *(42:[^ ]*) *$|\1|p' $host` +addr6=`sed -n 's|^ *Subnet *= *\(42:[^ ]*\) *$|\1|p' $host` ifconfig $INTERFACE up $addr4 route add -net $route4 dev $INTERFACE -- cgit v1.2.3