]> www.infradead.org Git - users/dwmw2/vpnc-scripts.git/commitdiff
No need to add a separate sed invocation for `$NETMASKLEN` fixing
authorDaniel Lenski <dlenski@gmail.com>
Fri, 21 Feb 2020 17:49:45 +0000 (17:49 +0000)
committerDaniel Lenski <dlenski@gmail.com>
Fri, 21 Feb 2020 17:49:45 +0000 (17:49 +0000)
vpnc-script

index 0133eb74c0769a8a4440340120f712629f18933e..c21f47978af53ac996d182bf9dd08a9d2096a306 100755 (executable)
@@ -226,8 +226,7 @@ destroy_tun_device() {
 if [ -n "$IPROUTE" ]; then
        fix_ip_get_output () {
                sed -e 's/ /\n/g' | \
-                   sed -ne '1p;/via/{N;p};/dev/{N;p};/src/{N;p};/mtu/{N;p}' | \
-                   sed -e "1 s|$|${1}|"
+                   sed -ne "1 s|\$|${1}|p;/via/{N;p};/dev/{N;p};/src/{N;p};/mtu/{N;p}"
        }
 
        set_vpngateway_route() {