source: projects/specs/trunk/w/webmin/webmin-vl.spec @ 4678

Revision 4678, 45.8 KB checked in by inagaki, 13 years ago (diff)

update: webmin

Line 
1%define __spec_install_post %{nil}
2
3# Provide perl-specific find-{provides,requires}.
4#%define __find_provides %{_libdir}/rpm/find-provides.perl
5#%define __find_requires %{_libdir}/rpm/find-requires.perl
6
7Name: webmin
8Summary: A web-based administration interface for Unix systems.
9Summary(ja): Web ベースのシステム管理ツール
10Version: 1.560
11Release: 1%{?_dist_release}
12
13License: Freeware
14Group: Applications/Administration
15URL: http://www.webmin.com/
16
17Source0: http://www.webmin.com/download/%{name}-%{version}.tar.gz
18# additional modules
19#Source10: http://www.niemueller.de/webmin/modules/ipchains/ipchains-0.83.1.wbm.gz
20Source11: http://www.niemueller.de/webmin/modules/iptables/iptables-0.91.1.wbm.gz
21Source12: http://prdownloads.sourceforge.net/netatalk/netatalk-wbm-0.9.1.tgz
22
23Patch0: webmin-1.560-vine.patch
24
25#Patch7: netatalk-vine.diff
26#Patch10: ipchains-Japanese.patch.bz2
27
28AutoReq: false
29BuildRoot: %{_tmppath}/%{name}-%{version}-root
30BuildArch: noarch
31BuildRequires: perl
32
33Requires: perl
34Requires(pre): coreutils grep
35Requires(post): chkconfig initscripts perl-Net_SSLeay sed
36Requires(preun): chkconfig initscripts
37Requires(postun): coreutils grep
38
39Provides: %{name}-%{version}
40
41Vendor: Project Vine
42Distribution: Vine Linux
43
44%description
45A web-based administration interface for Unix systems. Using Webmin you can
46configure DNS, Samba, NFS, local/remote filesystems and more using your
47web browser.
48
49After installation, enter the URL https://localhost:10000/ into your
50browser and login as root with your root password.
51
52NOTE THAT THIS VERSION NOW USES SECURE WEB TRANSACTIONS: YOU HAVE TO
53LOGIN TO "https://localhost:10000/" AND NOT "http://localhost:10000/".
54
55%description -l ja
56Web ベースのシステム管理ツール。Webmin を用いると、DNS, Samba, NFS,
57ローカルまたはリモートのファイルシステム, Apache, Postfix などの設
58定を Web ブラウザにて行うことができます。
59
60インストール後、ブラウザから https://localhost:10000/ にアクセスし、
61root のパスワードを入力して root として入ってください。安全のため、
62パスワードは定期的に変更するようにしましょう。
63
64この rpm パッケージの場合、セキュリティ強化の為に、デフォルトでは
65127.0.0.1 (localhost) からのみ接続できるように制限してあります。
66また、perl-Net_SSLeay パッケージを用いて、デフォルトで SSL による
67暗号化を行うように設定しています。
68
69%prep
70%setup -q -a 11 -a 12
71%patch0 -p1 -b .vine
72#patch7 -p1
73#cd ipchains
74#patch10 -p1
75
76%build
77(find . -name '*.cgi' ; find . -name '*.pl') | perl perlpath.pl /usr/bin/perl -
78rm -f mount/freebsd-mounts*
79rm -f mount/openbsd-mounts*
80rm -f mount/macos-mounts*
81rm -f webmin-gentoo-init
82rm -rf acl/Authen-SolarisRBAC-0.1
83chmod -R og-w .
84
85%install
86[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
87
88mkdir -p $RPM_BUILD_ROOT/usr/libexec/webmin
89mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/daemons
90mkdir -p $RPM_BUILD_ROOT/etc/rc.d/{init.d,rc0.d,rc1.d,rc2.d,rc3.d,rc5.d,rc6.d}
91mkdir -p $RPM_BUILD_ROOT/etc/pam.d
92cp -rp * $RPM_BUILD_ROOT/usr/libexec/webmin
93cp webmin-daemon $RPM_BUILD_ROOT/etc/sysconfig/daemons/webmin
94cp webmin-init $RPM_BUILD_ROOT/etc/rc.d/init.d/webmin
95cp webmin-pam $RPM_BUILD_ROOT/etc/pam.d/webmin
96echo rpm > $RPM_BUILD_ROOT/usr/libexec/webmin/install-type
97
98%clean
99[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
100
101%files
102%defattr(-,root,root)
103/usr/libexec/webmin
104/etc/sysconfig/daemons/webmin
105/etc/rc.d/init.d/webmin
106%config /etc/pam.d/webmin
107
108%pre
109perl <<EOD;
110# maketemp.pl
111# Create the /tmp/.webmin directory if needed
112
113\$tmp_dir = \$ENV{'tempdir'} || "/tmp/.webmin";
114
115while(\$tries++ < 10) {
116        local @st = lstat(\$tmp_dir);
117        exit(0) if (\$st[4] == \$< && (-d _) && (\$st[2] & 0777) == 0755);
118        if (@st) {
119                unlink(\$tmp_dir) || rmdir(\$tmp_dir) ||
120                        system("/bin/rm -rf ".quotemeta(\$tmp_dir));
121                }
122        mkdir(\$tmp_dir, 0755) || next;
123        chown(\$<, \$(, \$tmp_dir);
124        chmod(0755, \$tmp_dir);
125        }
126exit(1);
127
128EOD
129if [ "$?" != "0" ]; then
130        echo "Failed to create or check temp files directory /tmp/.webmin"
131        exit 1
132fi
133if [ "$tempdir" = "" ]; then
134        tempdir=/tmp/.webmin
135fi
136perl >/$$.check <<EOD;
137if (-r "/etc/.issue") {
138        \$etc_issue = \`cat /etc/.issue\`;
139        }
140elsif (-r "/etc/issue") {
141        \$etc_issue = \`cat /etc/issue\`;
142        }
143\$uname = \`uname -a\`;
144if (\$etc_issue =~ /Vine\\sLinux\\s2\\.1/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+2\\.1/i) {
145        print "oscheck='Vine Linux'\\n";
146        }
147elsif (\$etc_issue =~ /Vine\\sLinux\\s2\\.1\\.5/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+2\\.1\\.5/i) {
148        print "oscheck='Vine Linux'\\n";
149        }
150elsif (\$etc_issue =~ /Vine\\sLinux\\s2\\.5/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+2\\.5\\s+/i) {
151        print "oscheck='Vine Linux'\\n";
152        }
153elsif (\$etc_issue =~ /Vine\\sLinux\\s2\\.6/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+2\\.6\\s+/i) {
154        print "oscheck='Vine Linux'\\n";
155        }
156elsif (\$etc_issue =~ /Vine\\sLinux\\s3\\.0/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+3\\.0\\s+/i) {
157        print "oscheck='Vine Linux'\\n";
158        }
159elsif (\$etc_issue =~ /Vine\\sLinux\\s3\\.1/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+3\\.1\\s+/i) {
160        print "oscheck='Vine Linux'\\n";
161        }
162elsif (\$etc_issue =~ /Vine\\sLinux\\s3\\.2/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+3\\.2\\s+/i) {
163        print "oscheck='Vine Linux'\\n";
164        }
165elsif (\$etc_issue =~ /Vine\\sLinux\\s4\\.0/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+4\\.0\\s+/i) {
166        print "oscheck='Vine Linux'\\n";
167        }
168elsif (\$etc_issue =~ /Vine\\sLinux\\s4\\.1/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+4\\.1\\s+/i) {
169        print "oscheck='Vine Linux'\\n";
170        }
171elsif (\$etc_issue =~ /Vine\\sLinux\\s4\\.2/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+4\\.2\\s+/i) {
172        print "oscheck='Vine Linux'\\n";
173        }
174elsif (\$etc_issue =~ /Vine\\sLinux\\s5\\.0/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+5\\.0\\s+/i) {
175        print "oscheck='Vine Linux'\\n";
176        }
177elsif (\$etc_issue =~ /Vine\\sLinux\\s5\\.1/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+5\\.1\\s+/i) {
178        print "oscheck='Vine Linux'\\n";
179        }
180elsif (\$etc_issue =~ /Vine\\sLinux\\s5\\.2/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+5\\.2\\s+/i) {
181        print "oscheck='Vine Linux'\\n";
182        }
183elsif (\$etc_issue =~ /Vine\\sLinux\\s6\\.0/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+6\\.0\\s+/i) {
184        print "oscheck='Vine Linux'\\n";
185        }
186elsif (\$etc_issue =~ /Vine\\sLinux\\s6\\.1/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+6\\.1\\s+/i) {
187        print "oscheck='Vine Linux'\\n";
188        }
189elsif (\$etc_issue =~ /Vine\\sLinux\\s6\\.2/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+6\\.2\\s+/i) {
190        print "oscheck='Vine Linux'\\n";
191        }
192elsif (\$etc_issue =~ /Vine\\sLinux\\s7\\.0/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+7\\.0\\s+/i) {
193        print "oscheck='Vine Linux'\\n";
194        }
195elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+1.0\\s+/i) {
196        print "oscheck='Pardus Linux'\\n";
197        }
198elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2007\\s+/i) {
199        print "oscheck='Pardus Linux'\\n";
200        }
201elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2007.1\\s+/i) {
202        print "oscheck='Pardus Linux'\\n";
203        }
204elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2007.2\\s+/i) {
205        print "oscheck='Pardus Linux'\\n";
206        }
207elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2007.3\\s+/i) {
208        print "oscheck='Pardus Linux'\\n";
209        }
210elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2008\\s+/i) {
211        print "oscheck='Pardus Linux'\\n";
212        }
213elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2008.1\\s+/i) {
214        print "oscheck='Pardus Linux'\\n";
215        }
216elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2008.2\\s+/i) {
217        print "oscheck='Pardus Linux'\\n";
218        }
219elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2009\\s+/i) {
220        print "oscheck='Pardus Linux'\\n";
221        }
222elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2009.1\\s+/i) {
223        print "oscheck='Pardus Linux'\\n";
224        }
225elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2009.2\\s+/i) {
226        print "oscheck='Pardus Linux'\\n";
227        }
228elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2011\\s+/i) {
229        print "oscheck='Pardus Linux'\\n";
230        }
231elsif (\$uname =~ /SunOS.*\\s5\\.5\\.1\\s/i) {
232        print "oscheck='Sun Solaris'\\n";
233        }
234elsif (\$uname =~ /SunOS.*\\s5\\.6\\s/i) {
235        print "oscheck='Sun Solaris'\\n";
236        }
237elsif (\$uname =~ /SunOS.*\\s5\\.(\\S+)\\s/i) {
238        print "oscheck='Sun Solaris'\\n";
239        }
240elsif (\$etc_issue =~ /Lycoris Desktop/i) {
241        print "oscheck='Lycoris Desktop/LX'\\n";
242        }
243elsif (\$etc_issue =~ /OpenLinux.*eServer.*\\n.*\\s2\\.3\\s/i) {
244        print "oscheck='Caldera OpenLinux eServer'\\n";
245        }
246elsif (\$etc_issue =~ /OpenLinux.*\\n.*\\s2\\.3\\s/i) {
247        print "oscheck='Caldera OpenLinux'\\n";
248        }
249elsif (\$etc_issue =~ /OpenLinux.*\\n.*\\s2\\.4\\s/i) {
250        print "oscheck='Caldera OpenLinux'\\n";
251        }
252elsif (\$etc_issue =~ /OpenLinux.*\\n.*\\s2\\.5\\s/i || \$etc_issue =~ /Caldera.*2000/i) {
253        print "oscheck='Caldera OpenLinux'\\n";
254        }
255elsif (\$etc_issue =~ /OpenLinux.*3\\.1/i) {
256        print "oscheck='Caldera OpenLinux'\\n";
257        }
258elsif (\$etc_issue =~ /OpenLinux.*3\\.2/i) {
259        print "oscheck='Caldera OpenLinux'\\n";
260        }
261elsif (\`cat /etc/asianux-release 2>/dev/null\` =~ /Asianux\\s+Server\\s+(\\d+)/i) {
262        print "oscheck='Asianux Server'\\n";
263        }
264elsif (\`cat /etc/asianux-release 2>/dev/null\` =~ /Asianux\\s+release\\s+(\\d+\\.\\d+)/i) {
265        print "oscheck='Asianux'\\n";
266        }
267elsif (\`cat /etc/whitebox-release 2>/dev/null\` =~ /White\\s+Box\\s+Enterprise\\s+Linux\\s+release\\s+(\\S+)/i) {
268        print "oscheck='Whitebox Linux'\\n";
269        }
270elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /Tao\\s+Linux\\s+release\\s+(\\S+)/i) {
271        print "oscheck='Tao Linux'\\n";
272        }
273elsif (\`cat /etc/centos-release /etc/redhat-release 2>/dev/null\` =~ /CentOS\\s+release\\s+(\\S+)/i && \$1 < 4) {
274        print "oscheck='CentOS Linux'\\n";
275        }
276elsif (\`cat /etc/centos-release /etc/redhat-release 2>/dev/null\` =~ /CentOS\\s+(Linux\\s+)?release\\s+(\\S+)/i && \$2 >= 4) {
277        print "oscheck='CentOS Linux'\\n";
278        }
279elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /Scientific\\s+Linux.*\\s+release\\s+(\\S+)/i && \$1 < 4) {
280        print "oscheck='Scientific Linux'\\n";
281        }
282elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /Scientific\\s+Linux.*\\s+release\\s+(\\S+)/i && \$1 >= 4 && \$1 < 6) {
283        print "oscheck='Scientific Linux'\\n";
284        }
285elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /Scientific\\s+Linux.*\\s+release\\s+(\\S+)/i && \$1 >= 6) {
286        print "oscheck='Scientific Linux'\\n";
287        }
288elsif (\`cat /etc/redhtat-release 2>/dev/null\` =~ /Gralinux\\s+(ES|AS|WS)\\s+release\\s+(\\d+)/i) {
289        print "oscheck='Gralinux'\\n";
290        }
291elsif (\`cat /etc/neoshine-release 2>/dev/null\` =~ /NeoShine\\s+Linux.*release\\s+(\\d+)/i) {
292        print "oscheck='NeoShine Linux'\\n";
293        }
294elsif (\`cat /etc/endian-release 2>/dev/null\` =~ /release\\s+(\\S+)/) {
295        print "oscheck='Endian Firewall Linux'\\n";
296        }
297elsif (\`cat /etc/enterprise-release 2>/dev/null\` =~ /Enterprise.*Linux\\s+Enterprise\\s+Linux\\s+Server\\s+release\\s+(\\d+)/i) {
298        print "oscheck='Oracle Enterprise Linux'\\n";
299        }
300elsif (\`cat /etc/ovs-release 2>/dev/null\` =~ /Oracle.*VM\\s+server\\s+release\\s+(\\d+)/i) {
301        print "oscheck='Oracle VM'\\n";
302        }
303elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /XenServer\\s+release\\s+5\\./) {
304        print "oscheck='XenServer Linux'\\n";
305        }
306elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /(Advanced\\s+Server.*2\\.1)|(AS.*2\\.1)/i) {
307        print "oscheck='Redhat Enterprise Linux'\\n";
308        }
309elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /ES.*2\\.1/) {
310        print "oscheck='Redhat Enterprise Linux'\\n";
311        }
312elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /WS.*2\\.1/) {
313        print "oscheck='Redhat Enterprise Linux'\\n";
314        }
315elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /(3\\.0AS)|(2\\.9\\.5AS)|(AS\\s+release\\s+3)/i) {
316        print "oscheck='Redhat Enterprise Linux'\\n";
317        }
318elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /(ES|AS|WS)\\s+release\\s+(\\S+)/) {
319        print "oscheck='Redhat Enterprise Linux'\\n";
320        }
321elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /Red.*Hat\\s+Enterprise\\s+Linux\\s+(Server|Client)\\s+release\\s+(\\d+)/i) {
322        print "oscheck='Redhat Enterprise Linux'\\n";
323        }
324elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /Desktop\\s+release\\s+(\\S+)/i || \`cat /etc/redhat-release 2>/dev/null\` =~ /ES\\s+release\\s+(\\S+)/i) {
325        print "oscheck='Redhat Linux Desktop'\\n";
326        }
327elsif (\`cat /etc/alphacore-release 2>/dev/null\` =~ /Alpha\\s*Core\\s+release\\s+(\\S+)\\s/i) {
328        print "oscheck='AlphaCore Linux'\\n";
329        }
330elsif (\`cat /etc/redhat-release /etc/fedora-release 2>/dev/null\` =~ /X\\/OS.*release\\s(\\S+)\\s/i) {
331        print "oscheck='X/OS Linux'\\n";
332        }
333elsif (\`cat /etc/Haansoft-release 2>/dev/null\` =~ /Haansoft\\s+Linux\\s+OS\\s+release\\s+(\\S+)/i) {
334        print "oscheck='Haansoft Linux'\\n";
335        }
336elsif (\`cat /etc/caos-release 2>/dev/null\` =~ /release\\s+(\\S+)/i) {
337        print "oscheck='cAos Linux'\\n";
338        }
339elsif (\`cat /etc/wrs-release 2>/dev/null\` =~ /Wind\\s+River\\s+Linux\\s+3\\.0/) {
340        print "oscheck='Wind River Linux'\\n";
341        }
342elsif (\`cat /etc/wrs-release 2>/dev/null\` =~ /Wind\\s+River\\s+Linux\\s+2\\.0/) {
343        print "oscheck='Wind River Linux'\\n";
344        }
345elsif (\`cat /etc/system-release 2>/dev/null\` =~ /Amazon\\s+Linux.*\\s2011/) {
346        print "oscheck='Amazon Linux'\\n";
347        }
348elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /red.*hat.*release\\s+(\\S+)/i && \`cat /etc/redhat-release 2>/dev/null\` !~ /[eE]nterprise|AS|ES|WS|[aA]dvanced/) {
349        print "oscheck='Redhat Linux'\\n";
350        }
351elsif (\`cat /etc/redhat-release /etc/fedora-release 2>/dev/null\` =~ /Fedora.*\\s([0-9\\.]+)\\s/i || \`cat /etc/redhat-release /etc/fedora-release 2>/dev/null\` =~ /Fedora.*\\sFC(\\S+)\\s/i) {
352        print "oscheck='Redhat Linux'\\n";
353        }
354elsif (\`cat /tmp/wd/version 2>/dev/null\` =~ /2\\.1\\.0/) {
355        print "oscheck='White Dwarf Linux'\\n";
356        }
357elsif (\`cat /etc/slamd64-version 2>/dev/null\` =~ /\\s([0-9\\.]+)/) {
358        print "oscheck='Slamd64 Linux'\\n";
359        }
360elsif (\`cat /etc/slackware-version 2>/dev/null\` =~ /Slackware ([0-9\\.]+)/i) {
361        print "oscheck='Slackware Linux'\\n";
362        }
363elsif (\$etc_issue =~ /Xandros.*\\s2\\.0/i) {
364        print "oscheck='Xandros Linux'\\n";
365        }
366elsif (\$etc_issue =~ /Xandros.*\\s3\\.0/i) {
367        print "oscheck='Xandros Linux'\\n";
368        }
369elsif (\$etc_issue =~ /Xandros.*\\s(4\\.\\d+)/i) {
370        print "oscheck='Xandros Linux'\\n";
371        }
372elsif (\$etc_issue =~ /APLINUX.*1\\.3/i) {
373        print "oscheck='APLINUX'\\n";
374        }
375elsif (\`cat /etc/bigblock-revision 2>/dev/null\` =~ /Version:\\s(1[0-9\\.-]+)\\s/i) {
376        print "oscheck='BigBlock'\\n";
377        }
378elsif (\`cat /etc/bigblock-revision 2>/dev/null\` =~ /Version:\\s(2[0-9\\.-]+)\\s/i) {
379        print "oscheck='BigBlock'\\n";
380        }
381elsif (\$etc_issue =~ /Ubuntu.*\\sgutsy/i) {
382        print "oscheck='Ubuntu Linux'\\n";
383        }
384elsif (\$etc_issue =~ /Ubuntu.*\\s(7\\.[0-9\\.]+)\\s/i) {
385        print "oscheck='Ubuntu Linux'\\n";
386        }
387elsif (\$etc_issue =~ /Ubuntu.*\\s(8\\.[0-9\\.]+)\\s/i) {
388        print "oscheck='Ubuntu Linux'\\n";
389        }
390elsif (\$etc_issue =~ /Ubuntu.*\\s(9\\.[0-9\\.]+)\\s/i) {
391        print "oscheck='Ubuntu Linux'\\n";
392        }
393elsif (\$etc_issue =~ /Ubuntu.*\\s(10\\.[0-9\\.]+)\\s/i) {
394        print "oscheck='Ubuntu Linux'\\n";
395        }
396elsif (\$etc_issue =~ /Ubuntu.*\\s(11\\.[0-9\\.]+)\\s/i || \$etc_issue =~ /Ubuntu\\s+natty/i) {
397        print "oscheck='Ubuntu Linux'\\n";
398        }
399elsif (\$etc_issue =~ /Ubuntu.*\\s([0-9\\.]+)\\s/i) {
400        print "oscheck='Ubuntu Linux'\\n";
401        }
402elsif (\$etc_issue =~ /MEPIS/ && \`cat /etc/debian_version 2>/dev/null\` =~ /([0-9\\.]+)/) {
403        print "oscheck='Mepis Linux'\\n";
404        }
405elsif (\$etc_issue =~ /MEPIS/ && \`cat /etc/debian_version 2>/dev/null\` =~ /(stable)/) {
406        print "oscheck='Mepis Linux'\\n";
407        }
408elsif (\$etc_issue =~ /Debian.*\\s([0-9\\.]+)\\s/i || \`cat /etc/debian_version 2>/dev/null\` =~ /([0-9\\.]+)/) {
409        print "oscheck='Debian Linux'\\n";
410        }
411elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(hamm)/i) {
412        print "oscheck='Debian Linux'\\n";
413        }
414elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(slink)/i) {
415        print "oscheck='Debian Linux'\\n";
416        }
417elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(potato)/i) {
418        print "oscheck='Debian Linux'\\n";
419        }
420elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(woody)/i) {
421        print "oscheck='Debian Linux'\\n";
422        }
423elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(sarge)/i) {
424        print "oscheck='Debian Linux'\\n";
425        }
426elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(etch)/i) {
427        print "oscheck='Debian Linux'\\n";
428        }
429elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(lenny)/i) {
430        print "oscheck='Debian Linux'\\n";
431        }
432elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(squeeze)/i) {
433        print "oscheck='Debian Linux'\\n";
434        }
435elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(wheezy)/i) {
436        print "oscheck='Debian Linux'\\n";
437        }
438elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(stable)/i) {
439        print "oscheck='Debian Linux'\\n";
440        }
441elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(testing)/i) {
442        print "oscheck='Debian Linux'\\n";
443        }
444elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(unstable)/i) {
445        print "oscheck='Debian Linux'\\n";
446        }
447elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(sid)/i) {
448        print "oscheck='Debian Linux'\\n";
449        }
450elsif (\`cat /etc/SLOX-release 2>/dev/null\` =~ /VERSION\\s+=\\s+(\\S+)/i) {
451        print "oscheck='SuSE OpenExchange Linux'\\n";
452        }
453elsif (\$etc_issue =~ /SuSE\\s+SLES-(\\S+)/i) {
454        print "oscheck='SuSE SLES Linux'\\n";
455        }
456elsif (\`cat /etc/SuSE-release 2>/dev/null\` =~ /([0-9\\.]+)/ || \$etc_issue =~ /SuSE\\s+Linux\\s+(\\S+)\\s/i) {
457        print "oscheck='SuSE Linux'\\n";
458        }
459elsif (\`cat /etc/UnitedLinux-release 2>/dev/null\` =~ /([0-9\\.]+)/) {
460        print "oscheck='United Linux'\\n";
461        }
462elsif (\$etc_issue =~ /Corel\\s+LINUX\\s+(\\S+)/i) {
463        print "oscheck='Corel Linux'\\n";
464        }
465elsif (\`cat /etc/turbolinux-release 2>/dev/null\` =~ /([0-9\\.]+)/i) {
466        print "oscheck='TurboLinux'\\n";
467        }
468elsif (\$etc_issue =~ /Cobalt\\s+Linux\\s+release\\s+(\\S+)/i || \`cat /etc/cobalt-release 2>/dev/null\` =~ /([0-9\\.]+)/) {
469        print "oscheck='Cobalt Linux'\\n";
470        }
471elsif (\`uname -r\` =~ /2.2.16/ && -r "/etc/cobalt-release") {
472        print "oscheck='Cobalt Linux'\\n";
473        }
474elsif (\$etc_issue =~ /Mandrake\\s+Corporate\\s+Server\\s+release\\s+1\\.0/i) {
475        print "oscheck='Mandrake Linux Corporate Server'\\n";
476        }
477elsif (\`cat /etc/mandrake-release 2>/dev/null\` =~ /pclinuxos\\s+Linux\\s+release\\s+2005/i) {
478        print "oscheck='pclinuxos Linux'\\n";
479        }
480elsif (\`cat /etc/mandrake-release 2>/dev/null\` =~ /pclinuxos\\s+Linux\\s+release\\s+2006/i) {
481        print "oscheck='pclinuxos Linux'\\n";
482        }
483elsif (\`cat /etc/mandrake-release 2>/dev/null\` =~ /PCLinuxOS\\s+release\\s+2007/i) {
484        print "oscheck='pclinuxos Linux'\\n";
485        }
486elsif (\`cat /etc/mandrake-release 2>/dev/null\` =~ /PCLinuxOS\\s+release\\s+2008/i) {
487        print "oscheck='pclinuxos Linux'\\n";
488        }
489elsif (\`cat /etc/mandrake-release 2>/dev/null\` =~ /PCLinuxOS\\s+release\\s+2009/i) {
490        print "oscheck='pclinuxos Linux'\\n";
491        }
492elsif (\$etc_issue =~ /Mandrake\\s+release\\s+5\\.3/i) {
493        print "oscheck='Mandrake Linux'\\n";
494        }
495elsif (\$etc_issue =~ /Mandrake\\s+release\\s+6\\.0/i) {
496        print "oscheck='Mandrake Linux'\\n";
497        }
498elsif (\$etc_issue =~ /Mandrake\\s+release\\s+6\\.1/i) {
499        print "oscheck='Mandrake Linux'\\n";
500        }
501elsif (\$etc_issue =~ /Mandrake\\s+release\\s+7\\.0/i) {
502        print "oscheck='Mandrake Linux'\\n";
503        }
504elsif (\$etc_issue =~ /Mandrake\\s+release\\s+7\\.1/i) {
505        print "oscheck='Mandrake Linux'\\n";
506        }
507elsif (\`cat /etc/mandrake-release 2>/dev/null\` =~ /Mandrake.*?([0-9\\.]+)/i || \$etc_issue =~ /Mandrake\\s+release\\s+([0-9\\.]+)/i || \$etc_issue =~ /Mandrakelinux\\s+release\\s+([0-9\\.]+)/i) {
508        print "oscheck='Mandrake Linux'\\n";
509        }
510elsif (\$etc_issue =~ /(Mandrakelinux|Mandriva).*(2006\\.\\d+)/i || \`cat /etc/mandrake-release 2>/dev/null\` =~ /(Mandrakelinux|Mandriva).*(2007\\.\\d+)/i) {
511        print "oscheck='Mandriva Linux'\\n";
512        }
513elsif (\$etc_issue =~ /(Mandrakelinux|Mandriva).*(2007\\.\\d+)/i || \`cat /etc/mandrake-release 2>/dev/null\` =~ /(Mandrakelinux|Mandriva).*(2007\\.\\d+)/i) {
514        print "oscheck='Mandriva Linux'\\n";
515        }
516elsif (\$etc_issue =~ /(Mandrakelinux|Mandriva).*(2008\\.\\d+)/i || \`cat /etc/mandrake-release 2>/dev/null\` =~ /(Mandrakelinux|Mandriva).*(2008\\.\\d+)/i) {
517        print "oscheck='Mandriva Linux'\\n";
518        }
519elsif (\$etc_issue =~ /(Mandrakelinux|Mandriva).*(2009\\.\\d+)/i || \`cat /etc/mandrake-release 2>/dev/null\` =~ /(Mandrakelinux|Mandriva).*(2009\\.\\d+)/i) {
520        print "oscheck='Mandriva Linux'\\n";
521        }
522elsif (\$etc_issue =~ /(Mandriva).*(20\\d\\d\\.\\d+)/i || \`cat /etc/mandriva-release 2>/dev/null\` =~ /(Mandriva).*(20\\d\\d\\.\\d+)/i) {
523        print "oscheck='Mandriva Linux'\\n";
524        }
525elsif (\$etc_issue =~ /Mandrake\\s+Linux\\s+Corporate\\s+Server\\s+release\\s+([0-9\\.]+)/i) {
526        print "oscheck='Mandrake Linux Corporate Server'\\n";
527        }
528elsif (\$etc_issue =~ /Mandriva\\s+Linux\\s+Enterprise\\s+Server\\s+release\\s+5\\.0\\s+\\(Official\\)\\s+for\\s+(i586|x86_64)/i) {
529        print "oscheck='Mandriva Linux Enterprise Server'\\n";
530        }
531elsif (\$etc_issue =~ /Conectiva.*Linux.*3\\.0/i) {
532        print "oscheck='Conectiva Linux'\\n";
533        }
534elsif (\$etc_issue =~ /Conectiva.*Linux.*4\\.0/i) {
535        print "oscheck='Conectiva Linux'\\n";
536        }
537elsif (\$etc_issue =~ /Conectiva.*Linux.*4\\.1/i) {
538        print "oscheck='Conectiva Linux'\\n";
539        }
540elsif (\$etc_issue =~ /Conectiva.*Linux.*4\\.2/i) {
541        print "oscheck='Conectiva Linux'\\n";
542        }
543elsif (\$etc_issue =~ /Conectiva.*Linux.*5\\.0/i) {
544        print "oscheck='Conectiva Linux'\\n";
545        }
546elsif (\$etc_issue =~ /Conectiva.*Linux.*5\\.1/i) {
547        print "oscheck='Conectiva Linux'\\n";
548        }
549elsif (\$etc_issue =~ /Conectiva.*Linux.*6\\.0/i) {
550        print "oscheck='Conectiva Linux'\\n";
551        }
552elsif (\$etc_issue =~ /Conectiva.*Linux.*7\\.0/i) {
553        print "oscheck='Conectiva Linux'\\n";
554        }
555elsif (\$etc_issue =~ /Conectiva.*Linux.*\\s8/i) {
556        print "oscheck='Conectiva Linux'\\n";
557        }
558elsif (\$etc_issue =~ /Conectiva.*Linux.*\\s9/i) {
559        print "oscheck='Conectiva Linux'\\n";
560        }
561elsif (\$etc_issue =~ /Conectiva.*Linux.*\\s10\\s/i) {
562        print "oscheck='Conectiva Linux'\\n";
563        }
564elsif (\$etc_issue =~ /Thiz.*Linux.*\\s5\\.0/i) {
565        print "oscheck='ThizLinux Desktop'\\n";
566        }
567elsif (\$etc_issue =~ /Thiz.*Linux.*\\s6\\.0/i) {
568        print "oscheck='ThizLinux Desktop'\\n";
569        }
570elsif (\$etc_issue =~ /Thiz.*Linux.*\\s6\\.2/i) {
571        print "oscheck='ThizLinux Desktop'\\n";
572        }
573elsif (\$etc_issue =~ /Thiz.*Linux.*\\s7\\.0/i) {
574        print "oscheck='ThizLinux Desktop'\\n";
575        }
576elsif (\$etc_issue =~ /Thiz.*\\s?Server.*\\s4\\.3/i) {
577        print "oscheck='ThizServer'\\n";
578        }
579elsif (\$etc_issue =~ /Thiz.*\\s?Server.*\\s6\\.0/i) {
580        print "oscheck='ThizServer'\\n";
581        }
582elsif (\$etc_issue =~ /Thiz.*\\s?Server.*\\s7\\.0/i) {
583        print "oscheck='ThizServer'\\n";
584        }
585elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2001.*January/i || \$etc_issue =~ /2001.*January/i) {
586        print "oscheck='MSC Linux'\\n";
587        }
588elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2001.*February/i || \$etc_issue =~ /2001.*February/i) {
589        print "oscheck='MSC Linux'\\n";
590        }
591elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2001.*May/i || \$etc_issue =~ /2001.*May/i) {
592        print "oscheck='MSC Linux'\\n";
593        }
594elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2001.*June/i || \$etc_issue =~ /2001.*June/i) {
595        print "oscheck='MSC Linux'\\n";
596        }
597elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2001.*August/i || \$etc_issue =~ /2001.*August/i) {
598        print "oscheck='MSC Linux'\\n";
599        }
600elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2002.*February/i || \$etc_issue =~ /2002.*February/i) {
601        print "oscheck='MSC Linux'\\n";
602        }
603elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2002.*March/i || \$etc_issue =~ /2002.*March/i) {
604        print "oscheck='MSC Linux'\\n";
605        }
606elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2002.*May/i || \$etc_issue =~ /2002.*May/i) {
607        print "oscheck='MSC Linux'\\n";
608        }
609elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2002.*July/i || \$etc_issue =~ /2002.*July/i) {
610        print "oscheck='MSC Linux'\\n";
611        }
612elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2002.*Nov/i || \$etc_issue =~ /2002.*Nov/i) {
613        print "oscheck='MSC Linux'\\n";
614        }
615elsif (\`cat /etc/scilinux-relase 2>/dev/null\` =~ /2003.*Summer/i) {
616        print "oscheck='SCI Linux'\\n";
617        }
618elsif (\`cat /etc/scilinux-relase 2>/dev/null\` =~ /2004.*Summer/i) {
619        print "oscheck='SCI Linux'\\n";
620        }
621elsif (\`cat /etc/scilinux-relase 2>/dev/null\` =~ /2005.*Summer/i) {
622        print "oscheck='SCI Linux'\\n";
623        }
624elsif (\$etc_issue =~ /LinuxPPC\\s+2000/i) {
625        print "oscheck='LinuxPPC'\\n";
626        }
627elsif (\$etc_issue =~ /Trustix.*Enterprise.*([0-9\\.]+)/i) {
628        print "oscheck='Trustix SE'\\n";
629        }
630elsif (\$etc_issue =~ /Trustix.*1\\.1/i) {
631        print "oscheck='Trustix'\\n";
632        }
633elsif (\$etc_issue =~ /Trustix.*1\\.2/i) {
634        print "oscheck='Trustix'\\n";
635        }
636elsif (\$etc_issue =~ /Trustix.*1\\.5/i) {
637        print "oscheck='Trustix'\\n";
638        }
639elsif (\$etc_issue =~ /Trustix.*\\s([0-9\\.]+)/i) {
640        print "oscheck='Trustix'\\n";
641        }
642elsif (\$etc_issue =~ /Tawie\\s+Server\\s+Linux.*([0-9\\.]+)/i) {
643        print "oscheck='Tawie Server Linux'\\n";
644        }
645elsif (\$etc_issue =~ /tinysofa.*release\\s+1\\.0/i) {
646        print "oscheck='TinySofa Linux'\\n";
647        }
648elsif (\`cat /etc/tinysofa-release 2>/dev/null\` =~ /classic.*release\\s+2\\.0/i) {
649        print "oscheck='TinySofa Linux'\\n";
650        }
651elsif (\`cat /etc/tinysofa-release 2>/dev/null\` =~ /enterprise.*release\\s+2\\.0/i) {
652        print "oscheck='TinySofa Linux'\\n";
653        }
654elsif (\$etc_issue =~ /Cendio\\s*LBS.*\\s3\\.1/i || \`cat /etc/lbs-release 2>/dev/null\` =~ /3\\.1/) {
655        print "oscheck='Cendio LBS Linux'\\n";
656        }
657elsif (\$etc_issue =~ /Cendio\\s*LBS.*\\s3\\.2/i || \`cat /etc/lbs-release 2>/dev/null\` =~ /3\\.2/) {
658        print "oscheck='Cendio LBS Linux'\\n";
659        }
660elsif (\$etc_issue =~ /Cendio\\s*LBS.*\\s3\\.3/i || \`cat /etc/lbs-release 2>/dev/null\` =~ /3\\.3/) {
661        print "oscheck='Cendio LBS Linux'\\n";
662        }
663elsif (\$etc_issue =~ /Cendio\\s*LBS.*\\s4\\.0/i || \`cat /etc/lbs-release 2>/dev/null\` =~ /4\\.0/) {
664        print "oscheck='Cendio LBS Linux'\\n";
665        }
666elsif (\$etc_issue =~ /Cendio\\s*LBS.*\\s4\\.1/i || \`cat /etc/lbs-release 2>/dev/null\` =~ /4\\.1/) {
667        print "oscheck='Cendio LBS Linux'\\n";
668        }
669elsif (\`cat /etc/ute-release 2>/dev/null\` =~ /Ute\\s+Linux\\s+release\\s+1\\.0/i) {
670        print "oscheck='Ute Linux'\\n";
671        }
672elsif (\$etc_issue =~ /Lanthan\\s+Linux\\s+release\\s+1\\.0/i || \`cat /etc/lanthan-release 2>/dev/null\` =~ /1\\.0/) {
673        print "oscheck='Lanthan Linux'\\n";
674        }
675elsif (\$etc_issue =~ /Lanthan\\s+Linux\\s+release\\s+2\\.0/i || \`cat /etc/lanthan-release 2>/dev/null\` =~ /2\\.0/) {
676        print "oscheck='Lanthan Linux'\\n";
677        }
678elsif (\$etc_issue =~ /Lanthan\\s+Linux\\s+release\\s+3\\.0/i || \`cat /etc/lanthan-release 2>/dev/null\` =~ /3\\.0/) {
679        print "oscheck='Lanthan Linux'\\n";
680        }
681elsif (\$etc_issue =~ /Yellow\\s+Dog\\s+Linux\\s+release\\s+2\\.0\\s+/i || \`cat /etc/yellowdog-release 2>/dev/null\` =~ /Yellow\\s+Dog\\s+Linux\\s+release\\s+2\\.0\\s+/i) {
682        print "oscheck='Yellow Dog Linux'\\n";
683        }
684elsif (\$etc_issue =~ /Yellow\\s+Dog\\s+Linux\\s+release\\s+2\\.1\\s+/i || \`cat /etc/yellowdog-release 2>/dev/null\` =~ /Yellow\\s+Dog\\s+Linux\\s+release\\s+2\\.1\\s+/i) {
685        print "oscheck='Yellow Dog Linux'\\n";
686        }
687elsif (\$etc_issue =~ /Yellow\\s+Dog\\s+Linux\\s+release\\s+2\\.2\\s+/i || \`cat /etc/yellowdog-release 2>/dev/null\` =~ /Yellow\\s+Dog\\s+Linux\\s+release\\s+2\\.2\\s+/i) {
688        print "oscheck='Yellow Dog Linux'\\n";
689        }
690elsif (\$etc_issue =~ /Yellow\\s+Dog\\s+Linux\\s+release\\s+2\\.3\\s+/i || \`cat /etc/yellowdog-release 2>/dev/null\` =~ /Yellow\\s+Dog\\s+Linux\\s+release\\s+2\\.3\\s+/i) {
691        print "oscheck='Yellow Dog Linux'\\n";
692        }
693elsif (\$etc_issue =~ /Yellow\\s+Dog\\s+Linux\\s+release\\s+3\\.0\\s+/i || \`cat /etc/yellowdog-release 2>/dev/null\` =~ /Yellow\\s+Dog\\s+Linux\\s+release\\s+3\\.0\\s+/i) {
694        print "oscheck='Yellow Dog Linux'\\n";
695        }
696elsif (\$etc_issue =~ /Yellow\\s+Dog\\s+Linux\\s+release\\s+4\\.0\\s+/i || \`cat /etc/yellowdog-release 2>/dev/null\` =~ /\\s4\\.0\\s/i) {
697        print "oscheck='Yellow Dog Linux'\\n";
698        }
699elsif (\`cat /etc/latinux-release 2>/dev/null\` =~ /Latinux\\s+8\\s/i) {
700        print "oscheck='Corvus Latinux'\\n";
701        }
702elsif (\$etc_issue =~ /Immunix.*\\s([0-9\\.]+)/i || \`cat /etc/immunix-release 2>/dev/null\` =~ /([0-9\\.]+)/) {
703        print "oscheck='Immunix Linux'\\n";
704        }
705elsif (-d "/usr/portage") {
706        print "oscheck='Gentoo Linux'\\n";
707        }
708elsif (\`cat /etc/securelinux-release 2>/dev/null\` =~ /SecureLinux.*1\\.0/i) {
709        print "oscheck='Secure Linux'\\n";
710        }
711elsif (\`cat /etc/openna-release 2>/dev/null\` =~ /release\\s+1\\.0\\s/i) {
712        print "oscheck='OpenNA Linux'\\n";
713        }
714elsif (\`cat /etc/openna-release 2>/dev/null\` =~ /release\\s+2\\.0\\s/i) {
715        print "oscheck='OpenNA Linux'\\n";
716        }
717elsif (-r "/etc/antitachyon-distribution" && \`uname -r\` =~ /2\\.4\\./) {
718        print "oscheck='SoL Linux'\\n";
719        }
720elsif (-r "/etc/antitachyon-distribution" && \`uname -r\` =~ /2\\.6\\./) {
721        print "oscheck='SoL Linux'\\n";
722        }
723elsif (\$etc_issue =~ /coherent\\s*technology.*\\s([0-9\\.]+)/i || \`cat /etc/coherent-release 2>/dev/null\` =~ /([0-9\\.]+)/ ) {
724        print "oscheck='Coherent Technology Linux'\\n";
725        }
726elsif (\$etc_issue =~ /PS2\\s+Linux\\s+release\\s+1.0/i) {
727        print "oscheck='Playstation Linux'\\n";
728        }
729elsif (\`cat /etc/startcom-release 2>/dev/null\` =~ /([0-9\\.]+)/) {
730        print "oscheck='StartCom Linux'\\n";
731        }
732elsif (\`cat /etc/yoper-release 2>/dev/null\` =~ /Yoper\\s+Linux\\s+2.0/i) {
733        print "oscheck='Yoper Linux'\\n";
734        }
735elsif (\`cat /etc/yoper-release 2>/dev/null\` =~ /Yoper\\s+Linux\\s+2.1/i) {
736        print "oscheck='Yoper Linux'\\n";
737        }
738elsif (\`cat /etc/yoper-release 2>/dev/null\` =~ /Yoper\\s+Linux\\s+2.2/i) {
739        print "oscheck='Yoper Linux'\\n";
740        }
741elsif (\`cat /etc/CxM-release 2>/dev/null\` =~ /8\\.1/ || \$etc_issue =~ /Caixa\\s+8\\.1\\s/i) {
742        print "oscheck='Caixa Magica'\\n";
743        }
744elsif (\`cat /etc/CxM-release 2>/dev/null\` =~ /10\\.0/ || \$etc_issue =~ /Caixa\\s+10\\.0\\s/i) {
745        print "oscheck='Caixa Magica'\\n";
746        }
747elsif (\`cat /etc/openmamba-release 2>/dev/null\` =~ /openmamba\\s+release\\s+(\\S+)/i) {
748        print "oscheck='openmamba Linux'\\n";
749        }
750elsif (\$uname =~ /FreeBSD.*?\\s([0-9]+\\.[0-9\\.]+)/i) {
751        print "oscheck='FreeBSD'\\n";
752        }
753elsif (\$uname =~ /DragonFly.*?\\s1\\.0A/i) {
754        print "oscheck='DragonFly BSD'\\n";
755        }
756elsif (\$uname =~ /DragonFly.*?\\s1\\.2A/i) {
757        print "oscheck='DragonFly BSD'\\n";
758        }
759elsif (\$uname =~ /OpenBSD.*?\\s([0-9\\.]+)/i) {
760        print "oscheck='OpenBSD'\\n";
761        }
762elsif (\$uname =~ /NetBSD.*1\\.5/i) {
763        print "oscheck='NetBSD'\\n";
764        }
765elsif (\$uname =~ /NetBSD.*1\\.6/i) {
766        print "oscheck='NetBSD'\\n";
767        }
768elsif (\$uname =~ /NetBSD.*2\\.0/i) {
769        print "oscheck='NetBSD'\\n";
770        }
771elsif (\$uname =~ /NetBSD.*3\\.0/i) {
772        print "oscheck='NetBSD'\\n";
773        }
774elsif (\$uname =~ /NetBSD.*4\\.0/i) {
775        print "oscheck='NetBSD'\\n";
776        }
777elsif (\`uname\` =~ /NetBSD/ && \`uname -r\` =~ /([\\d.]+)/) {
778        print "oscheck='NetBSD'\\n";
779        }
780elsif (\$uname =~ /BSDI.*\\s([0-9\\.]+)/i) {
781        print "oscheck='BSDI'\\n";
782        }
783elsif (\$uname =~ /HP-UX.*(1[01]\\.[0-9\\.]+)/) {
784        print "oscheck='HP/UX'\\n";
785        }
786elsif (\$uname =~ /IRIX.*([0-9]+\\.[0-9]+)/i) {
787        print "oscheck='SGI Irix'\\n";
788        }
789elsif (\$uname =~ /OSF1.*4\\.0/) {
790        print "oscheck='DEC/Compaq OSF/1'\\n";
791        }
792elsif (\$uname =~ /OSF1.*V5.1/) {
793        print "oscheck='DEC/Compaq OSF/1'\\n";
794        }
795elsif (\$uname =~ /AIX\\s+\\S+\\s+(\\d+)\\s+(\\d+)\\s+/i) {
796        print "oscheck='IBM AIX'\\n";
797        }
798elsif (\$uname =~ /SCO_SV.*\\s5\\./i) {
799        print "oscheck='SCO OpenServer'\\n";
800        }
801elsif (\$uname =~ /SCO_SV.*\\s6\\./i) {
802        print "oscheck='SCO OpenServer'\\n";
803        }
804elsif (\`sw_vers 2>/dev/null\` =~ /ProductVersion:\\s+10\\.0/i) {
805        print "oscheck='Mac OS X'\\n";
806        }
807elsif (\`sw_vers 2>/dev/null\` =~ /ProductVersion:\\s+10\\.1/i) {
808        print "oscheck='Mac OS X'\\n";
809        }
810elsif (\`sw_vers 2>/dev/null\` =~ /ProductVersion:\\s+10\\.2/i) {
811        print "oscheck='Mac OS X'\\n";
812        }
813elsif (\`sw_vers 2>/dev/null\` =~ /ProductVersion:\\s+10\\.3/i) {
814        print "oscheck='Mac OS X'\\n";
815        }
816elsif (\`sw_vers 2>/dev/null\` =~ /ProductVersion:\\s+10\\.4/i) {
817        print "oscheck='Mac OS X'\\n";
818        }
819elsif (\`sw_vers 2>/dev/null\` =~ /ProductVersion:\\s+10\\.5/i) {
820        print "oscheck='Mac OS X'\\n";
821        }
822elsif (\$uname =~ /Darwin.*\\s([0-9\\.]+)/) {
823        print "oscheck='Darwin'\\n";
824        }
825elsif (\`cat /etc/SuSE-release 2>/dev/null\` =~ /Java Desktop System.*\\nVERSION = 1\\.0/i) {
826        print "oscheck='Sun Java Desktop System'\\n";
827        }
828elsif (\`cat /etc/SuSE-release 2>/dev/null\` =~ /Java Desktop System.*\\nVERSION = 2\\.0/i) {
829        print "oscheck='Sun Java Desktop System'\\n";
830        }
831elsif (\`cat /etc/SuSE-release 2>/dev/null\` =~ /Java Desktop System.*\\nVERSION = 3\\.0/i) {
832        print "oscheck='Sun Java Desktop System'\\n";
833        }
834elsif (\$uname =~ /SunOS.*\\s5\\.9\\s/i && \`cat /etc/sun-release 2>/dev/null\` =~ /Sun\\s+Java\\s+Desktop/) {
835        print "oscheck='Sun Java Desktop System'\\n";
836        }
837elsif (\`uname -r\` =~ /2\\.0\\./) {
838        print "oscheck='Generic Linux'\\n";
839        }
840elsif (\`uname -r\` =~ /2\\.2\\./) {
841        print "oscheck='Generic Linux'\\n";
842        }
843elsif (\`uname -r\` =~ /2\\.4\\./) {
844        print "oscheck='Generic Linux'\\n";
845        }
846elsif (\`uname -r\` =~ /2\\.4\\./) {
847        print "oscheck='Generic Linux'\\n";
848        }
849elsif (\`uname -r\` =~ /2\\.6\\./) {
850        print "oscheck='Generic Linux'\\n";
851        }
852elsif (\`uname -r\` =~ /2\\.7\\./) {
853        print "oscheck='Generic Linux'\\n";
854        }
855elsif ((-d "c:/windows" || -d "c:/winnt") && \`ver\` =~ /XP/) {
856        print "oscheck='Windows'\\n";
857        }
858elsif ((-d "c:/windows" || -d "c:/winnt") && \`ver\` =~ /2000/) {
859        print "oscheck='Windows'\\n";
860        }
861elsif ((-d "c:/windows" || -d "c:/winnt") && \`ver\` =~ /2003|\\s5\\.2/) {
862        print "oscheck='Windows'\\n";
863        }
864
865EOD
866. /$$.check
867rm -f /$$.check
868if [ ! -r /etc/webmin/config ]; then
869        if [ "$oscheck" = "" ]; then
870                echo Unable to identify operating system
871                exit 2
872        fi
873        echo Operating system is $oscheck
874        if [ "$WEBMIN_PORT" != "" ]; then
875                port=$WEBMIN_PORT
876        else
877                port=10000
878        fi
879        perl -e 'use Socket; socket(FOO, PF_INET, SOCK_STREAM, getprotobyname("tcp")); setsockopt(FOO, SOL_SOCKET, SO_REUSEADDR, pack("l", 1)); bind(FOO, pack_sockaddr_in($ARGV[0], INADDR_ANY)) || exit(1); exit(0);' $port
880        if [ "$?" != "0" ]; then
881                echo Port $port is already in use
882                exit 2
883        fi
884fi
885# Save /etc/webmin in case the upgrade trashes it
886if [ "$1" != 1 ]; then
887        rm -rf /etc/.webmin-backup
888        cp -r /etc/webmin /etc/.webmin-backup
889fi
890# Put back old /etc/webmin saved when an RPM was removed
891if [ "$1" = 1 -a ! -d /etc/webmin -a -d /etc/webmin.rpmsave ]; then
892        mv /etc/webmin.rpmsave /etc/webmin
893fi
894/bin/true
895
896%post
897/sbin/chkconfig --add webmin
898inetd=`grep "^inetd=" /etc/webmin/miniserv.conf 2>/dev/null | sed -e 's/inetd=//g'`
899startafter=0
900if [ "$1" != 1 ]; then
901        # Upgrading the RPM, so stop the old webmin properly
902        if [ "$inetd" != "1" ]; then
903                kill -0 `cat /var/webmin/miniserv.pid 2>/dev/null` 2>/dev/null
904                if [ "$?" = 0 ]; then
905                  startafter=1
906                fi
907                /etc/init.d/webmin stop >/dev/null 2>&1 </dev/null
908        fi
909else
910  startafter=1
911fi
912cd /usr/libexec/webmin
913config_dir=/etc/webmin
914var_dir=/var/webmin
915if [ -f $config_dir/config ]; then
916        perl -pi -e 's/lang=ja\n/lang=ja_JP.UTF-8\n/g' $config_dir/config
917fi
918perl=/usr/bin/perl
919autoos=3
920if [ "$WEBMIN_PORT" != "" ]; then
921        port=$WEBMIN_PORT
922else
923        port=10000
924fi
925login=root
926if [ -r /etc/shadow ]; then
927        #crypt=`grep "^root:" /etc/shadow | cut -f 2 -d :`
928        crypt=x
929else
930        crypt=`grep "^root:" /etc/passwd | cut -f 2 -d :`
931fi
932host=localhost
933ssl=1
934atboot=1
935nochown=1
936autothird=1
937noperlpath=1
938nouninstall=1
939nostart=1
940allow=127.0.0.1
941CONF_LST_LANG=ja_JP.UTF-8
942export config_dir var_dir perl autoos port login crypt host ssl nochown autothird noperlpath nouninstall nostart allow CONF_LST_LANG
943./setup.sh >/tmp/.webmin/webmin-setup.out 2>&1
944rm -f /var/lock/subsys/webmin
945/etc/init.d/webmin start
946cat >/etc/webmin/uninstall.sh <<EOFF
947#!/bin/sh
948printf "Are you sure you want to uninstall Webmin? (y/n) : "
949read answer
950printf "\n"
951if [ "\$answer" = "y" ]; then
952        echo "Removing webmin RPM .."
953        rpm -e --nodeps webmin
954        echo "Done!"
955fi
956EOFF
957chmod +x /etc/webmin/uninstall.sh
958if [ -f $config_dir/miniserv.users ]; then
959        perl -pi -e 's/root:XXUp2ozpdysrQ:0\n/root:$ENV{'crypt'}:0\n/g' $config_dir/miniserv.users
960        perl -pi -e 's/root::0\n/root:$ENV{'crypt'}:0\n/g' $config_dir/miniserv.users
961fi
962%if %{?_dist_release}=="vl4"
963if [ "$LANG" = "ja_JP.eucJP" ]; then
964%else
965if [ "$LANG" = "ja_JP.UTF-8" ]; then
966%endif
967    echo "Webminがインストールされました。mozillaなどのブラウザを開き、"
968    echo "https://$host:10000/ にアクセスし、rootでログインしてください。"
969else
970    echo "Webmin install complete. You can now login to https://$host:10000/"
971    echo "as root with your root password."
972fi
973/bin/true
974
975%preun
976if [ "$1" = 0 ]; then
977        grep root=/usr/libexec/webmin /etc/webmin/miniserv.conf >/dev/null 2>&1
978        if [ "$?" = 0 ]; then
979                # RPM is being removed, and no new version of webmin
980                # has taken it's place. Run uninstalls and stop the server
981                echo "Running uninstall scripts .."
982                (cd /usr/libexec/webmin ; WEBMIN_CONFIG=/etc/webmin WEBMIN_VAR=/var/webmin LANG= /usr/libexec/webmin/run-uninstalls.pl)
983                /etc/init.d/webmin stop >/dev/null 2>&1 </dev/null
984                /etc/webmin/stop >/dev/null 2>&1 </dev/null
985        fi
986        /sbin/chkconfig --del webmin
987fi
988/bin/true
989
990%postun
991if [ "$1" = 0 ]; then
992        grep root=/usr/libexec/webmin /etc/webmin/miniserv.conf >/dev/null 2>&1
993        if [ "$?" = 0 ]; then
994                # RPM is being removed, and no new version of webmin
995                # has taken it's place. Rename away the /etc/webmin directory
996                rm -rf /etc/webmin.rpmsave
997                mv /etc/webmin /etc/webmin.rpmsave
998                rm -rf /var/webmin
999        fi
1000fi
1001/bin/true
1002
1003%triggerpostun -- webmin
1004if [ ! -d /var/webmin -a "$1" = 2 ]; then
1005        echo Re-creating /var/webmin directory
1006        mkdir /var/webmin
1007fi
1008if [ ! -r /etc/webmin/miniserv.conf -a -d /etc/.webmin-backup -a "$1" = 2 ]; then
1009        echo Recovering /etc/webmin directory
1010        rm -rf /etc/.webmin-broken
1011        mv /etc/webmin /etc/.webmin-broken
1012        mv /etc/.webmin-backup /etc/webmin
1013        /etc/init.d/webmin stop >/dev/null 2>&1 </dev/null
1014        /etc/init.d/webmin start >/dev/null 2>&1 </dev/null
1015else
1016        rm -rf /etc/.webmin-backup
1017fi
1018/bin/true
1019
1020
1021%changelog
1022* Sat Jun  6 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.560-1
1023- updated to 1.560
1024- updated Patch0, Source12
1025- updated %%pre script <VineLinux:BTS:1200>
1026- added URL, Vendor and Distribution tag
1027
1028* Sat Jun  6 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.470-1
1029- applied new versioning policy, spec in UTF-8
1030- updated Patch0 and spec files for Vine Linux 5.0
1031- updated SOURCE11
1032
1033* Thu Dec 27 2007 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.290-0vl2
1034- updated Patch0 and spec files for Vine Linux 4.2
1035- don't redirect messages when start/stop webmin at %%post, %%preun and %%postun.
1036
1037* Sat Sep 16 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.290-0vl1
1038- new upstream release
1039- changed Group to Applications/Administration
1040- updated Patch0 and spec files for Vine Linux 4.0
1041
1042* Fri Jun 23 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.280-0vl1
1043- new upstream release
1044
1045* Thu Sep  8 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.180-0vl3
1046- fixed Patch0 (restart section in /etc/rc.d/init.d/webmin)
1047
1048* Thu Aug 25 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.180-0vl2
1049- updated for Vine 3.2 (Patch0, spec file)
1050
1051* Wed Feb 16 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.180-0vl1
1052- new upstream release
1053- updated Patch0 for Vine3.1
1054- s/Copyright/License/
1055- changed Group:
1056
1057* Tue Feb 25 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 1.070-0vl1
1058- new upstream release
1059- [SECURITY FIX]
1060
1061* Wed Oct 30 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.000-1vl7
1062- change restart behavior in /etc/init.d/webmin.
1063
1064* Wed Oct 30 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.000-1vl6
1065- fix /etc/init.d/webmin
1066  replace webmin root password as real password,
1067  when it is null(like root::0).
1068
1069* Sun Oct 27 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.000-1vl5
1070- add allow=127.0.0.1 to miniserv.conf
1071- add some configuration check in /etc/init.d/webmin
1072
1073* Sun Oct 27 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.000-1vl4
1074- fixed security bug.
1075  - add adhoc script to replace null root password in miniserv.users
1076    with real password.
1077
1078* Tue Oct 08 2002 FUJIOKA Takeyuki <fuji@ftserve.net> 1.000-1vl3
1079- added some third party module.
1080  (netatalk,iptables,ipchains and the patch.)
1081
1082* Mon Oct 07 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.000-1vl2
1083- fix some patch bug.
1084
1085* Mon Oct 07 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.000-1vl1
1086- replace lang name (ja -> ja_JP.euc) in config file at %%post script.
1087
1088* Fri Oct 4 2002 FUJIOKA Takeyuki <fuji@ftserve.net> 1.00-0vl0
1089- updated to 1.00
1090- added Vine Linux patch
1091  (limit default access policy to 'allow=localhost' and SSL.)
1092  (Japanese login if LANG=ja_JP.eucJP)
1093  ("os_list.txt" to add the dectection of VineLinux)
1094
1095* Sun Mar 31 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.92-0vl3
1096- added Source12 and Patch7 (netatalk webmin module 0.9)
1097- modified Patch4 for Vine 2.5 and 2.5CR
1098
1099* Sun Mar 03 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.92-0vl2
1100- stop/start webmin service only if webmin is already running in %%post section
1101
1102* Wed Feb 06 2002 Toru Sagami <sagami@vinelinux.org> 0.92-0vl1
1103- updated to 0.92 and added iptables module
1104- quit replacing quota bind8 sendmail file man modules
1105
1106* Thu Jan  3 2002 Tomoya TAKA <taka@vinelinux.org> 0.91-0vl1
1107- update to 0.91
1108- add some updated modules to Webmin 0.91
1109  (cf. http://www.webmin.com/webmin/updates.html)
1110- update ipchains module to 0.83.1 and modify ipchains-Japanese.patch
1111- cleanup spec file
1112
1113* Tue Nov 13 2001 Tomoya TAKA <taka@vinelinux.org> 0.88-0vl3
1114- remove /etc/webmin/ and /var/webmin/ from %%files
1115
1116* Tue Oct 23 2001 Toru Sagami <sagami@vinelinux.org>
1117- 0.88-0vl3: fix for Insecure Temporary File Creation
1118
1119* Sat Sep 15 2001 Toru Sagami <sagami@vinelinux.org>
1120- fixed Group s/Application/Applications/
1121
1122* Thu Sep 13 2001 Toru Sagami <sagami@vinelinux.org>
1123- 0.88-0vl1: updated to 0.88
1124
1125* Fri Sep 07 2001 Toru Sagami <sagami@vinelinux.org>
1126- 0.87-0vl3: treatment to use LPRng by default instead of lp
1127
1128* Fri Jul 27 2001 <sagami@vinelinux.org>
1129- 0.87-0vl2: webmin starts at 99 and stops at 00 (No reason!)
1130- eliminate noreplace attribute from initscript
1131  (NOTE: 'noreplace' may be marked to config file, not to initscript)
1132
1133* Mon Jul 16 2001 <sagami@vinelinux.org>
1134- 0.87-0vl1: port to VineSeedPlus from VinePlus/2.1
1135- two of the patches are slightly modified for 0.87
1136- slightly modified initscript message
1137
1138* Sat Mar 17 2001 KAJIKI Yoshihiro <kajiki@ylug.org> [0.84-0vl2]
1139- correct ja message of webminlog
1140- security fix on postinstall.sh
1141
1142* Mon Feb 26 2001 KAJIKI Yoshihiro <kajiki@ylug.org> [0.84-0vl1]
1143- update to 0.84 based on the Mandrake 0.84-1mdk
1144- add requires Net::SSLeay
1145- split add-ja-info.sh from Japanese patch
1146
1147* Tue Sep 19 2000 KAJIKI Yoshihiro <kajiki@ylug.org>
1148- update Japanese resource to match with webmin-0.81
1149- set several access control as default for security
1150
1151* Thu Sep 14 2000 KAJIKI Yoshihiro <kajiki@ylug.org>
1152- change default protocol to SSL, if Net::SSLeay is found
1153- update to webmin-0.81
1154
1155* Mon Sep 4 2000 KAJIKI Yoshihiro <kajiki@ylug.org>
1156- update Japanese resource (almost compleated except help)
1157
1158* Thu Aug 30 2000 KAJIKI Yoshihiro <kajiki@ylug.org>
1159- update Japanese resource (not compleated yet)
1160- correct default script position of ipchains
1161
1162* Mon Aug 28 2000 KAJIKI Yoshihiro <kajiki@ylug.org>
1163- update Japanese resource (not compleated yet)
1164- correct default language bug
1165- add ipchains module
1166
1167* Thu Aug 24 2000 KAJIKI Yoshihiro <kajiki@ylug.org>
1168- update Japanese resource (not compleated yet)
1169- limit default access policy to 'allow=127.0.0.1'
1170
1171* Mon Aug 21 2000 KAJIKI Yoshihiro <kajiki@ylug.org>
1172- add Japanese resource (not compleated)
1173- add a vine specific patch and remove mdk specific patches
1174- add an ad hoc patch against requiring /usr/local/bin/perl
1175- rebuild for Vine Linux
1176
1177* Wed Jul 19 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.80-6mdk
1178- BM
1179
1180* Tue Jun 20 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.80-5mdk
1181- now uses 0.80 final of Webmin
1182
1183* Wed May 24 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.80-4mdk
1184- more bugfixes in postfix module, after bugreports by Charles
1185
1186* Sat May 20 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.80-3mdk
1187- small bugfix in postfix module
1188
1189* Thu May 18 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.80-2mdk
1190- patched "os_list.txt" to add the dectection of Linux Mandrake
1191  Corporate Server 1.0 and Linux Mandrake 7.1
1192- patched the post-install script which said "Mandrake 7.0" all
1193  the time if Webmin was installed during system install
1194
1195* Fri May  5 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.80-1mdk
1196- upgrade to 0.80 beta with the kind help of Jamie, because of
1197  incompatibility between 0.79 and perl 5.6
1198
1199* Wed May  3 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.79-5mdk
1200- updated postfix-mdkmodule so that it tests if postfix is running
1201  in a more portable way [uses kill -0 <pid>]
1202- updated install style so that it adds to the runlevel information
1203  at install time; thus it's okay now to select/deselect it in DrakX
1204
1205* Thu Apr 20 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.79-4mdk
1206- fixed the hang of post install at boot time [grr]
1207
1208* Wed Apr 19 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.79-3mdk
1209- fixed very bad security issue concerning exec of script during
1210  install
1211- added small executable to tell people that they have to connect
1212  through their web browser
1213
1214* Mon Apr 17 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.79-2mdk
1215- fixed missing LICENCE file
1216
1217* Fri Apr 14 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.79-1mdk
1218- 0.79
1219- updated postfix-mdkmodule with bugfixes and other stuff
1220- mdkicons now have a copyright
1221
1222* Thu Apr  6 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.78-2mdk
1223- Updated Mandrake Icons
1224- Updated `PreRequires', and fixed the problem of /etc/issue,
1225  in order to not fail in install
1226
1227* Mon Mar 27 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.78-1mdk
1228- Mandrake Icons
1229
1230* Fri Mar 17 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.78-0.4mdk
1231- v0.78
1232- Postfix Module
1233- cleanup and debug of specfile with help of Chmouel :-)
1234
1235* Thu Feb 10 2000 Lenny Cartier <lenny@mandrakesoft.com>
1236- v0.77
1237- used srpm provided by Vincent Danen <vdanen@linux-mandrake.com>
1238
1239* Tue Feb 8 2000 Vincent Danen <vdanen@linux-mandrake.com>
1240- 0.77
1241- updated specfile based on the webmin source RPM (newly released, nice
1242  changes!)
1243- included the 0.73 ocstheme again (does anyone know of an update to this?)
1244
1245* Thu Jan 13 2000 Vincent Danen <vdanen@linux-mandrake.com>
1246- 0.76
1247
1248* Wed Dec 08 1999 Lenny Cartier <lenny@mandrakesoft.com>
1249- new in contribs
1250- used srpm provided by Vincent Danen <vdanen@linux-mandrake.com>
1251
1252* Sun Dec 5 1999 Vincent Danen <vdanen@linux-mandrake.com>
1253- built specfile for Mandrake contribs
1254- based loosely on Leon Breedt's <leon@obsidian.co.za> SRPM for 0.73
1255- webmin-install.sh is now a source package, not built from patch
1256- bzip sources
Note: See TracBrowser for help on using the repository browser.