1 diff -Nur openswan-2.4.0.orig/programs/loggerfix openswan-2.4.0/programs/loggerfix
2 --- openswan-2.4.0.orig/programs/loggerfix 1970-01-01 01:00:00.000000000 +0100
3 +++ openswan-2.4.0/programs/loggerfix 2005-09-29 13:44:43.325458750 +0200
6 +# use filename instead of /dev/null to log, but dont log to flash or ram
7 +# pref. log to nfs mount
8 +echo "$*" >> /dev/null
10 diff -Nur openswan-2.4.0.orig/programs/look/look.in openswan-2.4.0/programs/look/look.in
11 --- openswan-2.4.0.orig/programs/look/look.in 2005-08-18 16:10:09.000000000 +0200
12 +++ openswan-2.4.0/programs/look/look.in 2005-09-29 13:44:49.537847000 +0200
15 pat="$pat|$defaultroutephys\$|$defaultroutevirt\$"
17 - for i in `echo "$IPSECinterfaces" | sed 's/=/ /'`
18 + for i in `echo "$IPSECinterfaces" | tr '=' ' '`
22 diff -Nur openswan-2.4.0.orig/programs/manual/manual.in openswan-2.4.0/programs/manual/manual.in
23 --- openswan-2.4.0.orig/programs/manual/manual.in 2005-04-18 00:57:12.000000000 +0200
24 +++ openswan-2.4.0/programs/manual/manual.in 2005-09-29 13:44:52.446028750 +0200
29 - }' | sed ':a;N;$!ba;s/\n/ /g'`"
34 diff -Nur openswan-2.4.0.orig/programs/_plutorun/_plutorun.in openswan-2.4.0/programs/_plutorun/_plutorun.in
35 --- openswan-2.4.0.orig/programs/_plutorun/_plutorun.in 2005-04-21 23:57:16.000000000 +0200
36 +++ openswan-2.4.0/programs/_plutorun/_plutorun.in 2005-09-29 13:44:53.442091000 +0200
41 - if test ! -w "`dirname $stderrlog`"
42 + if test ! -w "`echo $stderrlog | sed -r 's/(^.*\/)(.*$)/\1/'`"
44 echo Cannot write to directory to create \"$stderrlog\".
46 diff -Nur openswan-2.4.0.orig/programs/_realsetup/_realsetup.in openswan-2.4.0/programs/_realsetup/_realsetup.in
47 --- openswan-2.4.0.orig/programs/_realsetup/_realsetup.in 2005-07-28 02:23:48.000000000 +0200
48 +++ openswan-2.4.0/programs/_realsetup/_realsetup.in 2005-09-29 13:44:53.442091000 +0200
51 # misc pre-Pluto setup
53 - perform test -d `dirname $subsyslock` "&&" touch $subsyslock
54 + perform test -d `echo $subsyslock | sed -r 's/(^.*\/)(.*$)/\1/'` "&&" touch $subsyslock
56 if test " $IPSECforwardcontrol" = " yes"
59 lsmod 2>&1 | grep "^xfrm_user" > /dev/null && rmmod -s xfrm_user
62 - perform test -d `dirname $subsyslock` "&&" rm -f $subsyslock
63 + perform test -d `echo $subsyslock | sed -r 's/(^.*\/)(.*$)/\1/'` "&&" touch $subsyslock "&&" rm -f $subsyslock
65 perform rm -f $info $lock $plutopid
66 perform echo "...Openswan IPsec stopped" "|" $LOGONLY
67 diff -Nur openswan-2.4.0.orig/programs/send-pr/send-pr.in openswan-2.4.0/programs/send-pr/send-pr.in
68 --- openswan-2.4.0.orig/programs/send-pr/send-pr.in 2005-04-18 01:04:46.000000000 +0200
69 +++ openswan-2.4.0/programs/send-pr/send-pr.in 2005-09-29 13:44:53.442091000 +0200
72 if [ "$fieldname" != "Category" ]
74 - values=`${BINDIR}/query-pr --valid-values $fieldname | sed ':a;N;$!ba;s/\n/ /g' | sed 's/ *$//g;s/ / | /g;s/^/[ /;s/$/ ]/;'`
75 + values=`${BINDIR}/query-pr --valid-values $fieldname | tr '\n' ' ' | sed 's/ *$//g;s/ / | /g;s/^/[ /;s/$/ ]/;'`
76 valslen=`echo "$values" | wc -c`
78 values="choose from a category listed above"
81 desc="<${values} (one line)>";
83 - dpat=`echo "$desc" | sed 's/[][*+^$|\()&/]/./g'`
84 + dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'`
85 echo "/^>${fieldname}:/ s/${dpat}//" >> $FIXFIL
87 echo "${fmtname}${desc}" >> $file
91 desc=" <`${BINDIR}/query-pr --field-description $fieldname` (multiple lines)>";
92 - dpat=`echo "$desc" | sed 's/[][*+^$|\()&/]/./g'`
93 + dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'`
94 echo "s/^${dpat}//" >> $FIXFIL
96 echo "${fmtname}" >> $file;
100 desc="<`${BINDIR}/query-pr --field-description $fieldname` (one line)>"
101 - dpat=`echo "$desc" | sed 's/[][*+^$|\()&/]/./g'`
102 + dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'`
103 echo "/^>${fieldname}:/ s/${dpat}//" >> $FIXFIL
105 echo "${fmtname}${desc}" >> $file
106 diff -Nur openswan-2.4.0.orig/programs/setup/setup.in openswan-2.4.0/programs/setup/setup.in
107 --- openswan-2.4.0.orig/programs/setup/setup.in 2005-07-25 21:17:03.000000000 +0200
108 +++ openswan-2.4.0/programs/setup/setup.in 2005-09-29 13:44:52.446028750 +0200
109 @@ -117,12 +117,22 @@
112 start|--start|stop|--stop|_autostop|_autostart)
113 - if test " `id -u`" != " 0"
114 + if [ "x${USER}" != "xroot" ]
116 echo "permission denied (must be superuser)" |
117 logger -s -p $IPSECsyslog -t ipsec_setup 2>&1
121 + # make sure all required directories exist
122 + if [ ! -d /var/run/pluto ]
124 + mkdir -p /var/run/pluto
126 + if [ ! -d /var/lock/subsys ]
128 + mkdir -p /var/lock/subsys
130 tmp=/var/run/pluto/ipsec_setup.st
131 outtmp=/var/run/pluto/ipsec_setup.out
133 diff -Nur openswan-2.4.0.orig/programs/showhostkey/showhostkey.in openswan-2.4.0/programs/showhostkey/showhostkey.in
134 --- openswan-2.4.0.orig/programs/showhostkey/showhostkey.in 2004-11-14 14:40:41.000000000 +0100
135 +++ openswan-2.4.0/programs/showhostkey/showhostkey.in 2005-09-29 13:44:52.446028750 +0200
140 -host="`hostname --fqdn`"
141 +host="`cat /proc/sys/kernel/hostname`"
145 diff -Nur openswan-2.4.0.orig/programs/_startklips/_startklips.in openswan-2.4.0/programs/_startklips/_startklips.in
146 --- openswan-2.4.0.orig/programs/_startklips/_startklips.in 2005-03-31 23:07:27.000000000 +0200
147 +++ openswan-2.4.0/programs/_startklips/_startklips.in 2005-09-29 13:44:53.442091000 +0200
148 @@ -262,15 +262,15 @@
149 echo "FATAL ERROR: Both KLIPS and NETKEY IPsec code is present in kernel"
152 -if test ! -f $ipsecversion && test ! -f $netkey && modprobe -qn ipsec
153 +if test ! -f $ipsecversion && test ! -f $netkey && insmod ipsec
155 # statically compiled KLIPS/NETKEY not found; try to load the module
160 if test ! -f $ipsecversion && test ! -f $netkey
167 @@ -278,18 +278,18 @@
173 - modprobe -qv ipcomp
177 # xfrm4_tunnel is needed by ipip and ipcomp
178 - modprobe -qv xfrm4_tunnel
179 + insmod -qv xfrm4_tunnel
180 # xfrm_user contains netlink support for IPsec
181 - modprobe -qv xfrm_user
182 + insmod -qv xfrm_user
183 # load the most common ciphers/algo's
197 unset MODPATH MODULECONF # no user overrides!
198 depmod -a >/dev/null 2>&1
201 + then modprobe -v ipsec
207 if test ! -f $ipsecversion