diff -urbd webmin-1.170.orig/miniserv.pl webmin-1.170/miniserv.pl --- webmin-1.170.orig/miniserv.pl Tue Apr 6 00:24:06 2004 +++ webmin-1.170/miniserv.pl Fri May 21 03:47:56 2004 @@ -46,12 +46,14 @@ } # Check if the syslog module is available to log hacking attempts +if($^O !~ /os2/i) { if ($config{'syslog'} && !$config{'inetd'}) { eval "use Sys::Syslog qw(:DEFAULT setlogsock)"; if (!$@) { $use_syslog = 1; } } +} # check if the TCP-wrappers module is available if ($config{'libwrap'}) { @@ -393,8 +395,10 @@ } # Split from the controlling terminal +if($^O !~ /os2/i) { if (fork()) { exit; } setsid(); + } # Close standard file handles open(STDIN, "/dev/null | grep foobar >/dev/null - if [ $? != "0" ]; then - echo "ERROR: Failed to run test perl script. Maybe $perl is" - echo "not the perl interpreter, or is not installed properly" - echo "" - exit 6 fi + $perl -e print "foobar\n" 2>/dev/null | grep foobar >/dev/null + # if [ $? != "0" ]; then + # echo "ERROR: Failed to run test perl script. Maybe $perl is" + # echo "not the perl interpreter, or is not installed properly" + # echo "" + # exit 6 + # fi $perl -e 'exit ($] < 5.002 ? 1 : 0)' - if [ $? = "1" ]; then - echo "ERROR: Detected old perl version. Webmin requires" - echo "perl 5.002 or better to run" - echo "" - exit 7 - fi + # if [ $? = "1" ]; then + # echo "ERROR: Detected old perl version. Webmin requires" + # echo "perl 5.002 or better to run" + # echo "" + # exit 7 + # fi $perl -e 'use Socket; print "foobar\n"' 2>/dev/null | grep foobar >/dev/null if [ $? != "0" ]; then echo "ERROR: Perl Socket module not installed. Maybe Perl has" @@ -298,7 +306,7 @@ # Create temp files directory $perl "$srcdir/maketemp.pl" - if [ "$?" != "0" ]; then + if [ ! -d "/tmp/.webmin"]; then ##os2 echo "ERROR: Failed to create or check temp files directory $tempdir" echo "" exit 2 @@ -306,17 +314,17 @@ # Ask for operating system type echo "***********************************************************************" - if [ "$os_type" = "" ]; then - if [ "$autoos" = "" ]; then - autoos=2 - fi - $perl "$srcdir/oschooser.pl" "$srcdir/os_list.txt" $tempdir/$$.os $autoos - if [ $? != 0 ]; then - exit $? - fi - . $tempdir/$$.os - rm -f $tempdir/$$.os - fi + # if [ "$os_type" = "" ]; then + # if [ "$autoos" = "" ]; then + # autoos=2 + # fi + # $perl "$srcdir/oschooser.pl" "$srcdir/os_list.txt" $tempdir/$$.os $autoos + # if [ $? != 0 ]; then + # exit $? + # fi + # . $tempdir/$$.os + # rm -f $tempdir/$$.os + # fi echo "Operating system name: $real_os_type" echo "Operating system version: $real_os_version" echo ""