diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2009-05-29 08:10:02 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2009-05-29 08:10:02 +0200 |
commit | 14c408ee4a36b4e0f9a2238087793058f073d6bd (patch) | |
tree | 3b821f6d1d72ad095b6de4bad7187046a831d813 /src | |
parent | 5c1e8ca7ae622131f812e14b2a04973a2639069f (diff) | |
download | strongswan-14c408ee4a36b4e0f9a2238087793058f073d6bd.tar.bz2 strongswan-14c408ee4a36b4e0f9a2238087793058f073d6bd.tar.xz |
_updown script fix for ALT Linux, courtesy of Michael Shigorin
Diffstat (limited to 'src')
-rw-r--r-- | src/_updown/_updown.in | 15 | ||||
-rw-r--r-- | src/_updown_espmark/_updown_espmark | 15 |
2 files changed, 12 insertions, 18 deletions
diff --git a/src/_updown/_updown.in b/src/_updown/_updown.in index 7cbfa5111..838842d06 100644 --- a/src/_updown/_updown.in +++ b/src/_updown/_updown.in @@ -205,15 +205,12 @@ doroute() { 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 diff --git a/src/_updown_espmark/_updown_espmark b/src/_updown_espmark/_updown_espmark index b9ae6ed25..74de0722d 100644 --- a/src/_updown_espmark/_updown_espmark +++ b/src/_updown_espmark/_updown_espmark @@ -199,15 +199,12 @@ doroute() { 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 |