public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Removing dependencies of the Cygnus shell for command usage in NT  Shells.
@ 2000-08-23 10:53 Earnie Boyd
  0 siblings, 0 replies; 3+ messages in thread
From: Earnie Boyd @ 2000-08-23 10:53 UTC (permalink / raw)
  To: Aaron Wood, 'cygwin@sources.redhat.com'

--- Aaron Wood <Aaron@SAFEHARBOR.COM> wrote:
> Hi all,
> 
> I've got a bit of an advanced question....
> 
> Is it possible to recompile a given command like df to a standard NT command
> shell?  What I want to do is run df from an NT shell, receive the hard drive
> info as the result and be able to push/pipe the command to an text file.
> 
> If not, does anyone know of dependency (DLL, registry, etc.) free Unix
> command ports to NT?
> 

IMO, your question is on the wrong list.  You should ask at mingw32@egroups.com
and see http://www.mingw.org/ for links and pointers.

Cheers,

=====
---
   Earnie Boyd: < mailto:earnie_boyd@yahoo.com >
            __Cygwin: POSIX on Windows__
Cygwin Newbies: < http://gw32.freeyellow.com/ >
           __Minimalist GNU for Windows__
  Mingw32 List: < http://www.egroups.com/group/mingw32/ >
    Mingw Home: < http://www.mingw.org/ >

__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Removing dependencies of the Cygnus shell for command usage in NT Shells.
@ 2000-08-24 11:56 Aaron Wood
  0 siblings, 0 replies; 3+ messages in thread
From: Aaron Wood @ 2000-08-24 11:56 UTC (permalink / raw)
  To: cygwin; +Cc: 'Larry Hall (RFK Partners, Inc)'

-----Original Message-----
From: Larry Hall (RFK Partners, Inc) [ mailto:lhall@rfk.com ]
Sent: Wednesday, August 23, 2000 10:03 AM
To: Aaron Wood
Subject: RE: Removing dependencies of the Cygnus shell for command usage
i n NT Shells.


At 12:49 PM 8/23/2000, you wrote:


>-----Original Message----- 
>From: Larry Hall (RFK Partners, Inc)
[< mailto:lhall@rfk.com > mailto:lhall@rfk.com ] 
>Sent: Wednesday, August 23, 2000 9:39 AM 
>To: Aaron Wood 
>Subject: Re: Removing dependencies of the Cygnus shell for command usage 
>in NT Shells. 
>
>At 12:27 PM 8/23/2000, you wrote: 
> >Hi all, 
> > 
> >I've got a bit of an advanced question.... 
> > 
> >Is it possible to recompile a given command like df to a standard NT
command 
> >shell?  What I want to do is run df from an NT shell, receive the hard
drive 
> >info as the result and be able to push/pipe the command to an text file. 
> > 
> >If not, does anyone know of dependency (DLL, registry, etc.) free Unix 
> >command ports to NT? 
> > 
> > 
> >Thanks! 
> > 
> >Aaron Wood 
> >Systems Engineer 
> >Safeharbor.com 
> > 
>
>What do you want?  Just a version of df that builds without Cywgin?
There's 
>at least one out there.  I believe there was even one posted to this list 
>years ago.  And actually, its not that hard to change the source to call
the 
>right Win32 API to make the one that comes with the fileutils package work.

>Is that what you want?  You know the Cygwin df runs from the NT shell if 
>cygwin1.dll is in the path, right? 
>
>---------------------------------------- 
>
>Hi Larry, 
>
>Actually I did not know that.  I'm a bit of a newbie to creating unique
solutions such as this.  Are there any references that I can check out so
that I can make the fileutils work independently of the cywgin?
>
>I'm looking for simple Unix commands that I can use within an NT shell.  I
used to contract for M$ and thanks to the Unix gurus there.  I had access to
tons of ported commands so that you could literally turn your MS box into a
Unix box (if you wanted).  I'm looking for something along those lines.
Also, I'd like to be able to take some commands from Unix that NT/Win2k/OS
resource Kits don't have and place them on various production servers for
monitoring and scripting automated tasks.
>
>Thanks! 
>
>Aaron Wood 
>Systems Engineer 
>Safeharbor.com 
>< http://www.safeharbor.com > http://www.safeharbor.com 


OK, so you're looking for various UNIX style tools.  Should I assume that 
those that come with Cygwin are not adequate?  Most of the GNU tools have
ports to vanilla Win32.  Just get the package and build them with VC++
(or probably whatever compiler you like.)  I'm sure you can find prebuilts
around too if you do a web search.  I've run across them before (even some
of the addresses have been posted to this list) but I don't recall them
offhand.

I don't think there are any specific pointers for "porting" df to Win32.
As I recall last time I looked at it, Cygwin was using volume and drive
space Win32 calls to provide the information that df needed to do its 
work (although these calls would be made in the Cygwin DLL so you'd need
to explicitly move them into the df code to decouple it from Cygwin.)  Of
course, you have to keep in mind that if you're using GNU as the basis for
your utilities, you have to follow the GNU public license if you distribute
them.  So long as that's not a problem, I'd say check out the GNU stuff and
build and use what you need!



-------------------------




Hi all,


I started experimenting with separating the df and mount commands from the
cygwin shell (along with the cygwin1.dll) and there's one thing that needs
to be noted in addition to move of files and the addition of the file's path
to the system (the PATH)...the mount table needs to be noted in the
registry.


According to...

http://sources.redhat.com/cygwin/cygwin-ug-net/using.html#MOUNT-TABLE


...and some research on my part...there's two places in the registry that
these commands read from.....

HKLM/Software/Cygnus Solutions/Cygwin/mounts v2

and

HCU/Software/Cygnus Solutions/Cygwin/mounts v2



Since the HKEY_LOCAL_MACHINE entry looks to mount system wide settings such
as the default directories for the cygwin default install and the
HKEY_Current_User seem to be whatever the user defines for the session.
Since all that I wanted was an output of the disks mounted and the space
available I deleted all of the Cygwin 'default' drive mounts and added the
following info.....you can add drives (Networked or not) using this cookie
cutter approach.


The following below is an example of a registry export of some sample
drives.



REGEDIT4

[HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2]
"cygdrive prefix"="/cygdrive"
"cygdrive flags"=dword:00000020

[HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/c]
"native"="c:"
"flags"=dword:00000002

[HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/d]
"native"="d:"
"flags"=dword:00000002

[HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/e]
"flags"=dword:00000002
"native"="e:"

[HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/f]
"flags"=dword:00000002
"native"="f:"
 



Cheers!

Aaron Wood
Systems Engineer
Safeharbor.com



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Removing dependencies of the Cygnus shell for command usage in NT Shells.
@ 2000-08-23  9:28 Aaron Wood
  0 siblings, 0 replies; 3+ messages in thread
From: Aaron Wood @ 2000-08-23  9:28 UTC (permalink / raw)
  To: 'cygwin@sources.redhat.com'

Hi all,

I've got a bit of an advanced question....

Is it possible to recompile a given command like df to a standard NT command
shell?  What I want to do is run df from an NT shell, receive the hard drive
info as the result and be able to push/pipe the command to an text file.

If not, does anyone know of dependency (DLL, registry, etc.) free Unix
command ports to NT?


Thanks!

Aaron Wood
Systems Engineer
Safeharbor.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-08-24 11:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-23 10:53 Removing dependencies of the Cygnus shell for command usage in NT Shells Earnie Boyd
  -- strict thread matches above, loose matches on Subject: below --
2000-08-24 11:56 Aaron Wood
2000-08-23  9:28 Aaron Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).