aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-ipsec
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2007-04-16 22:43:15 +0000
committerBill Nottingham <notting@redhat.com>2007-04-16 22:43:15 +0000
commit37211f2227672cd079548c3eacbebc238646f00f (patch)
tree82c9ea5300e0ce20a39a4c992a09695248bd214c /sysconfig/network-scripts/ifup-ipsec
parente59e4e0c6ddf57797aad47c696544ee6bbaef187 (diff)
downloadinitscripts-37211f2227672cd079548c3eacbebc238646f00f.tar
initscripts-37211f2227672cd079548c3eacbebc238646f00f.tar.gz
initscripts-37211f2227672cd079548c3eacbebc238646f00f.tar.bz2
initscripts-37211f2227672cd079548c3eacbebc238646f00f.tar.xz
initscripts-37211f2227672cd079548c3eacbebc238646f00f.zip
allow overriding of my_identifier (#229343, <cmadams@hiwaay.net>)
Diffstat (limited to 'sysconfig/network-scripts/ifup-ipsec')
-rwxr-xr-xsysconfig/network-scripts/ifup-ipsec12
1 files changed, 10 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifup-ipsec b/sysconfig/network-scripts/ifup-ipsec
index 882722fd..fc650daf 100755
--- a/sysconfig/network-scripts/ifup-ipsec
+++ b/sysconfig/network-scripts/ifup-ipsec
@@ -160,8 +160,16 @@ EOF
if [ "$KEYING" = "automatic" -a -n "$IKE_METHOD" ]; then
if [ "$IKE_METHOD" = "PSK" ]; then
+ MYID=address
+ if [ -n "$MYID_TYPE" ]; then
+ case "$MYID_TYPE" in
+ *fqdn*)
+ MYID="$MYID_TYPE \"$MYID_VALUE\""
+ ;;
+ esac
+ fi
tmpfile=`mktemp /etc/racoon/psk.XXXXXX`
- grep -v "^$DST" /etc/racoon/psk.txt > $tmpfile
+ grep -v "^$DST " /etc/racoon/psk.txt > $tmpfile
echo "$DST $IKE_PSK" >> $tmpfile
mv -f $tmpfile /etc/racoon/psk.txt
fi
@@ -174,7 +182,7 @@ EOF
case "$IKE_METHOD" in
PSK)
cat >> /etc/racoon/$DST.conf << EOF
- my_identifier address;
+ my_identifier $MYID;
proposal {
encryption_algorithm $ESP_PROTO;
hash_algorithm $AH_PROTO;