public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Invoking ash for rebaseall
@ 2005-07-17 19:49 Ross Boulet
  2005-07-17 20:59 ` Jason Tishler
  0 siblings, 1 reply; 6+ messages in thread
From: Ross Boulet @ 2005-07-17 19:49 UTC (permalink / raw)
  To: Cygwin

My apologies if this is covered somewhere (FAQ, user guide,
etc.)  Rebaseall now requires being run under ash, but when
I run ash from "Start/Run" or from a cmd.exe prompt, it does
not execute /etc/profile and therefore does not have a path
to rebaseall (or any other cygwin directory for that
matter).

Granted, I could go in to windoze and add the cygwin
directories to my system path, or manually source
/etc/profile at the ash prompt.  But is there a flag to tell
ash to act as a login shell and execute /etc/profile?

Thanks,
Ross





--
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/

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

* Re: Invoking ash for rebaseall
  2005-07-17 19:49 Invoking ash for rebaseall Ross Boulet
@ 2005-07-17 20:59 ` Jason Tishler
  2005-07-18  5:57   ` Igor Pechtchanski
  0 siblings, 1 reply; 6+ messages in thread
From: Jason Tishler @ 2005-07-17 20:59 UTC (permalink / raw)
  To: cygwin

Ross,

On Sun, Jul 17, 2005 at 02:48:39PM -0500, Ross Boulet wrote:
> My apologies if this is covered somewhere (FAQ, user guide, etc.)
> Rebaseall now requires being run under ash, but when I run ash from
> "Start/Run" or from a cmd.exe prompt, it does not execute /etc/profile
> and therefore does not have a path to rebaseall (or any other cygwin
> directory for that matter).
> 
> Granted, I could go in to windoze and add the cygwin directories to my
> system path, or manually source /etc/profile at the ash prompt.  But
> is there a flag to tell ash to act as a login shell and execute
> /etc/profile?

Just use the following (from ash):

    $ PATH=/bin rebaseall

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

--
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/

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

* Re: Invoking ash for rebaseall
  2005-07-17 20:59 ` Jason Tishler
@ 2005-07-18  5:57   ` Igor Pechtchanski
  2005-07-18  6:06     ` Brian Dessent
  2005-07-18 11:29     ` Jason Tishler
  0 siblings, 2 replies; 6+ messages in thread
From: Igor Pechtchanski @ 2005-07-18  5:57 UTC (permalink / raw)
  To: Jason Tishler; +Cc: cygwin

On Sun, 17 Jul 2005, Jason Tishler wrote:

> Ross,
>
> On Sun, Jul 17, 2005 at 02:48:39PM -0500, Ross Boulet wrote:
> > My apologies if this is covered somewhere (FAQ, user guide, etc.)
> > Rebaseall now requires being run under ash, but when I run ash from
> > "Start/Run" or from a cmd.exe prompt, it does not execute /etc/profile
> > and therefore does not have a path to rebaseall (or any other cygwin
> > directory for that matter).
> >
> > Granted, I could go in to windoze and add the cygwin directories to my
> > system path, or manually source /etc/profile at the ash prompt.  But
> > is there a flag to tell ash to act as a login shell and execute
> > /etc/profile?
>
> Just use the following (from ash):
>
>     $ PATH=/bin rebaseall
>
> Jason

Umm, why should rebaseall require a PATH setting at all?  Wouldn't it be
easier to specify full paths for every command instead of telling users to
set their PATH?
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
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/

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

* Re: Invoking ash for rebaseall
  2005-07-18  5:57   ` Igor Pechtchanski
@ 2005-07-18  6:06     ` Brian Dessent
  2005-07-18 11:42       ` Jason Tishler
  2005-07-18 11:29     ` Jason Tishler
  1 sibling, 1 reply; 6+ messages in thread
From: Brian Dessent @ 2005-07-18  6:06 UTC (permalink / raw)
  To: cygwin

Igor Pechtchanski wrote:

> Umm, why should rebaseall require a PATH setting at all?  Wouldn't it be
> easier to specify full paths for every command instead of telling users to
> set their PATH?

Well, if the user does not have /usr/bin in their Windows path (instead
relying on /etc/profile to add it) and they try to run "ash rebaseall"
from a command prompt, they will get an error about not finding
cygwin1.dll unless /usr/bin is the CWD.

It would be nice if ash had a "-l" option as bash does to tell it to be
a login shell and read the profile/rc files.  But it doesn't, AFAICT. 
It seems to want to sense this by checking if argv[0][0] == '-'.  *sigh*

Brian

--
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/

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

* Re: Invoking ash for rebaseall
  2005-07-18  5:57   ` Igor Pechtchanski
  2005-07-18  6:06     ` Brian Dessent
@ 2005-07-18 11:29     ` Jason Tishler
  1 sibling, 0 replies; 6+ messages in thread
From: Jason Tishler @ 2005-07-18 11:29 UTC (permalink / raw)
  To: cygwin

Igor,

On Mon, Jul 18, 2005 at 01:57:52AM -0400, Igor Pechtchanski wrote:
> On Sun, 17 Jul 2005, Jason Tishler wrote:
> > On Sun, Jul 17, 2005 at 02:48:39PM -0500, Ross Boulet wrote:
> > > Granted, I could go in to windoze and add the cygwin directories
> > > to my system path, or manually source /etc/profile at the ash
> > > prompt.  But is there a flag to tell ash to act as a login shell
> > > and execute /etc/profile?
> >
> > Just use the following (from ash):
> >
> >     $ PATH=/bin rebaseall
> 
> Umm, why should rebaseall require a PATH setting at all?  Wouldn't it
> be easier to specify full paths for every command instead of telling
> users to set their PATH?

It would be easier to just add "PATH=/bin" near the beginning of the
rebaseall script than to use full paths for every command invocation.
Unfortunately, this would not solve the problem of finding rebaseall
itself.

Anyway, maybe the best approach is to add the aforementioned PATH
setting to rebaseall and instruct the user to execute rebaseall as
follows:

    $ /bin/rebaseall

Any other suggestions?

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

--
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/

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

* Re: Invoking ash for rebaseall
  2005-07-18  6:06     ` Brian Dessent
@ 2005-07-18 11:42       ` Jason Tishler
  0 siblings, 0 replies; 6+ messages in thread
From: Jason Tishler @ 2005-07-18 11:42 UTC (permalink / raw)
  To: cygwin

On Sun, Jul 17, 2005 at 11:07:04PM -0700, Brian Dessent wrote:
> Igor Pechtchanski wrote:
> > Umm, why should rebaseall require a PATH setting at all?  Wouldn't
> > it be easier to specify full paths for every command instead of
> > telling users to set their PATH?
> 
> Well, if the user does not have /usr/bin in their Windows path
> (instead relying on /etc/profile to add it) and they try to run "ash
> rebaseall" from a command prompt, they will get an error about not
> finding cygwin1.dll unless /usr/bin is the CWD.

Actually, "ash rebaseall" will not work even if the user's PATH is set
correctly.  Unlike bash, ash does not seem to search the PATH to find a
script to execute:

    $ ash foo.sh
    foo.sh: Can't open foo.sh: No such file or directory

But, the following work:
    
    $ ash /home/jt/bin/foo.sh
    foo
    $ ash -c foo.sh
    foo

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

--
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/

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

end of thread, other threads:[~2005-07-18 11:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-17 19:49 Invoking ash for rebaseall Ross Boulet
2005-07-17 20:59 ` Jason Tishler
2005-07-18  5:57   ` Igor Pechtchanski
2005-07-18  6:06     ` Brian Dessent
2005-07-18 11:42       ` Jason Tishler
2005-07-18 11:29     ` Jason Tishler

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).