1 diff -urN openswan.old/programs/loggerfix openswan.dev/programs/loggerfix
2 --- openswan.old/programs/loggerfix 1970-01-01 01:00:00.000000000 +0100
3 +++ openswan.dev/programs/loggerfix 2006-10-08 20:41:08.000000000 +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 -urN openswan.old/programs/look/look.in openswan.dev/programs/look/look.in
11 --- openswan.old/programs/look/look.in 2006-10-08 20:43:21.000000000 +0200
12 +++ openswan.dev/programs/look/look.in 2006-10-08 20:41:08.000000000 +0200
15 pat="$pat|$defaultroutephys\$|$defaultroutevirt\$"
17 - for i in `echo "$IPSECinterfaces" | sed 's/=/ /'`
18 + for i in `echo "$IPSECinterfaces" | tr '=' ' '`
22 diff -urN openswan.old/programs/_plutorun/_plutorun.in openswan.dev/programs/_plutorun/_plutorun.in
23 --- openswan.old/programs/_plutorun/_plutorun.in 2006-10-08 20:43:21.000000000 +0200
24 +++ openswan.dev/programs/_plutorun/_plutorun.in 2006-10-08 20:41:08.000000000 +0200
29 - if test ! -w "`dirname $stderrlog`"
30 + if test ! -w "`echo $stderrlog | sed -r 's/(^.*\/)(.*$)/\1/'`"
32 echo Cannot write to directory to create \"$stderrlog\".
34 diff -urN openswan.old/programs/_realsetup/_realsetup.in openswan.dev/programs/_realsetup/_realsetup.in
35 --- openswan.old/programs/_realsetup/_realsetup.in 2006-10-08 20:43:21.000000000 +0200
36 +++ openswan.dev/programs/_realsetup/_realsetup.in 2006-10-08 20:41:08.000000000 +0200
39 # misc pre-Pluto setup
41 - perform test -d `dirname $subsyslock` "&&" touch $subsyslock
42 + perform test -d `echo $subsyslock | sed -r 's/(^.*\/)(.*$)/\1/'` "&&" touch $subsyslock "&&" rm -f $subsyslock
44 if test " $IPSECforwardcontrol" = " yes"
46 diff -urN openswan.old/programs/send-pr/send-pr.in openswan.dev/programs/send-pr/send-pr.in
47 --- openswan.old/programs/send-pr/send-pr.in 2006-10-08 20:43:21.000000000 +0200
48 +++ openswan.dev/programs/send-pr/send-pr.in 2006-10-08 20:41:08.000000000 +0200
51 if [ "$fieldname" != "Category" ]
53 - values=`${BINDIR}/query-pr --valid-values $fieldname | sed ':a;N;$!ba;s/\n/ /g' | sed 's/ *$//g;s/ / | /g;s/^/[ /;s/$/ ]/;'`
54 + values=`${BINDIR}/query-pr --valid-values $fieldname | tr '\n' ' ' | sed 's/ *$//g;s/ / | /g;s/^/[ /;s/$/ ]/;'`
55 valslen=`echo "$values" | wc -c`
57 values="choose from a category listed above"
60 desc="<${values} (one line)>";
62 - dpat=`echo "$desc" | sed 's/[][*+^$|\()&/]/./g'`
63 + dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'`
64 echo "/^>${fieldname}:/ s/${dpat}//" >> $FIXFIL
66 echo "${fmtname}${desc}" >> $file
70 desc=" <`${BINDIR}/query-pr --field-description $fieldname` (multiple lines)>";
71 - dpat=`echo "$desc" | sed 's/[][*+^$|\()&/]/./g'`
72 + dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'`
73 echo "s/^${dpat}//" >> $FIXFIL
75 echo "${fmtname}" >> $file;
79 desc="<`${BINDIR}/query-pr --field-description $fieldname` (one line)>"
80 - dpat=`echo "$desc" | sed 's/[][*+^$|\()&/]/./g'`
81 + dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'`
82 echo "/^>${fieldname}:/ s/${dpat}//" >> $FIXFIL
84 echo "${fmtname}${desc}" >> $file
85 diff -urN openswan.old/programs/setup/setup.in openswan.dev/programs/setup/setup.in
86 --- openswan.old/programs/setup/setup.in 2006-10-08 20:43:21.000000000 +0200
87 +++ openswan.dev/programs/setup/setup.in 2006-10-08 20:41:08.000000000 +0200
91 start|--start|stop|--stop|_autostop|_autostart)
92 - if test " `id -u`" != " 0"
93 + if [ "x${USER}" != "xroot" ]
95 echo "permission denied (must be superuser)" |
96 logger -s -p $IPSECsyslog -t ipsec_setup 2>&1
99 + # make sure all required directories exist
100 + if [ ! -d /var/run/pluto ]
102 + mkdir -p /var/run/pluto
104 + if [ ! -d /var/lock/subsys ]
106 + mkdir -p /var/lock/subsys
108 tmp=/var/run/pluto/ipsec_setup.st
109 outtmp=/var/run/pluto/ipsec_setup.out
111 diff -urN openswan.old/programs/showhostkey/showhostkey.in openswan.dev/programs/showhostkey/showhostkey.in
112 --- openswan.old/programs/showhostkey/showhostkey.in 2006-10-08 20:43:21.000000000 +0200
113 +++ openswan.dev/programs/showhostkey/showhostkey.in 2006-10-08 20:41:08.000000000 +0200
118 -host="`hostname --fqdn`"
119 +host="`cat /proc/sys/kernel/hostname`"
127 - suffix = ":" os "[rR][sS][aA]" os "{" os oc "$"
128 + suffix = ":" os "[rR][sS][aA]" os "\0173" os oc "$"
132 diff -urN openswan.old/programs/starter/klips.c openswan.dev/programs/starter/klips.c
133 --- openswan.old/programs/starter/klips.c 2006-10-08 20:43:21.000000000 +0200
134 +++ openswan.dev/programs/starter/klips.c 2006-10-08 20:41:08.000000000 +0200
136 if (stat(PROC_MODULES,&stb)==0) {
138 unsetenv("MODULECONF");
139 - system("depmod -a >/dev/null 2>&1 && modprobe ipsec");
140 + system("depmod -a >/dev/null 2>&1 && insmod ipsec");
142 if (stat(PROC_IPSECVERSION,&stb)==0) {
143 _klips_module_loaded = 1;
144 diff -urN openswan.old/programs/starter/netkey.c openswan.dev/programs/starter/netkey.c
145 --- openswan.old/programs/starter/netkey.c 2006-10-08 20:43:21.000000000 +0200
146 +++ openswan.dev/programs/starter/netkey.c 2006-10-08 20:41:08.000000000 +0200
148 if (stat(PROC_MODULES,&stb)==0) {
150 unsetenv("MODULECONF");
151 - system("depmod -a >/dev/null 2>&1 && modprobe xfrm4_tunnel esp4 ah4 af_key");
152 + system("depmod -a >/dev/null 2>&1 && insmod xfrm4_tunnel esp4 ah4 af_key");
154 if (stat(PROC_NETKEY,&stb)==0) {
155 _netkey_module_loaded = 1;
156 diff -urN openswan.old/programs/_startklips/_startklips.in openswan.dev/programs/_startklips/_startklips.in
157 --- openswan.old/programs/_startklips/_startklips.in 2006-10-08 20:43:21.000000000 +0200
158 +++ openswan.dev/programs/_startklips/_startklips.in 2006-10-08 20:41:46.000000000 +0200
161 if test -f $moduleinstplace/$wantgoo
163 - echo "modprobe failed, but found matching template module $wantgoo."
164 + echo "insmod failed, but found matching template module $wantgoo."
165 echo "Copying $moduleinstplace/$wantgoo to $module."
167 mkdir -p $moduleplace
168 @@ -262,15 +262,15 @@
169 echo "FATAL ERROR: Both KLIPS and NETKEY IPsec code is present in kernel"
172 -if test ! -f $ipsecversion && test ! -f $netkey && modprobe -qn ipsec
173 +if test ! -f $ipsecversion && test ! -f $netkey && insmod -q ipsec
175 # statically compiled KLIPS/NETKEY not found; try to load the module
180 if test ! -f $ipsecversion && test ! -f $netkey
187 @@ -278,25 +278,25 @@
193 - modprobe -qv ipcomp
197 # xfrm4_tunnel is needed by ipip and ipcomp
198 - modprobe -qv xfrm4_tunnel
199 + insmod -qv xfrm4_tunnel
200 # xfrm_user contains netlink support for IPsec
201 - modprobe -qv xfrm_user
202 + insmod -qv xfrm_user
203 if [ -n "`cat /proc/cpuinfo |grep Nehemiah`" ]
205 echo "VIA Nehemiah detected, probing for PadLock"
206 - modprobe -qv hw_random
207 + insmod -qv hw_random
208 # padlock must load before aes module
209 - modprobe -qv padlock
212 # load the most common ciphers/algo's
224 @@ -312,10 +312,16 @@
226 unset MODPATH MODULECONF # no user overrides!
227 depmod -a >/dev/null 2>&1
228 - modprobe -qv hw_random
229 + insmod -qv hw_random
230 # padlock must load before aes module
231 - modprobe -qv padlock
242 if test ! -f $ipsecversion