don't build stripped executable, let sstrip do its job
[openwrt.git] / package / openswan / patches / scripts.patch
1 diff -uNr openswan-2.3.0.orig/programs/loggerfix openswan-2.3.0/programs/loggerfix
2 --- openswan-2.3.0.orig/programs/loggerfix 1970-01-01 00:00:00.000000000 +0000
3 +++ openswan-2.3.0/programs/loggerfix 2005-02-02 20:34:54.000000000 +0000
4 @@ -0,0 +1,5 @@
5 +#!/bin/sh
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
9 +exit 0
10 diff -uNr openswan-2.3.0.orig/programs/look/look.in openswan-2.3.0/programs/look/look.in
11 --- openswan-2.3.0.orig/programs/look/look.in 2003-10-31 02:32:42.000000000 +0000
12 +++ openswan-2.3.0/programs/look/look.in 2005-02-02 20:34:54.000000000 +0000
13 @@ -79,7 +79,7 @@
14 then
15 pat="$pat|$defaultroutephys\$|$defaultroutevirt\$"
16 else
17 - for i in `echo "$IPSECinterfaces" | tr '=' ' '`
18 + for i in `echo "$IPSECinterfaces" | sed 's/=/ /'`
19 do
20 pat="$pat|$i\$"
21 done
22 diff -uNr openswan-2.3.0.orig/programs/manual/manual.in openswan-2.3.0/programs/manual/manual.in
23 --- openswan-2.3.0.orig/programs/manual/manual.in 2004-11-01 22:49:01.000000000 +0000
24 +++ openswan-2.3.0/programs/manual/manual.in 2005-02-02 20:34:54.000000000 +0000
25 @@ -104,7 +104,7 @@
26 sub(/:/, " ", $0)
27 if (interf != "")
28 print $3 "@" interf
29 - }' | tr '\n' ' '`"
30 + }' | sed ':a;N;$!ba;s/\n/ /g'`"
31 ;;
32 esac
33 diff -uNr openswan-2.3.0.orig/programs/_startklips/_startklips.in openswan-2.3.0/programs/_startklips/_startklips.in
34 --- openswan-2.3.0.orig/programs/_startklips/_startklips.in 2004-12-10 12:38:28.000000000 +0000
35 +++ openswan-2.3.0/programs/_startklips/_startklips.in 2005-02-02 20:34:54.000000000 +0000
36 @@ -292,7 +292,12 @@
37 fi
38 unset MODPATH MODULECONF # no user overrides!
39 depmod -a >/dev/null 2>&1
40 - modprobe -v ipsec
41 + if [ -f modprobe ]
42 + then modprobe -v ipsec
43 + elif [ -f insmod ]
44 + then insmod ipsec
45 + fi
46 +
47 fi
48 if test ! -f $ipsecversion
49 then
50 diff -uNr openswan-2.3.0.orig/programs/setup/setup.in openswan-2.3.0/programs/setup/setup.in
51 --- openswan-2.3.0.orig/programs/setup/setup.in 2004-03-22 00:24:06.000000000 +0000
52 +++ openswan-2.3.0/programs/setup/setup.in 2005-02-02 20:34:54.000000000 +0000
53 @@ -110,12 +110,22 @@
54 # do it
55 case "$1" in
56 start|--start|stop|--stop|_autostop|_autostart)
57 - if test " `id -u`" != " 0"
58 + if [ "x${USER}" != "xroot" ]
59 then
60 echo "permission denied (must be superuser)" |
61 logger -s -p $IPSECsyslog -t ipsec_setup 2>&1
62 exit 1
63 fi
64 +
65 + # make sure all required directories exist
66 + if [ ! -d /var/run/pluto ]
67 + then
68 + mkdir -p /var/run/pluto
69 + fi
70 + if [ ! -d /var/lock/subsys ]
71 + then
72 + mkdir -p /var/lock/subsys
73 + fi
74 tmp=/var/run/pluto/ipsec_setup.st
75 outtmp=/var/run/pluto/ipsec_setup.out
76 (
77 diff -uNr openswan-2.3.0.orig/programs/showhostkey/showhostkey.in openswan-2.3.0/programs/showhostkey/showhostkey.in
78 --- openswan-2.3.0.orig/programs/showhostkey/showhostkey.in 2004-11-14 13:40:41.000000000 +0000
79 +++ openswan-2.3.0/programs/showhostkey/showhostkey.in 2005-02-02 20:34:54.000000000 +0000
80 @@ -63,7 +63,7 @@
81 exit 1
82 fi
83
84 -host="`hostname --fqdn`"
85 +host="`cat /proc/sys/kernel/hostname`"
86
87 awk ' BEGIN {
88
89 diff -uNr openswan-2.3.0.orig/programs/send-pr/send-pr.in openswan-2.3.0/programs/send-pr/send-pr.in
90 --- openswan-2.3.0.orig/programs/send-pr/send-pr.in 2003-07-14 12:26:17.000000000 +0000
91 +++ openswan-2.3.0/programs/send-pr/send-pr.in 2005-02-02 20:34:54.000000000 +0000
92 @@ -402,7 +402,7 @@
93 else
94 if [ "$fieldname" != "Category" ]
95 then
96 - values=`${BINDIR}/query-pr --valid-values $fieldname | tr '\n' ' ' | sed 's/ *$//g;s/ / | /g;s/^/[ /;s/$/ ]/;'`
97 + values=`${BINDIR}/query-pr --valid-values $fieldname | sed ':a;N;$!ba;s/\n/ /g' | sed 's/ *$//g;s/ / | /g;s/^/[ /;s/$/ ]/;'`
98 valslen=`echo "$values" | wc -c`
99 else
100 values="choose from a category listed above"
101 @@ -414,7 +414,7 @@
102 else
103 desc="<${values} (one line)>";
104 fi
105 - dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'`
106 + dpat=`echo "$desc" | sed 's/[][*+^$|\()&/]/./g'`
107 echo "/^>${fieldname}:/ s/${dpat}//" >> $FIXFIL
108 fi
109 echo "${fmtname}${desc}" >> $file
110 @@ -425,7 +425,7 @@
111 desc=" $default_val";
112 else
113 desc=" <`${BINDIR}/query-pr --field-description $fieldname` (multiple lines)>";
114 - dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'`
115 + dpat=`echo "$desc" | sed 's/[][*+^$|\()&/]/./g'`
116 echo "s/^${dpat}//" >> $FIXFIL
117 fi
118 echo "${fmtname}" >> $file;
119 @@ -437,7 +437,7 @@
120 desc="${default_val}"
121 else
122 desc="<`${BINDIR}/query-pr --field-description $fieldname` (one line)>"
123 - dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'`
124 + dpat=`echo "$desc" | sed 's/[][*+^$|\()&/]/./g'`
125 echo "/^>${fieldname}:/ s/${dpat}//" >> $FIXFIL
126 fi
127 echo "${fmtname}${desc}" >> $file
128 diff -uNr openswan-2.3.0.orig/programs/_realsetup/_realsetup.in openswan-2.3.0/programs/_realsetup/_realsetup.in
129 --- openswan-2.3.0.orig/programs/_realsetup/_realsetup.in 2004-12-10 13:10:04.000000000 +0000
130 +++ openswan-2.3.0/programs/_realsetup/_realsetup.in 2005-02-02 20:34:54.000000000 +0000
131 @@ -209,7 +209,7 @@
132
133 # misc pre-Pluto setup
134
135 - perform test -d `dirname $subsyslock` "&&" touch $subsyslock
136 + perform test -d `echo $subsyslock | sed -r 's/(^.*\/)(.*$)/\1/'` "&&" touch $subsyslock
137
138 if test " $IPSECforwardcontrol" = " yes"
139 then
140 @@ -313,7 +313,7 @@
141 lsmod 2>&1 | grep "^xfrm_user" > /dev/null && rmmod -s xfrm_user
142 fi
143
144 - perform test -d `dirname $subsyslock` "&&" rm -f $subsyslock
145 + perform test -d `echo $subsyslock | sed -r 's/(^.*\/)(.*$)/\1/'` "&&" touch $subsyslock "&&" rm -f $subsyslock
146
147 perform rm -f $info $lock $plutopid
148 perform echo "...Openswan IPsec stopped" "|" $LOGONLY
149 --- openswan-2.3.0.orig/programs/_plutorun/_plutorun.in 2004-11-03 20:21:08.000000000 +0000
150 +++ openswan-2.3.0/programs/_plutorun/_plutorun.in 2005-02-02 20:34:54.000000000 +0000
151 @@ -140,7 +140,7 @@
152 exit 1
153 fi
154 else
155 - if test ! -w "`dirname $stderrlog`"
156 + if test ! -w "`echo $stderrlog | sed -r 's/(^.*\/)(.*$)/\1/'`"
157 then
158 echo Cannot write to directory to create \"$stderrlog\".
159 exit 1
160 diff -urN openswan-2.3.1.old/programs/_startklips/_startklips.in openswan-2.3.1/programs/_startklips/_startklips.in
161 --- openswan-2.3.1.old/programs/_startklips/_startklips.in 2005-04-10 23:57:51.000000000 +0200
162 +++ openswan-2.3.1/programs/_startklips/_startklips.in 2005-04-11 00:00:36.000000000 +0200
163 @@ -262,15 +262,15 @@
164 echo "FATAL ERROR: Both KLIPS and NETKEY IPsec code is present in kernel"
165 exit
166 fi
167 -if test ! -f $ipsecversion && test ! -f $netkey && modprobe -qn ipsec
168 +if test ! -f $ipsecversion && test ! -f $netkey && insmod ipsec
169 then
170 # statically compiled KLIPS/NETKEY not found; try to load the module
171 - modprobe ipsec
172 + insmod ipsec
173 fi
174
175 if test ! -f $ipsecversion && test ! -f $netkey
176 then
177 - modprobe -v af_key
178 + insmod -v af_key
179 fi
180
181 if test -f $netkey
182 @@ -278,18 +278,18 @@
183 klips=false
184 if test -f $modules
185 then
186 - modprobe -qv ah4
187 - modprobe -qv esp4
188 - modprobe -qv ipcomp
189 + insmod -qv ah4
190 + insmod -qv esp4
191 + insmod -qv ipcomp
192 # xfrm4_tunnel is needed by ipip and ipcomp
193 - modprobe -qv xfrm4_tunnel
194 + insmod -qv xfrm4_tunnel
195 # xfrm_user contains netlink support for IPsec
196 - modprobe -qv xfrm_user
197 + insmod -qv xfrm_user
198 # load the most common ciphers/algo's
199 - modprobe -qv sha1
200 - modprobe -qv md5
201 - modprobe -qv des
202 - modprobe -qv aes
203 + insmod -qv sha1
204 + insmod -qv md5
205 + insmod -qv des
206 + insmod -qv aes
207 fi
208 fi
209
This page took 0.052549 seconds and 5 git commands to generate.