%define __spec_install_post %{nil} # Provide perl-specific find-{provides,requires}. #%define __find_provides %{_libdir}/rpm/find-provides.perl #%define __find_requires %{_libdir}/rpm/find-requires.perl Name: webmin Summary: A web-based administration interface for Unix systems. Summary(ja): Web ベースのシステム管理ツール Version: 1.560 Release: 1%{?_dist_release} License: Freeware Group: Applications/Administration URL: http://www.webmin.com/ Source0: http://www.webmin.com/download/%{name}-%{version}.tar.gz # additional modules #Source10: http://www.niemueller.de/webmin/modules/ipchains/ipchains-0.83.1.wbm.gz Source11: http://www.niemueller.de/webmin/modules/iptables/iptables-0.91.1.wbm.gz Source12: http://prdownloads.sourceforge.net/netatalk/netatalk-wbm-0.9.1.tgz Patch0: webmin-1.560-vine.patch #Patch7: netatalk-vine.diff #Patch10: ipchains-Japanese.patch.bz2 AutoReq: false BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildArch: noarch BuildRequires: perl Requires: perl Requires(pre): coreutils grep Requires(post): chkconfig initscripts perl-Net_SSLeay sed Requires(preun): chkconfig initscripts Requires(postun): coreutils grep Provides: %{name}-%{version} Vendor: Project Vine Distribution: Vine Linux %description A web-based administration interface for Unix systems. Using Webmin you can configure DNS, Samba, NFS, local/remote filesystems and more using your web browser. After installation, enter the URL https://localhost:10000/ into your browser and login as root with your root password. NOTE THAT THIS VERSION NOW USES SECURE WEB TRANSACTIONS: YOU HAVE TO LOGIN TO "https://localhost:10000/" AND NOT "http://localhost:10000/". %description -l ja Web ベースのシステム管理ツール。Webmin を用いると、DNS, Samba, NFS, ローカルまたはリモートのファイルシステム, Apache, Postfix などの設 定を Web ブラウザにて行うことができます。 インストール後、ブラウザから https://localhost:10000/ にアクセスし、 root のパスワードを入力して root として入ってください。安全のため、 パスワードは定期的に変更するようにしましょう。 この rpm パッケージの場合、セキュリティ強化の為に、デフォルトでは 127.0.0.1 (localhost) からのみ接続できるように制限してあります。 また、perl-Net_SSLeay パッケージを用いて、デフォルトで SSL による 暗号化を行うように設定しています。 %prep %setup -q -a 11 -a 12 %patch0 -p1 -b .vine #patch7 -p1 #cd ipchains #patch10 -p1 %build (find . -name '*.cgi' ; find . -name '*.pl') | perl perlpath.pl /usr/bin/perl - rm -f mount/freebsd-mounts* rm -f mount/openbsd-mounts* rm -f mount/macos-mounts* rm -f webmin-gentoo-init rm -rf acl/Authen-SolarisRBAC-0.1 chmod -R og-w . %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/libexec/webmin mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/daemons mkdir -p $RPM_BUILD_ROOT/etc/rc.d/{init.d,rc0.d,rc1.d,rc2.d,rc3.d,rc5.d,rc6.d} mkdir -p $RPM_BUILD_ROOT/etc/pam.d cp -rp * $RPM_BUILD_ROOT/usr/libexec/webmin cp webmin-daemon $RPM_BUILD_ROOT/etc/sysconfig/daemons/webmin cp webmin-init $RPM_BUILD_ROOT/etc/rc.d/init.d/webmin cp webmin-pam $RPM_BUILD_ROOT/etc/pam.d/webmin echo rpm > $RPM_BUILD_ROOT/usr/libexec/webmin/install-type %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) /usr/libexec/webmin /etc/sysconfig/daemons/webmin /etc/rc.d/init.d/webmin %config /etc/pam.d/webmin %pre perl </$$.check <&1\` =~ /Vine\\s+Linux\\s+2\\.1/i) { print "oscheck='Vine Linux'\\n"; } elsif (\$etc_issue =~ /Vine\\sLinux\\s2\\.1\\.5/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+2\\.1\\.5/i) { print "oscheck='Vine Linux'\\n"; } elsif (\$etc_issue =~ /Vine\\sLinux\\s2\\.5/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+2\\.5\\s+/i) { print "oscheck='Vine Linux'\\n"; } elsif (\$etc_issue =~ /Vine\\sLinux\\s2\\.6/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+2\\.6\\s+/i) { print "oscheck='Vine Linux'\\n"; } elsif (\$etc_issue =~ /Vine\\sLinux\\s3\\.0/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+3\\.0\\s+/i) { print "oscheck='Vine Linux'\\n"; } elsif (\$etc_issue =~ /Vine\\sLinux\\s3\\.1/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+3\\.1\\s+/i) { print "oscheck='Vine Linux'\\n"; } elsif (\$etc_issue =~ /Vine\\sLinux\\s3\\.2/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+3\\.2\\s+/i) { print "oscheck='Vine Linux'\\n"; } elsif (\$etc_issue =~ /Vine\\sLinux\\s4\\.0/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+4\\.0\\s+/i) { print "oscheck='Vine Linux'\\n"; } elsif (\$etc_issue =~ /Vine\\sLinux\\s4\\.1/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+4\\.1\\s+/i) { print "oscheck='Vine Linux'\\n"; } elsif (\$etc_issue =~ /Vine\\sLinux\\s4\\.2/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+4\\.2\\s+/i) { print "oscheck='Vine Linux'\\n"; } elsif (\$etc_issue =~ /Vine\\sLinux\\s5\\.0/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+5\\.0\\s+/i) { print "oscheck='Vine Linux'\\n"; } elsif (\$etc_issue =~ /Vine\\sLinux\\s5\\.1/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+5\\.1\\s+/i) { print "oscheck='Vine Linux'\\n"; } elsif (\$etc_issue =~ /Vine\\sLinux\\s5\\.2/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+5\\.2\\s+/i) { print "oscheck='Vine Linux'\\n"; } elsif (\$etc_issue =~ /Vine\\sLinux\\s6\\.0/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+6\\.0\\s+/i) { print "oscheck='Vine Linux'\\n"; } elsif (\$etc_issue =~ /Vine\\sLinux\\s6\\.1/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+6\\.1\\s+/i) { print "oscheck='Vine Linux'\\n"; } elsif (\$etc_issue =~ /Vine\\sLinux\\s6\\.2/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+6\\.2\\s+/i) { print "oscheck='Vine Linux'\\n"; } elsif (\$etc_issue =~ /Vine\\sLinux\\s7\\.0/i || \`cat /etc/vine-release 2>&1\` =~ /Vine\\s+Linux\\s+7\\.0\\s+/i) { print "oscheck='Vine Linux'\\n"; } elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+1.0\\s+/i) { print "oscheck='Pardus Linux'\\n"; } elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2007\\s+/i) { print "oscheck='Pardus Linux'\\n"; } elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2007.1\\s+/i) { print "oscheck='Pardus Linux'\\n"; } elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2007.2\\s+/i) { print "oscheck='Pardus Linux'\\n"; } elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2007.3\\s+/i) { print "oscheck='Pardus Linux'\\n"; } elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2008\\s+/i) { print "oscheck='Pardus Linux'\\n"; } elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2008.1\\s+/i) { print "oscheck='Pardus Linux'\\n"; } elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2008.2\\s+/i) { print "oscheck='Pardus Linux'\\n"; } elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2009\\s+/i) { print "oscheck='Pardus Linux'\\n"; } elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2009.1\\s+/i) { print "oscheck='Pardus Linux'\\n"; } elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2009.2\\s+/i) { print "oscheck='Pardus Linux'\\n"; } elsif (\`cat /etc/pardus-release 2>/dev/null\` =~ /Pardus\\s+2011\\s+/i) { print "oscheck='Pardus Linux'\\n"; } elsif (\$uname =~ /SunOS.*\\s5\\.5\\.1\\s/i) { print "oscheck='Sun Solaris'\\n"; } elsif (\$uname =~ /SunOS.*\\s5\\.6\\s/i) { print "oscheck='Sun Solaris'\\n"; } elsif (\$uname =~ /SunOS.*\\s5\\.(\\S+)\\s/i) { print "oscheck='Sun Solaris'\\n"; } elsif (\$etc_issue =~ /Lycoris Desktop/i) { print "oscheck='Lycoris Desktop/LX'\\n"; } elsif (\$etc_issue =~ /OpenLinux.*eServer.*\\n.*\\s2\\.3\\s/i) { print "oscheck='Caldera OpenLinux eServer'\\n"; } elsif (\$etc_issue =~ /OpenLinux.*\\n.*\\s2\\.3\\s/i) { print "oscheck='Caldera OpenLinux'\\n"; } elsif (\$etc_issue =~ /OpenLinux.*\\n.*\\s2\\.4\\s/i) { print "oscheck='Caldera OpenLinux'\\n"; } elsif (\$etc_issue =~ /OpenLinux.*\\n.*\\s2\\.5\\s/i || \$etc_issue =~ /Caldera.*2000/i) { print "oscheck='Caldera OpenLinux'\\n"; } elsif (\$etc_issue =~ /OpenLinux.*3\\.1/i) { print "oscheck='Caldera OpenLinux'\\n"; } elsif (\$etc_issue =~ /OpenLinux.*3\\.2/i) { print "oscheck='Caldera OpenLinux'\\n"; } elsif (\`cat /etc/asianux-release 2>/dev/null\` =~ /Asianux\\s+Server\\s+(\\d+)/i) { print "oscheck='Asianux Server'\\n"; } elsif (\`cat /etc/asianux-release 2>/dev/null\` =~ /Asianux\\s+release\\s+(\\d+\\.\\d+)/i) { print "oscheck='Asianux'\\n"; } elsif (\`cat /etc/whitebox-release 2>/dev/null\` =~ /White\\s+Box\\s+Enterprise\\s+Linux\\s+release\\s+(\\S+)/i) { print "oscheck='Whitebox Linux'\\n"; } elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /Tao\\s+Linux\\s+release\\s+(\\S+)/i) { print "oscheck='Tao Linux'\\n"; } elsif (\`cat /etc/centos-release /etc/redhat-release 2>/dev/null\` =~ /CentOS\\s+release\\s+(\\S+)/i && \$1 < 4) { print "oscheck='CentOS Linux'\\n"; } elsif (\`cat /etc/centos-release /etc/redhat-release 2>/dev/null\` =~ /CentOS\\s+(Linux\\s+)?release\\s+(\\S+)/i && \$2 >= 4) { print "oscheck='CentOS Linux'\\n"; } elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /Scientific\\s+Linux.*\\s+release\\s+(\\S+)/i && \$1 < 4) { print "oscheck='Scientific Linux'\\n"; } elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /Scientific\\s+Linux.*\\s+release\\s+(\\S+)/i && \$1 >= 4 && \$1 < 6) { print "oscheck='Scientific Linux'\\n"; } elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /Scientific\\s+Linux.*\\s+release\\s+(\\S+)/i && \$1 >= 6) { print "oscheck='Scientific Linux'\\n"; } elsif (\`cat /etc/redhtat-release 2>/dev/null\` =~ /Gralinux\\s+(ES|AS|WS)\\s+release\\s+(\\d+)/i) { print "oscheck='Gralinux'\\n"; } elsif (\`cat /etc/neoshine-release 2>/dev/null\` =~ /NeoShine\\s+Linux.*release\\s+(\\d+)/i) { print "oscheck='NeoShine Linux'\\n"; } elsif (\`cat /etc/endian-release 2>/dev/null\` =~ /release\\s+(\\S+)/) { print "oscheck='Endian Firewall Linux'\\n"; } elsif (\`cat /etc/enterprise-release 2>/dev/null\` =~ /Enterprise.*Linux\\s+Enterprise\\s+Linux\\s+Server\\s+release\\s+(\\d+)/i) { print "oscheck='Oracle Enterprise Linux'\\n"; } elsif (\`cat /etc/ovs-release 2>/dev/null\` =~ /Oracle.*VM\\s+server\\s+release\\s+(\\d+)/i) { print "oscheck='Oracle VM'\\n"; } elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /XenServer\\s+release\\s+5\\./) { print "oscheck='XenServer Linux'\\n"; } elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /(Advanced\\s+Server.*2\\.1)|(AS.*2\\.1)/i) { print "oscheck='Redhat Enterprise Linux'\\n"; } elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /ES.*2\\.1/) { print "oscheck='Redhat Enterprise Linux'\\n"; } elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /WS.*2\\.1/) { print "oscheck='Redhat Enterprise Linux'\\n"; } elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /(3\\.0AS)|(2\\.9\\.5AS)|(AS\\s+release\\s+3)/i) { print "oscheck='Redhat Enterprise Linux'\\n"; } elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /(ES|AS|WS)\\s+release\\s+(\\S+)/) { print "oscheck='Redhat Enterprise Linux'\\n"; } elsif (\`cat /etc/redhat-release 2>/dev/null\` =~ /Red.*Hat\\s+Enterprise\\s+Linux\\s+(Server|Client)\\s+release\\s+(\\d+)/i) { print "oscheck='Redhat Enterprise Linux'\\n"; } elsif (\`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) { print "oscheck='Redhat Linux Desktop'\\n"; } elsif (\`cat /etc/alphacore-release 2>/dev/null\` =~ /Alpha\\s*Core\\s+release\\s+(\\S+)\\s/i) { print "oscheck='AlphaCore Linux'\\n"; } elsif (\`cat /etc/redhat-release /etc/fedora-release 2>/dev/null\` =~ /X\\/OS.*release\\s(\\S+)\\s/i) { print "oscheck='X/OS Linux'\\n"; } elsif (\`cat /etc/Haansoft-release 2>/dev/null\` =~ /Haansoft\\s+Linux\\s+OS\\s+release\\s+(\\S+)/i) { print "oscheck='Haansoft Linux'\\n"; } elsif (\`cat /etc/caos-release 2>/dev/null\` =~ /release\\s+(\\S+)/i) { print "oscheck='cAos Linux'\\n"; } elsif (\`cat /etc/wrs-release 2>/dev/null\` =~ /Wind\\s+River\\s+Linux\\s+3\\.0/) { print "oscheck='Wind River Linux'\\n"; } elsif (\`cat /etc/wrs-release 2>/dev/null\` =~ /Wind\\s+River\\s+Linux\\s+2\\.0/) { print "oscheck='Wind River Linux'\\n"; } elsif (\`cat /etc/system-release 2>/dev/null\` =~ /Amazon\\s+Linux.*\\s2011/) { print "oscheck='Amazon Linux'\\n"; } elsif (\`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/) { print "oscheck='Redhat Linux'\\n"; } elsif (\`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) { print "oscheck='Redhat Linux'\\n"; } elsif (\`cat /tmp/wd/version 2>/dev/null\` =~ /2\\.1\\.0/) { print "oscheck='White Dwarf Linux'\\n"; } elsif (\`cat /etc/slamd64-version 2>/dev/null\` =~ /\\s([0-9\\.]+)/) { print "oscheck='Slamd64 Linux'\\n"; } elsif (\`cat /etc/slackware-version 2>/dev/null\` =~ /Slackware ([0-9\\.]+)/i) { print "oscheck='Slackware Linux'\\n"; } elsif (\$etc_issue =~ /Xandros.*\\s2\\.0/i) { print "oscheck='Xandros Linux'\\n"; } elsif (\$etc_issue =~ /Xandros.*\\s3\\.0/i) { print "oscheck='Xandros Linux'\\n"; } elsif (\$etc_issue =~ /Xandros.*\\s(4\\.\\d+)/i) { print "oscheck='Xandros Linux'\\n"; } elsif (\$etc_issue =~ /APLINUX.*1\\.3/i) { print "oscheck='APLINUX'\\n"; } elsif (\`cat /etc/bigblock-revision 2>/dev/null\` =~ /Version:\\s(1[0-9\\.-]+)\\s/i) { print "oscheck='BigBlock'\\n"; } elsif (\`cat /etc/bigblock-revision 2>/dev/null\` =~ /Version:\\s(2[0-9\\.-]+)\\s/i) { print "oscheck='BigBlock'\\n"; } elsif (\$etc_issue =~ /Ubuntu.*\\sgutsy/i) { print "oscheck='Ubuntu Linux'\\n"; } elsif (\$etc_issue =~ /Ubuntu.*\\s(7\\.[0-9\\.]+)\\s/i) { print "oscheck='Ubuntu Linux'\\n"; } elsif (\$etc_issue =~ /Ubuntu.*\\s(8\\.[0-9\\.]+)\\s/i) { print "oscheck='Ubuntu Linux'\\n"; } elsif (\$etc_issue =~ /Ubuntu.*\\s(9\\.[0-9\\.]+)\\s/i) { print "oscheck='Ubuntu Linux'\\n"; } elsif (\$etc_issue =~ /Ubuntu.*\\s(10\\.[0-9\\.]+)\\s/i) { print "oscheck='Ubuntu Linux'\\n"; } elsif (\$etc_issue =~ /Ubuntu.*\\s(11\\.[0-9\\.]+)\\s/i || \$etc_issue =~ /Ubuntu\\s+natty/i) { print "oscheck='Ubuntu Linux'\\n"; } elsif (\$etc_issue =~ /Ubuntu.*\\s([0-9\\.]+)\\s/i) { print "oscheck='Ubuntu Linux'\\n"; } elsif (\$etc_issue =~ /MEPIS/ && \`cat /etc/debian_version 2>/dev/null\` =~ /([0-9\\.]+)/) { print "oscheck='Mepis Linux'\\n"; } elsif (\$etc_issue =~ /MEPIS/ && \`cat /etc/debian_version 2>/dev/null\` =~ /(stable)/) { print "oscheck='Mepis Linux'\\n"; } elsif (\$etc_issue =~ /Debian.*\\s([0-9\\.]+)\\s/i || \`cat /etc/debian_version 2>/dev/null\` =~ /([0-9\\.]+)/) { print "oscheck='Debian Linux'\\n"; } elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(hamm)/i) { print "oscheck='Debian Linux'\\n"; } elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(slink)/i) { print "oscheck='Debian Linux'\\n"; } elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(potato)/i) { print "oscheck='Debian Linux'\\n"; } elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(woody)/i) { print "oscheck='Debian Linux'\\n"; } elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(sarge)/i) { print "oscheck='Debian Linux'\\n"; } elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(etch)/i) { print "oscheck='Debian Linux'\\n"; } elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(lenny)/i) { print "oscheck='Debian Linux'\\n"; } elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(squeeze)/i) { print "oscheck='Debian Linux'\\n"; } elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(wheezy)/i) { print "oscheck='Debian Linux'\\n"; } elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(stable)/i) { print "oscheck='Debian Linux'\\n"; } elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(testing)/i) { print "oscheck='Debian Linux'\\n"; } elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(unstable)/i) { print "oscheck='Debian Linux'\\n"; } elsif (\`cat /etc/debian_version 2>/dev/null\` =~ /^(sid)/i) { print "oscheck='Debian Linux'\\n"; } elsif (\`cat /etc/SLOX-release 2>/dev/null\` =~ /VERSION\\s+=\\s+(\\S+)/i) { print "oscheck='SuSE OpenExchange Linux'\\n"; } elsif (\$etc_issue =~ /SuSE\\s+SLES-(\\S+)/i) { print "oscheck='SuSE SLES Linux'\\n"; } elsif (\`cat /etc/SuSE-release 2>/dev/null\` =~ /([0-9\\.]+)/ || \$etc_issue =~ /SuSE\\s+Linux\\s+(\\S+)\\s/i) { print "oscheck='SuSE Linux'\\n"; } elsif (\`cat /etc/UnitedLinux-release 2>/dev/null\` =~ /([0-9\\.]+)/) { print "oscheck='United Linux'\\n"; } elsif (\$etc_issue =~ /Corel\\s+LINUX\\s+(\\S+)/i) { print "oscheck='Corel Linux'\\n"; } elsif (\`cat /etc/turbolinux-release 2>/dev/null\` =~ /([0-9\\.]+)/i) { print "oscheck='TurboLinux'\\n"; } elsif (\$etc_issue =~ /Cobalt\\s+Linux\\s+release\\s+(\\S+)/i || \`cat /etc/cobalt-release 2>/dev/null\` =~ /([0-9\\.]+)/) { print "oscheck='Cobalt Linux'\\n"; } elsif (\`uname -r\` =~ /2.2.16/ && -r "/etc/cobalt-release") { print "oscheck='Cobalt Linux'\\n"; } elsif (\$etc_issue =~ /Mandrake\\s+Corporate\\s+Server\\s+release\\s+1\\.0/i) { print "oscheck='Mandrake Linux Corporate Server'\\n"; } elsif (\`cat /etc/mandrake-release 2>/dev/null\` =~ /pclinuxos\\s+Linux\\s+release\\s+2005/i) { print "oscheck='pclinuxos Linux'\\n"; } elsif (\`cat /etc/mandrake-release 2>/dev/null\` =~ /pclinuxos\\s+Linux\\s+release\\s+2006/i) { print "oscheck='pclinuxos Linux'\\n"; } elsif (\`cat /etc/mandrake-release 2>/dev/null\` =~ /PCLinuxOS\\s+release\\s+2007/i) { print "oscheck='pclinuxos Linux'\\n"; } elsif (\`cat /etc/mandrake-release 2>/dev/null\` =~ /PCLinuxOS\\s+release\\s+2008/i) { print "oscheck='pclinuxos Linux'\\n"; } elsif (\`cat /etc/mandrake-release 2>/dev/null\` =~ /PCLinuxOS\\s+release\\s+2009/i) { print "oscheck='pclinuxos Linux'\\n"; } elsif (\$etc_issue =~ /Mandrake\\s+release\\s+5\\.3/i) { print "oscheck='Mandrake Linux'\\n"; } elsif (\$etc_issue =~ /Mandrake\\s+release\\s+6\\.0/i) { print "oscheck='Mandrake Linux'\\n"; } elsif (\$etc_issue =~ /Mandrake\\s+release\\s+6\\.1/i) { print "oscheck='Mandrake Linux'\\n"; } elsif (\$etc_issue =~ /Mandrake\\s+release\\s+7\\.0/i) { print "oscheck='Mandrake Linux'\\n"; } elsif (\$etc_issue =~ /Mandrake\\s+release\\s+7\\.1/i) { print "oscheck='Mandrake Linux'\\n"; } elsif (\`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) { print "oscheck='Mandrake Linux'\\n"; } elsif (\$etc_issue =~ /(Mandrakelinux|Mandriva).*(2006\\.\\d+)/i || \`cat /etc/mandrake-release 2>/dev/null\` =~ /(Mandrakelinux|Mandriva).*(2007\\.\\d+)/i) { print "oscheck='Mandriva Linux'\\n"; } elsif (\$etc_issue =~ /(Mandrakelinux|Mandriva).*(2007\\.\\d+)/i || \`cat /etc/mandrake-release 2>/dev/null\` =~ /(Mandrakelinux|Mandriva).*(2007\\.\\d+)/i) { print "oscheck='Mandriva Linux'\\n"; } elsif (\$etc_issue =~ /(Mandrakelinux|Mandriva).*(2008\\.\\d+)/i || \`cat /etc/mandrake-release 2>/dev/null\` =~ /(Mandrakelinux|Mandriva).*(2008\\.\\d+)/i) { print "oscheck='Mandriva Linux'\\n"; } elsif (\$etc_issue =~ /(Mandrakelinux|Mandriva).*(2009\\.\\d+)/i || \`cat /etc/mandrake-release 2>/dev/null\` =~ /(Mandrakelinux|Mandriva).*(2009\\.\\d+)/i) { print "oscheck='Mandriva Linux'\\n"; } elsif (\$etc_issue =~ /(Mandriva).*(20\\d\\d\\.\\d+)/i || \`cat /etc/mandriva-release 2>/dev/null\` =~ /(Mandriva).*(20\\d\\d\\.\\d+)/i) { print "oscheck='Mandriva Linux'\\n"; } elsif (\$etc_issue =~ /Mandrake\\s+Linux\\s+Corporate\\s+Server\\s+release\\s+([0-9\\.]+)/i) { print "oscheck='Mandrake Linux Corporate Server'\\n"; } elsif (\$etc_issue =~ /Mandriva\\s+Linux\\s+Enterprise\\s+Server\\s+release\\s+5\\.0\\s+\\(Official\\)\\s+for\\s+(i586|x86_64)/i) { print "oscheck='Mandriva Linux Enterprise Server'\\n"; } elsif (\$etc_issue =~ /Conectiva.*Linux.*3\\.0/i) { print "oscheck='Conectiva Linux'\\n"; } elsif (\$etc_issue =~ /Conectiva.*Linux.*4\\.0/i) { print "oscheck='Conectiva Linux'\\n"; } elsif (\$etc_issue =~ /Conectiva.*Linux.*4\\.1/i) { print "oscheck='Conectiva Linux'\\n"; } elsif (\$etc_issue =~ /Conectiva.*Linux.*4\\.2/i) { print "oscheck='Conectiva Linux'\\n"; } elsif (\$etc_issue =~ /Conectiva.*Linux.*5\\.0/i) { print "oscheck='Conectiva Linux'\\n"; } elsif (\$etc_issue =~ /Conectiva.*Linux.*5\\.1/i) { print "oscheck='Conectiva Linux'\\n"; } elsif (\$etc_issue =~ /Conectiva.*Linux.*6\\.0/i) { print "oscheck='Conectiva Linux'\\n"; } elsif (\$etc_issue =~ /Conectiva.*Linux.*7\\.0/i) { print "oscheck='Conectiva Linux'\\n"; } elsif (\$etc_issue =~ /Conectiva.*Linux.*\\s8/i) { print "oscheck='Conectiva Linux'\\n"; } elsif (\$etc_issue =~ /Conectiva.*Linux.*\\s9/i) { print "oscheck='Conectiva Linux'\\n"; } elsif (\$etc_issue =~ /Conectiva.*Linux.*\\s10\\s/i) { print "oscheck='Conectiva Linux'\\n"; } elsif (\$etc_issue =~ /Thiz.*Linux.*\\s5\\.0/i) { print "oscheck='ThizLinux Desktop'\\n"; } elsif (\$etc_issue =~ /Thiz.*Linux.*\\s6\\.0/i) { print "oscheck='ThizLinux Desktop'\\n"; } elsif (\$etc_issue =~ /Thiz.*Linux.*\\s6\\.2/i) { print "oscheck='ThizLinux Desktop'\\n"; } elsif (\$etc_issue =~ /Thiz.*Linux.*\\s7\\.0/i) { print "oscheck='ThizLinux Desktop'\\n"; } elsif (\$etc_issue =~ /Thiz.*\\s?Server.*\\s4\\.3/i) { print "oscheck='ThizServer'\\n"; } elsif (\$etc_issue =~ /Thiz.*\\s?Server.*\\s6\\.0/i) { print "oscheck='ThizServer'\\n"; } elsif (\$etc_issue =~ /Thiz.*\\s?Server.*\\s7\\.0/i) { print "oscheck='ThizServer'\\n"; } elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2001.*January/i || \$etc_issue =~ /2001.*January/i) { print "oscheck='MSC Linux'\\n"; } elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2001.*February/i || \$etc_issue =~ /2001.*February/i) { print "oscheck='MSC Linux'\\n"; } elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2001.*May/i || \$etc_issue =~ /2001.*May/i) { print "oscheck='MSC Linux'\\n"; } elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2001.*June/i || \$etc_issue =~ /2001.*June/i) { print "oscheck='MSC Linux'\\n"; } elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2001.*August/i || \$etc_issue =~ /2001.*August/i) { print "oscheck='MSC Linux'\\n"; } elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2002.*February/i || \$etc_issue =~ /2002.*February/i) { print "oscheck='MSC Linux'\\n"; } elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2002.*March/i || \$etc_issue =~ /2002.*March/i) { print "oscheck='MSC Linux'\\n"; } elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2002.*May/i || \$etc_issue =~ /2002.*May/i) { print "oscheck='MSC Linux'\\n"; } elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2002.*July/i || \$etc_issue =~ /2002.*July/i) { print "oscheck='MSC Linux'\\n"; } elsif (\`cat /etc/msclinux-release 2>/dev/null\` =~ /2002.*Nov/i || \$etc_issue =~ /2002.*Nov/i) { print "oscheck='MSC Linux'\\n"; } elsif (\`cat /etc/scilinux-relase 2>/dev/null\` =~ /2003.*Summer/i) { print "oscheck='SCI Linux'\\n"; } elsif (\`cat /etc/scilinux-relase 2>/dev/null\` =~ /2004.*Summer/i) { print "oscheck='SCI Linux'\\n"; } elsif (\`cat /etc/scilinux-relase 2>/dev/null\` =~ /2005.*Summer/i) { print "oscheck='SCI Linux'\\n"; } elsif (\$etc_issue =~ /LinuxPPC\\s+2000/i) { print "oscheck='LinuxPPC'\\n"; } elsif (\$etc_issue =~ /Trustix.*Enterprise.*([0-9\\.]+)/i) { print "oscheck='Trustix SE'\\n"; } elsif (\$etc_issue =~ /Trustix.*1\\.1/i) { print "oscheck='Trustix'\\n"; } elsif (\$etc_issue =~ /Trustix.*1\\.2/i) { print "oscheck='Trustix'\\n"; } elsif (\$etc_issue =~ /Trustix.*1\\.5/i) { print "oscheck='Trustix'\\n"; } elsif (\$etc_issue =~ /Trustix.*\\s([0-9\\.]+)/i) { print "oscheck='Trustix'\\n"; } elsif (\$etc_issue =~ /Tawie\\s+Server\\s+Linux.*([0-9\\.]+)/i) { print "oscheck='Tawie Server Linux'\\n"; } elsif (\$etc_issue =~ /tinysofa.*release\\s+1\\.0/i) { print "oscheck='TinySofa Linux'\\n"; } elsif (\`cat /etc/tinysofa-release 2>/dev/null\` =~ /classic.*release\\s+2\\.0/i) { print "oscheck='TinySofa Linux'\\n"; } elsif (\`cat /etc/tinysofa-release 2>/dev/null\` =~ /enterprise.*release\\s+2\\.0/i) { print "oscheck='TinySofa Linux'\\n"; } elsif (\$etc_issue =~ /Cendio\\s*LBS.*\\s3\\.1/i || \`cat /etc/lbs-release 2>/dev/null\` =~ /3\\.1/) { print "oscheck='Cendio LBS Linux'\\n"; } elsif (\$etc_issue =~ /Cendio\\s*LBS.*\\s3\\.2/i || \`cat /etc/lbs-release 2>/dev/null\` =~ /3\\.2/) { print "oscheck='Cendio LBS Linux'\\n"; } elsif (\$etc_issue =~ /Cendio\\s*LBS.*\\s3\\.3/i || \`cat /etc/lbs-release 2>/dev/null\` =~ /3\\.3/) { print "oscheck='Cendio LBS Linux'\\n"; } elsif (\$etc_issue =~ /Cendio\\s*LBS.*\\s4\\.0/i || \`cat /etc/lbs-release 2>/dev/null\` =~ /4\\.0/) { print "oscheck='Cendio LBS Linux'\\n"; } elsif (\$etc_issue =~ /Cendio\\s*LBS.*\\s4\\.1/i || \`cat /etc/lbs-release 2>/dev/null\` =~ /4\\.1/) { print "oscheck='Cendio LBS Linux'\\n"; } elsif (\`cat /etc/ute-release 2>/dev/null\` =~ /Ute\\s+Linux\\s+release\\s+1\\.0/i) { print "oscheck='Ute Linux'\\n"; } elsif (\$etc_issue =~ /Lanthan\\s+Linux\\s+release\\s+1\\.0/i || \`cat /etc/lanthan-release 2>/dev/null\` =~ /1\\.0/) { print "oscheck='Lanthan Linux'\\n"; } elsif (\$etc_issue =~ /Lanthan\\s+Linux\\s+release\\s+2\\.0/i || \`cat /etc/lanthan-release 2>/dev/null\` =~ /2\\.0/) { print "oscheck='Lanthan Linux'\\n"; } elsif (\$etc_issue =~ /Lanthan\\s+Linux\\s+release\\s+3\\.0/i || \`cat /etc/lanthan-release 2>/dev/null\` =~ /3\\.0/) { print "oscheck='Lanthan Linux'\\n"; } elsif (\$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) { print "oscheck='Yellow Dog Linux'\\n"; } elsif (\$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) { print "oscheck='Yellow Dog Linux'\\n"; } elsif (\$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) { print "oscheck='Yellow Dog Linux'\\n"; } elsif (\$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) { print "oscheck='Yellow Dog Linux'\\n"; } elsif (\$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) { print "oscheck='Yellow Dog Linux'\\n"; } elsif (\$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) { print "oscheck='Yellow Dog Linux'\\n"; } elsif (\`cat /etc/latinux-release 2>/dev/null\` =~ /Latinux\\s+8\\s/i) { print "oscheck='Corvus Latinux'\\n"; } elsif (\$etc_issue =~ /Immunix.*\\s([0-9\\.]+)/i || \`cat /etc/immunix-release 2>/dev/null\` =~ /([0-9\\.]+)/) { print "oscheck='Immunix Linux'\\n"; } elsif (-d "/usr/portage") { print "oscheck='Gentoo Linux'\\n"; } elsif (\`cat /etc/securelinux-release 2>/dev/null\` =~ /SecureLinux.*1\\.0/i) { print "oscheck='Secure Linux'\\n"; } elsif (\`cat /etc/openna-release 2>/dev/null\` =~ /release\\s+1\\.0\\s/i) { print "oscheck='OpenNA Linux'\\n"; } elsif (\`cat /etc/openna-release 2>/dev/null\` =~ /release\\s+2\\.0\\s/i) { print "oscheck='OpenNA Linux'\\n"; } elsif (-r "/etc/antitachyon-distribution" && \`uname -r\` =~ /2\\.4\\./) { print "oscheck='SoL Linux'\\n"; } elsif (-r "/etc/antitachyon-distribution" && \`uname -r\` =~ /2\\.6\\./) { print "oscheck='SoL Linux'\\n"; } elsif (\$etc_issue =~ /coherent\\s*technology.*\\s([0-9\\.]+)/i || \`cat /etc/coherent-release 2>/dev/null\` =~ /([0-9\\.]+)/ ) { print "oscheck='Coherent Technology Linux'\\n"; } elsif (\$etc_issue =~ /PS2\\s+Linux\\s+release\\s+1.0/i) { print "oscheck='Playstation Linux'\\n"; } elsif (\`cat /etc/startcom-release 2>/dev/null\` =~ /([0-9\\.]+)/) { print "oscheck='StartCom Linux'\\n"; } elsif (\`cat /etc/yoper-release 2>/dev/null\` =~ /Yoper\\s+Linux\\s+2.0/i) { print "oscheck='Yoper Linux'\\n"; } elsif (\`cat /etc/yoper-release 2>/dev/null\` =~ /Yoper\\s+Linux\\s+2.1/i) { print "oscheck='Yoper Linux'\\n"; } elsif (\`cat /etc/yoper-release 2>/dev/null\` =~ /Yoper\\s+Linux\\s+2.2/i) { print "oscheck='Yoper Linux'\\n"; } elsif (\`cat /etc/CxM-release 2>/dev/null\` =~ /8\\.1/ || \$etc_issue =~ /Caixa\\s+8\\.1\\s/i) { print "oscheck='Caixa Magica'\\n"; } elsif (\`cat /etc/CxM-release 2>/dev/null\` =~ /10\\.0/ || \$etc_issue =~ /Caixa\\s+10\\.0\\s/i) { print "oscheck='Caixa Magica'\\n"; } elsif (\`cat /etc/openmamba-release 2>/dev/null\` =~ /openmamba\\s+release\\s+(\\S+)/i) { print "oscheck='openmamba Linux'\\n"; } elsif (\$uname =~ /FreeBSD.*?\\s([0-9]+\\.[0-9\\.]+)/i) { print "oscheck='FreeBSD'\\n"; } elsif (\$uname =~ /DragonFly.*?\\s1\\.0A/i) { print "oscheck='DragonFly BSD'\\n"; } elsif (\$uname =~ /DragonFly.*?\\s1\\.2A/i) { print "oscheck='DragonFly BSD'\\n"; } elsif (\$uname =~ /OpenBSD.*?\\s([0-9\\.]+)/i) { print "oscheck='OpenBSD'\\n"; } elsif (\$uname =~ /NetBSD.*1\\.5/i) { print "oscheck='NetBSD'\\n"; } elsif (\$uname =~ /NetBSD.*1\\.6/i) { print "oscheck='NetBSD'\\n"; } elsif (\$uname =~ /NetBSD.*2\\.0/i) { print "oscheck='NetBSD'\\n"; } elsif (\$uname =~ /NetBSD.*3\\.0/i) { print "oscheck='NetBSD'\\n"; } elsif (\$uname =~ /NetBSD.*4\\.0/i) { print "oscheck='NetBSD'\\n"; } elsif (\`uname\` =~ /NetBSD/ && \`uname -r\` =~ /([\\d.]+)/) { print "oscheck='NetBSD'\\n"; } elsif (\$uname =~ /BSDI.*\\s([0-9\\.]+)/i) { print "oscheck='BSDI'\\n"; } elsif (\$uname =~ /HP-UX.*(1[01]\\.[0-9\\.]+)/) { print "oscheck='HP/UX'\\n"; } elsif (\$uname =~ /IRIX.*([0-9]+\\.[0-9]+)/i) { print "oscheck='SGI Irix'\\n"; } elsif (\$uname =~ /OSF1.*4\\.0/) { print "oscheck='DEC/Compaq OSF/1'\\n"; } elsif (\$uname =~ /OSF1.*V5.1/) { print "oscheck='DEC/Compaq OSF/1'\\n"; } elsif (\$uname =~ /AIX\\s+\\S+\\s+(\\d+)\\s+(\\d+)\\s+/i) { print "oscheck='IBM AIX'\\n"; } elsif (\$uname =~ /SCO_SV.*\\s5\\./i) { print "oscheck='SCO OpenServer'\\n"; } elsif (\$uname =~ /SCO_SV.*\\s6\\./i) { print "oscheck='SCO OpenServer'\\n"; } elsif (\`sw_vers 2>/dev/null\` =~ /ProductVersion:\\s+10\\.0/i) { print "oscheck='Mac OS X'\\n"; } elsif (\`sw_vers 2>/dev/null\` =~ /ProductVersion:\\s+10\\.1/i) { print "oscheck='Mac OS X'\\n"; } elsif (\`sw_vers 2>/dev/null\` =~ /ProductVersion:\\s+10\\.2/i) { print "oscheck='Mac OS X'\\n"; } elsif (\`sw_vers 2>/dev/null\` =~ /ProductVersion:\\s+10\\.3/i) { print "oscheck='Mac OS X'\\n"; } elsif (\`sw_vers 2>/dev/null\` =~ /ProductVersion:\\s+10\\.4/i) { print "oscheck='Mac OS X'\\n"; } elsif (\`sw_vers 2>/dev/null\` =~ /ProductVersion:\\s+10\\.5/i) { print "oscheck='Mac OS X'\\n"; } elsif (\$uname =~ /Darwin.*\\s([0-9\\.]+)/) { print "oscheck='Darwin'\\n"; } elsif (\`cat /etc/SuSE-release 2>/dev/null\` =~ /Java Desktop System.*\\nVERSION = 1\\.0/i) { print "oscheck='Sun Java Desktop System'\\n"; } elsif (\`cat /etc/SuSE-release 2>/dev/null\` =~ /Java Desktop System.*\\nVERSION = 2\\.0/i) { print "oscheck='Sun Java Desktop System'\\n"; } elsif (\`cat /etc/SuSE-release 2>/dev/null\` =~ /Java Desktop System.*\\nVERSION = 3\\.0/i) { print "oscheck='Sun Java Desktop System'\\n"; } elsif (\$uname =~ /SunOS.*\\s5\\.9\\s/i && \`cat /etc/sun-release 2>/dev/null\` =~ /Sun\\s+Java\\s+Desktop/) { print "oscheck='Sun Java Desktop System'\\n"; } elsif (\`uname -r\` =~ /2\\.0\\./) { print "oscheck='Generic Linux'\\n"; } elsif (\`uname -r\` =~ /2\\.2\\./) { print "oscheck='Generic Linux'\\n"; } elsif (\`uname -r\` =~ /2\\.4\\./) { print "oscheck='Generic Linux'\\n"; } elsif (\`uname -r\` =~ /2\\.4\\./) { print "oscheck='Generic Linux'\\n"; } elsif (\`uname -r\` =~ /2\\.6\\./) { print "oscheck='Generic Linux'\\n"; } elsif (\`uname -r\` =~ /2\\.7\\./) { print "oscheck='Generic Linux'\\n"; } elsif ((-d "c:/windows" || -d "c:/winnt") && \`ver\` =~ /XP/) { print "oscheck='Windows'\\n"; } elsif ((-d "c:/windows" || -d "c:/winnt") && \`ver\` =~ /2000/) { print "oscheck='Windows'\\n"; } elsif ((-d "c:/windows" || -d "c:/winnt") && \`ver\` =~ /2003|\\s5\\.2/) { print "oscheck='Windows'\\n"; } EOD . /$$.check rm -f /$$.check if [ ! -r /etc/webmin/config ]; then if [ "$oscheck" = "" ]; then echo Unable to identify operating system exit 2 fi echo Operating system is $oscheck if [ "$WEBMIN_PORT" != "" ]; then port=$WEBMIN_PORT else port=10000 fi 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 if [ "$?" != "0" ]; then echo Port $port is already in use exit 2 fi fi # Save /etc/webmin in case the upgrade trashes it if [ "$1" != 1 ]; then rm -rf /etc/.webmin-backup cp -r /etc/webmin /etc/.webmin-backup fi # Put back old /etc/webmin saved when an RPM was removed if [ "$1" = 1 -a ! -d /etc/webmin -a -d /etc/webmin.rpmsave ]; then mv /etc/webmin.rpmsave /etc/webmin fi /bin/true %post /sbin/chkconfig --add webmin inetd=`grep "^inetd=" /etc/webmin/miniserv.conf 2>/dev/null | sed -e 's/inetd=//g'` startafter=0 if [ "$1" != 1 ]; then # Upgrading the RPM, so stop the old webmin properly if [ "$inetd" != "1" ]; then kill -0 `cat /var/webmin/miniserv.pid 2>/dev/null` 2>/dev/null if [ "$?" = 0 ]; then startafter=1 fi /etc/init.d/webmin stop >/dev/null 2>&1 /tmp/.webmin/webmin-setup.out 2>&1 rm -f /var/lock/subsys/webmin /etc/init.d/webmin start cat >/etc/webmin/uninstall.sh </dev/null 2>&1 if [ "$?" = 0 ]; then # RPM is being removed, and no new version of webmin # has taken it's place. Run uninstalls and stop the server echo "Running uninstall scripts .." (cd /usr/libexec/webmin ; WEBMIN_CONFIG=/etc/webmin WEBMIN_VAR=/var/webmin LANG= /usr/libexec/webmin/run-uninstalls.pl) /etc/init.d/webmin stop >/dev/null 2>&1 /dev/null 2>&1 /dev/null 2>&1 if [ "$?" = 0 ]; then # RPM is being removed, and no new version of webmin # has taken it's place. Rename away the /etc/webmin directory rm -rf /etc/webmin.rpmsave mv /etc/webmin /etc/webmin.rpmsave rm -rf /var/webmin fi fi /bin/true %triggerpostun -- webmin if [ ! -d /var/webmin -a "$1" = 2 ]; then echo Re-creating /var/webmin directory mkdir /var/webmin fi if [ ! -r /etc/webmin/miniserv.conf -a -d /etc/.webmin-backup -a "$1" = 2 ]; then echo Recovering /etc/webmin directory rm -rf /etc/.webmin-broken mv /etc/webmin /etc/.webmin-broken mv /etc/.webmin-backup /etc/webmin /etc/init.d/webmin stop >/dev/null 2>&1 /dev/null 2>&1 1.560-1 - updated to 1.560 - updated Patch0, Source12 - updated %%pre script - added URL, Vendor and Distribution tag * Sat Jun 6 2009 Ryoichi INAGAKI 1.470-1 - applied new versioning policy, spec in UTF-8 - updated Patch0 and spec files for Vine Linux 5.0 - updated SOURCE11 * Thu Dec 27 2007 Kazutaka HARADA 1.290-0vl2 - updated Patch0 and spec files for Vine Linux 4.2 - don't redirect messages when start/stop webmin at %%post, %%preun and %%postun. * Sat Sep 16 2006 Ryoichi INAGAKI 1.290-0vl1 - new upstream release - changed Group to Applications/Administration - updated Patch0 and spec files for Vine Linux 4.0 * Fri Jun 23 2006 Daisuke SUZUKI 1.280-0vl1 - new upstream release * Thu Sep 8 2005 Ryoichi INAGAKI 1.180-0vl3 - fixed Patch0 (restart section in /etc/rc.d/init.d/webmin) * Thu Aug 25 2005 Ryoichi INAGAKI 1.180-0vl2 - updated for Vine 3.2 (Patch0, spec file) * Wed Feb 16 2004 Ryoichi INAGAKI 1.180-0vl1 - new upstream release - updated Patch0 for Vine3.1 - s/Copyright/License/ - changed Group: * Tue Feb 25 2003 Daisuke SUZUKI 1.070-0vl1 - new upstream release - [SECURITY FIX] * Wed Oct 30 2002 Daisuke SUZUKI 1.000-1vl7 - change restart behavior in /etc/init.d/webmin. * Wed Oct 30 2002 Daisuke SUZUKI 1.000-1vl6 - fix /etc/init.d/webmin replace webmin root password as real password, when it is null(like root::0). * Sun Oct 27 2002 Daisuke SUZUKI 1.000-1vl5 - add allow=127.0.0.1 to miniserv.conf - add some configuration check in /etc/init.d/webmin * Sun Oct 27 2002 Daisuke SUZUKI 1.000-1vl4 - fixed security bug. - add adhoc script to replace null root password in miniserv.users with real password. * Tue Oct 08 2002 FUJIOKA Takeyuki 1.000-1vl3 - added some third party module. (netatalk,iptables,ipchains and the patch.) * Mon Oct 07 2002 Daisuke SUZUKI 1.000-1vl2 - fix some patch bug. * Mon Oct 07 2002 Daisuke SUZUKI 1.000-1vl1 - replace lang name (ja -> ja_JP.euc) in config file at %%post script. * Fri Oct 4 2002 FUJIOKA Takeyuki 1.00-0vl0 - updated to 1.00 - added Vine Linux patch (limit default access policy to 'allow=localhost' and SSL.) (Japanese login if LANG=ja_JP.eucJP) ("os_list.txt" to add the dectection of VineLinux) * Sun Mar 31 2002 MATSUBAYASHI Kohji 0.92-0vl3 - added Source12 and Patch7 (netatalk webmin module 0.9) - modified Patch4 for Vine 2.5 and 2.5CR * Sun Mar 03 2002 MATSUBAYASHI Kohji 0.92-0vl2 - stop/start webmin service only if webmin is already running in %%post section * Wed Feb 06 2002 Toru Sagami 0.92-0vl1 - updated to 0.92 and added iptables module - quit replacing quota bind8 sendmail file man modules * Thu Jan 3 2002 Tomoya TAKA 0.91-0vl1 - update to 0.91 - add some updated modules to Webmin 0.91 (cf. http://www.webmin.com/webmin/updates.html) - update ipchains module to 0.83.1 and modify ipchains-Japanese.patch - cleanup spec file * Tue Nov 13 2001 Tomoya TAKA 0.88-0vl3 - remove /etc/webmin/ and /var/webmin/ from %%files * Tue Oct 23 2001 Toru Sagami - 0.88-0vl3: fix for Insecure Temporary File Creation * Sat Sep 15 2001 Toru Sagami - fixed Group s/Application/Applications/ * Thu Sep 13 2001 Toru Sagami - 0.88-0vl1: updated to 0.88 * Fri Sep 07 2001 Toru Sagami - 0.87-0vl3: treatment to use LPRng by default instead of lp * Fri Jul 27 2001 - 0.87-0vl2: webmin starts at 99 and stops at 00 (No reason!) - eliminate noreplace attribute from initscript (NOTE: 'noreplace' may be marked to config file, not to initscript) * Mon Jul 16 2001 - 0.87-0vl1: port to VineSeedPlus from VinePlus/2.1 - two of the patches are slightly modified for 0.87 - slightly modified initscript message * Sat Mar 17 2001 KAJIKI Yoshihiro [0.84-0vl2] - correct ja message of webminlog - security fix on postinstall.sh * Mon Feb 26 2001 KAJIKI Yoshihiro [0.84-0vl1] - update to 0.84 based on the Mandrake 0.84-1mdk - add requires Net::SSLeay - split add-ja-info.sh from Japanese patch * Tue Sep 19 2000 KAJIKI Yoshihiro - update Japanese resource to match with webmin-0.81 - set several access control as default for security * Thu Sep 14 2000 KAJIKI Yoshihiro - change default protocol to SSL, if Net::SSLeay is found - update to webmin-0.81 * Mon Sep 4 2000 KAJIKI Yoshihiro - update Japanese resource (almost compleated except help) * Thu Aug 30 2000 KAJIKI Yoshihiro - update Japanese resource (not compleated yet) - correct default script position of ipchains * Mon Aug 28 2000 KAJIKI Yoshihiro - update Japanese resource (not compleated yet) - correct default language bug - add ipchains module * Thu Aug 24 2000 KAJIKI Yoshihiro - update Japanese resource (not compleated yet) - limit default access policy to 'allow=127.0.0.1' * Mon Aug 21 2000 KAJIKI Yoshihiro - add Japanese resource (not compleated) - add a vine specific patch and remove mdk specific patches - add an ad hoc patch against requiring /usr/local/bin/perl - rebuild for Vine Linux * Wed Jul 19 2000 Guillaume Cottenceau 0.80-6mdk - BM * Tue Jun 20 2000 Guillaume Cottenceau 0.80-5mdk - now uses 0.80 final of Webmin * Wed May 24 2000 Guillaume Cottenceau 0.80-4mdk - more bugfixes in postfix module, after bugreports by Charles * Sat May 20 2000 Guillaume Cottenceau 0.80-3mdk - small bugfix in postfix module * Thu May 18 2000 Guillaume Cottenceau 0.80-2mdk - patched "os_list.txt" to add the dectection of Linux Mandrake Corporate Server 1.0 and Linux Mandrake 7.1 - patched the post-install script which said "Mandrake 7.0" all the time if Webmin was installed during system install * Fri May 5 2000 Guillaume Cottenceau 0.80-1mdk - upgrade to 0.80 beta with the kind help of Jamie, because of incompatibility between 0.79 and perl 5.6 * Wed May 3 2000 Guillaume Cottenceau 0.79-5mdk - updated postfix-mdkmodule so that it tests if postfix is running in a more portable way [uses kill -0 ] - updated install style so that it adds to the runlevel information at install time; thus it's okay now to select/deselect it in DrakX * Thu Apr 20 2000 Guillaume Cottenceau 0.79-4mdk - fixed the hang of post install at boot time [grr] * Wed Apr 19 2000 Guillaume Cottenceau 0.79-3mdk - fixed very bad security issue concerning exec of script during install - added small executable to tell people that they have to connect through their web browser * Mon Apr 17 2000 Guillaume Cottenceau 0.79-2mdk - fixed missing LICENCE file * Fri Apr 14 2000 Guillaume Cottenceau 0.79-1mdk - 0.79 - updated postfix-mdkmodule with bugfixes and other stuff - mdkicons now have a copyright * Thu Apr 6 2000 Guillaume Cottenceau 0.78-2mdk - Updated Mandrake Icons - Updated `PreRequires', and fixed the problem of /etc/issue, in order to not fail in install * Mon Mar 27 2000 Guillaume Cottenceau 0.78-1mdk - Mandrake Icons * Fri Mar 17 2000 Guillaume Cottenceau 0.78-0.4mdk - v0.78 - Postfix Module - cleanup and debug of specfile with help of Chmouel :-) * Thu Feb 10 2000 Lenny Cartier - v0.77 - used srpm provided by Vincent Danen * Tue Feb 8 2000 Vincent Danen - 0.77 - updated specfile based on the webmin source RPM (newly released, nice changes!) - included the 0.73 ocstheme again (does anyone know of an update to this?) * Thu Jan 13 2000 Vincent Danen - 0.76 * Wed Dec 08 1999 Lenny Cartier - new in contribs - used srpm provided by Vincent Danen * Sun Dec 5 1999 Vincent Danen - built specfile for Mandrake contribs - based loosely on Leon Breedt's SRPM for 0.73 - webmin-install.sh is now a source package, not built from patch - bzip sources