RE: Korn Shell from CMD

2003-07-16 Thread Bowden, Todd
Why not install cron and run it out of there.  I have it setup and its
working flawlessly.

Todd C. Bowden 
E-mail: [EMAIL PROTECTED]


-Original Message-
From: Linden Glen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 15, 2003 10:33 PM
To: [EMAIL PROTECTED]
Subject: Korn Shell from CMD


Hi all,
I've brought a script across from AIX, it's written in Korn. I've made some 
changes, and have been testing it via cygwin. What I've been doing is 
opening cygwin, and changing to the scripts directory, and running it from 
there. ie
cd /dir/script.sh
./script.sh
That was all fine, and it runs perfectly like that - however, now I need to 
make the script run automatically - and would like to do this via NT 
Scheduler. My issue is however, that when I try to create the batch file to 
run it as per suggestion from previous posts, it doesn't work I get all 
kinds of errors with the script, like the `date` command not working. The 
first line of the script is : #!/bin/ksh could this cause the issue I'm 
seeing?
Any help will be very much appreciated.
Cheers,
Linden

_
Hotmail is now available on Australian mobile phones. Go to  
http://ninemsn.com.au/mobilecentral/signup.asp


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: problem starting cron as a service

2003-07-21 Thread Bowden, Todd
You have to install it as a service in order to see in from a Windows
perspective.

cygrunsrv -I cron -p /usr/sbin/cron -a -D
Cygrunsrv -S cron

net start | grep -i cron

I see it in my Services.  Why wouldn't you see it in yours

The doc /usr/doc/Cygwin/cron.README tells you how to install it.

Todd C. Bowden 
HP Certified 
AtosOrigin 
5000 S. Bowen 
Arlington, TX 76017 
Office: 817-264-8211
E-mail: [EMAIL PROTECTED]


-Original Message-
From: Bill McCormick [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 21, 2003 3:12 PM
To: [EMAIL PROTECTED]
Subject: RE: problem starting cron as a service


Oops ... my bad.

It's running; it's just not displayed as running as a service to windows. ps
-x -f shows the grand truth. That being the case, doesn't cron startup
really belong in rc.local? Umm ... does rc.local even get called on system
boot?

Thanks,

Bill

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Behalf Of Vince Hoffman
> Sent: Monday, July 21, 2003 11:10 AM
> To: [EMAIL PROTECTED]
> Subject: RE: problem starting cron as a service
>
>
> Opps thought from your previous message you already knew or i would 
> have said. the easiest way is the "at" trick, from a command line,type
> "at \\yourcomputername 15:49 /interactive cmd.exe"
> this will give you a cmd shell running as SYSTEM. from there cd to your
> cygwin\bin directory and type "bash --login -i" which will give you a bash
> shell running as SYSTEM.
>
> > -Original Message-
> > From: Bill McCormick [mailto:[EMAIL PROTECTED]
> > Sent: 21 July 2003 16:41
> > To: [EMAIL PROTECTED]
> > Subject: RE: problem starting cron as a service
> >
> >
> > How do I run a prog as localsystem?
> >
> > > -Original Message-
> > > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Behalf
> > > Of Vince Hoffman
> > > Sent: Monday, July 21, 2003 9:38 AM
> > > To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
> > > Subject: RE: problem starting cron as a service
> > >
> > >
> > > Hi Bill,
> > >   Off hand there are a few things to try, but Mark Harig
> > on the cygwin
> > > list seems pretty up on cron, and has a script which will
> > diagnose common
> > > problems, heres a link to a message which has it attached, 
> > > 
> > >
> > >   You'll do better keeping messages on list as theres a
> > whole lot more
> > > experience out there than I have. One thing you could try
> > is running cron
> > > manualy from the command line as localsystem and seeing if you get 
> > > any clues in the output. (appologys if you have and i missed that 
> > > message.)
> > >
> > > Vince
> > > ps. the output of cygcheck -s -v -r as an uncompressed attachment 
> > > might help too.
> > > > -Original Message-
> > > > From: Bill McCormick [mailto:[EMAIL PROTECTED]
> > > > Sent: 21 July 2003 15:18
> > > > To: Vince Hoffman
> > > > Subject: RE: problem starting cron as a service
> > > >
> > > >
> > > > Thanks Vince,
> > > >
> > > > Nothing in cron.log (file created but empty) and mount is 
> > > > system. Any other ideas?
> > > >
> > > >
> > > > Bill
> > > > > -Original Message-
> > > > > From: [EMAIL PROTECTED]
> > > > [mailto:[EMAIL PROTECTED] Behalf
> > > > > Of Vince Hoffman
> > > > > Sent: Monday, July 21, 2003 4:08 AM
> > > > > To: '[EMAIL PROTECTED]'; Cygwin
> > > > > Subject: RE: problem starting cron as a service
> > > > >
> > > > >
> > > > > anything in /var/log/cron.log ?
> > > > >
> > > > > and are you mounts system or user ?
> > > > > ie.
> > > > > $ mount |grep "/ type system"
> > > > >
> > > > > should give something like
> > > > >
> > > > > h:\cygwin on / type system (binmode)
> > > > >
> > > > > > -Original Message-
> > > > > > From: Bill McCormick [mailto:[EMAIL PROTECTED]
> > > > > > Sent: 21 July 2003 08:25
> > > > > > To: Cygwin
> > > > > > Subject: problem starting cron as a service
> > > > > >
> > > > > >
> > > > > > I get this in the win app error log:
> > > > > >
> > > > > > Event Type: Error
> > > > > > Event Source:   cron
> > > > > > Event Category: None
> > > > > > Event ID:   0
> > > > > > Date:   7/21/2003
> > > > > > Time:   2:14:08 AM
> > > > > > User:   BILLHOME\Administrator
> > > > > > Computer:   BILLHOME
> > > > > > Description:
> > > > > > The description for Event ID ( 0 ) in Source ( cron ) cannot 
> > > > > > be found. The local computer may not have the necessary 
> > > > > > registry information or message
> > > > > > DLL files to display messages from a remote computer. The
> > > > following
> > > > > > information is part of the event: cron : PID 2276 : starting 
> > > > > > service `cron'
> > > > > > failed: execv: 0, No error.
> > > > > >
> > > > > > While trying to start the service as Administrator (or from 
> > > > > > LocalSytems account). I rm'd /var/run/cron.pid and 
> > > > > > /var/log/cron.log before trying to
> > > > > > start.
> > > > > >
> > > > > > Thanks
> > >

RE: problem starting cron as a service

2003-07-22 Thread Bowden, Todd
Bill,

The docs should be /usr/doc/Cygwin/cron.README.  The docs should be there.

Todd C. Bowden 


-Original Message-
From: Bill McCormick [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 21, 2003 4:22 PM
To: [EMAIL PROTECTED]
Subject: RE: problem starting cron as a service


Ok, I missed the -D param. Just going from the man pages, cron takes no
params. I also didn't find any info regarding running cron as a service in
the /usr/doc's. So, as always, it's the littlest things that bite.

Any idea regarding my previous post about ImageMagick?

thanks mucho,

Bill

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Behalf Of Bowden, Todd
> Sent: Monday, July 21, 2003 3:21 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: problem starting cron as a service
>
>
> You have to install it as a service in order to see in from a Windows 
> perspective.
>
> cygrunsrv -I cron -p /usr/sbin/cron -a -D
> Cygrunsrv -S cron
>
> net start | grep -i cron
>
> I see it in my Services.  Why wouldn't you see it in yours
>
> The doc /usr/doc/Cygwin/cron.README tells you how to install it.
>
> Todd C. Bowden
> HP Certified
> AtosOrigin
> 5000 S. Bowen
> Arlington, TX 76017
> Office: 817-264-8211
> E-mail: [EMAIL PROTECTED]
>
>
> -Original Message-
> From: Bill McCormick [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 21, 2003 3:12 PM
> To: [EMAIL PROTECTED]
> Subject: RE: problem starting cron as a service
>
>
> Oops ... my bad.
>
> It's running; it's just not displayed as running as a service to 
> windows. ps -x -f shows the grand truth. That being the case, doesn't 
> cron startup really belong in rc.local? Umm ... does rc.local even get 
> called on system boot?
>
> Thanks,
>
> Bill
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Behalf Of Vince Hoffman
> > Sent: Monday, July 21, 2003 11:10 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: problem starting cron as a service
> >
> >
> > Opps thought from your previous message you already knew or i would 
> > have said. the easiest way is the "at" trick, from a command 
> > line,type "at \\yourcomputername 15:49 /interactive cmd.exe" this 
> > will give you a cmd shell running as SYSTEM. from there cd to your 
> > cygwin\bin directory and type "bash --login -i" which will give
> you a bash
> > shell running as SYSTEM.
> >
> > > -Original Message-
> > > From: Bill McCormick [mailto:[EMAIL PROTECTED]
> > > Sent: 21 July 2003 16:41
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: problem starting cron as a service
> > >
> > >
> > > How do I run a prog as localsystem?
> > >
> > > > -Original Message-
> > > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] Behalf
> > > > Of Vince Hoffman
> > > > Sent: Monday, July 21, 2003 9:38 AM
> > > > To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
> > > > Subject: RE: problem starting cron as a service
> > > >
> > > >
> > > > Hi Bill,
> > > > Off hand there are a few things to try, but Mark Harig
> > > on the cygwin
> > > > list seems pretty up on cron, and has a script which will
> > > diagnose common
> > > > problems, heres a link to a message which has it attached, 
> > > > <http://sources.redhat.com/ml/cygwin/2003-06/msg01022.html>
> > > >
> > > > You'll do better keeping messages on list as theres a
> > > whole lot more
> > > > experience out there than I have. One thing you could try
> > > is running cron
> > > > manualy from the command line as localsystem and seeing if you 
> > > > get any clues in the output. (appologys if you have and i missed 
> > > > that
> > > > message.)
> > > >
> > > > Vince
> > > > ps. the output of cygcheck -s -v -r as an uncompressed 
> > > > attachment might help too.
> > > > > -Original Message-
> > > > > From: Bill McCormick [mailto:[EMAIL PROTECTED]
> > > > > Sent: 21 July 2003 15:18
> > > > > To: Vince Hoffman
> > > > > Subject: RE: problem starting cron as a service
> > > > >
> > > > >
> > > > > Thanks Vince,
> > > > >
> > > > > Nothing in cron.log (file created but empty) and mount is

RE: apache dies with pppoe

2003-07-24 Thread Bowden, Todd
Can I ask what your environment looks like?

PC <---> FW/Router  <--> DSL Modem <->  Internet


Maybe that would help us out in figuring out what is going on.

This doesn't make sense that your apache web server is dying on your PC if
your PC has a
fixed IP than your webserver should just run and run.  However if your setup
is different than 
above than we might have another problem.  If the environment above is what
you have and your IP is fixed.  Your FW/Router should have nothing to do
with what problem your are having on your system.

What happens when you install a binary Win32 version of apache, does it die
too?

Todd C. Bowden 


-Original Message-
From: Bill McCormick [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 24, 2003 11:29 AM
To: Martin Gainty
Cc: Cygwin
Subject: RE: apache dies with pppoe


Ok ... let me back even further.

The problem is that when I open up port 80 (on my f/w router) and start
accepting outside connections (to the 'puter running Apache,) it appears as
though (after some period of time) Apache stops listening or accepting
connections, including from the LAN. If I restart Apache everything is fine
again - for a while. Based on other web/news group chatter, I believe this
problem is related to my DSL time-out and WAN IP changing.

Now follow closely ... this is where I believe I'm on-topic here 

Other's using other OS's (Linux) have devised schemes (like enhanced
scripting in if.cfg-ppp) to restart Apache when this happens. I've spent
more than a few hours looking at this problem (before making the original
post) and maybe the DSL modem time-out is not the issue - but at the moment
it seems to be the only explanation.

So, simple question ... are there already CYGwin net utilities that I might
use solve this problem  from the angle I'm currently focusing (restart
Apache when DSL time-out forces WAN IP change) ... right or wrong?


In response to Martin:

> I used to have an Instructor that would say PAY ATTENTION and that is 
> what you need to do

I won't even bother to comment here. Oops .. I guess I just did :)

> If you acquire a device which handles adjusting Dynamic Addressing and 
> Routes the incoming (and outgoing)

I have just such a device configured as so. The word "outgoing" was not in
your original reply for me to pay attention to and I'm not sure how it
applies - please explain. Even if the DSL modem connection timed out and the
IP changed during and http client/server transaction (which it's not going
to,) I'm not sure how that would effect Apache.

> Port 80 transmissions to the PC which hosts the Web Server (because 
> that same device just assigned it an IP because it is a DHCP Server) 
> then your transmission will be successful

My configuration is as so, usually clients can connect. However, when my DSL
modem IP address changes due to time out ... Apache stops severing, or so I
believe.


Thanks,

Bill
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.502 / Virus Database: 300 - Release Date: 7/18/2003


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: apache dies with pppoe

2003-07-24 Thread Bowden, Todd
I know on my FW/Router (Linksys) I can disable DHCP, can you do that with
yours?  If so than disable your DHCP server on your FW/Router and have a
fixed IP address only on your PC.  Also Is there a option in your FW/router
to send Keep alive packets, to maintain your IP address on your FW/router?

Todd C. Bowden 

-Original Message-
From: Bill McCormick [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 24, 2003 1:45 PM
To: Bowden, Todd; 'Cygwin'
Subject: RE: apache dies with pppoe


> Can I ask what your environment looks like?
>
It looks like just like you thought ... except I might add to it as
follows ...

>   PC <> FW/Router  <--> DSL Modem <->  
> Internet
DHCP Client Fixed IPDHCP Client
IP by NIC MAC   DHCP Server PPPOE


> This doesn't make sense that your apache web server is dying on your 
> PC if your PC has a fixed IP than your webserver should just run and 
> run.

I agree ... note that the problem can be systematicly recreated by opening
port 80 on my FW.

* snip *
> Your FW/Router should have nothing to dowith what problem your are 
> having
on your system.
>
I don't believe that it is the FW/Router either. I believe it has more to do
with how my DSL modem times-out, thus forcing an IP change.

> What happens when you install a binary Win32 version of apache, does 
> it die too?

I don't know and I'm not sure I'm ready to find out yet either. It still may
be a configuration issue (and I'm going to look at that again right now,)
but the fact that it does "run and run" until I open it up (to the Internet)
is perplexing.


Thanks,


Bill
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.502 / Virus Database: 300 - Release Date: 7/18/2003


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Inetd question

2003-07-24 Thread Bowden, Todd
Acutally the command would be the following:

mkpasswd -d -u   >> /etc/passwd

This would not get everyone in your domain.

Todd C. Bowden 
HP Certified 
AtosOrigin 
5000 S. Bowen 
Arlington, TX 76017 
Office: 817-264-8211
E-mail: [EMAIL PROTECTED]


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 24, 2003 3:50 PM
To: [EMAIL PROTECTED]
Subject: RE: Inetd question


I tried that. But it still took long time and had a lot of other people's
entries showing up. Thanks,

Xiaoqin Qiu
Technical Computing Group
IT Infrastructure Services Organization
Agilent Technologies, Inc.
(818)879-6220
[EMAIL PROTECTED]
 

-Original Message-
From: Rob [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 1:10 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Inetd question


> 2)  I didn't run mkpasswd -d because the domain is too big that it is
going to take forever.

you could run: mkpasswd -d -u myusername >> /etc/passwd

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/