delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/01/28/09:42:42

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <200201281442.PAA02297@cabs40.col.bsf.alcatel.fr>
Date: Mon, 28 Jan 2002 15:42:12 +0100 (MET)
From: Jorge Goncalvez <goncal11 AT col DOT bsf DOT alcatel DOT fr>
Reply-To: Jorge Goncalvez <goncal11 AT col DOT bsf DOT alcatel DOT fr>
Subject: RE:What's wrong with this?
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.4.2 SunOS 5.8 sun4u sparc

Hi, i have this perl script but it seems returning always 0

use IO::Socket;
$port=21;


$sock = IO::Socket::INET->new(PeerAddr  =>'localhost',
                                        PeerPort => $port,
                                        Proto => 'tcp') ;
die &inetdconf unless ($sock);


my $cmd4=" net stop inetd && net start inetd";
system($cmd4);

sub inetdconf()
{
	my $cmd=" c:\\oxe\\cygwin\\bin\\sed.exe 's/^\#ftp/ftp/' 
c:\\cygwin\\usr\\local\\etc\\inetd.conf > c:\\cygwin\\usr\\local\\etc\\inetd.new 
";# Comment out ftp entry in /etc/inetd.conf
	system($cmd);
	my $cmd2=" c:\\oxe\\cygwin\\bin\\mv.exe 
c:\\cygwin\\usr\\local\\etc\\inetd.new c:\\cygwin\\usr\\local\\etc\\inetd.conf"; 
# Move new file into place
	system($cmd2);

}

thanks.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019