_updown script fix for ALT Linux, courtesy of Michael Shigorin
authorAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 29 May 2009 06:10:02 +0000 (08:10 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 29 May 2009 06:10:02 +0000 (08:10 +0200)
src/_updown/_updown.in
src/_updown_espmark/_updown_espmark

index 7cbfa51..838842d 100644 (file)
@@ -205,15 +205,12 @@ doroute() {
 
        if [ -z "$PLUTO_MY_SOURCEIP" ]
        then
 
        if [ -z "$PLUTO_MY_SOURCEIP" ]
        then
-           if [ -f /etc/sysconfig/defaultsource ]
-           then
-               . /etc/sysconfig/defaultsource
-           fi
-
-           if [ -f /etc/conf.d/defaultsource ]
-           then
-               . /etc/conf.d/defaultsource
-           fi
+           for dir in /etc/sysconfig /etc/conf.d; do
+               if [ -f "$dir/defaultsource" ]
+               then
+                   . "$dir/defaultsource"
+               fi
+           done
 
            if [ -n "$DEFAULTSOURCE" ]
            then
 
            if [ -n "$DEFAULTSOURCE" ]
            then
index b9ae6ed..74de072 100644 (file)
@@ -199,15 +199,12 @@ doroute() {
 
        if [ -z "$PLUTO_MY_SOURCEIP" ]
        then
 
        if [ -z "$PLUTO_MY_SOURCEIP" ]
        then
-           if [ -f /etc/sysconfig/defaultsource ]
-           then
-               . /etc/sysconfig/defaultsource
-           fi
-
-           if [ -f /etc/conf.d/defaultsource ]
-           then
-               . /etc/conf.d/defaultsource
-           fi
+            for dir in /etc/sysconfig /etc/conf.d; do
+                if [ -f "$dir/defaultsource" ]
+                then
+                    . "$dir/defaultsource"
+                fi
+            done
 
            if [ -n "$DEFAULTSOURCE" ]
            then
 
            if [ -n "$DEFAULTSOURCE" ]
            then