* [gentoo-user] Scripts not working... HELP!
@ 2011-04-28 5:40 Walter Dnes
2011-04-28 6:11 ` Alexey Mishustin
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Walter Dnes @ 2011-04-28 5:40 UTC (permalink / raw
To: Gentoo Users List
This message is coming from my 32-bit "hot backup" gentoo machine.
For some reason, any script that I call on my 64-bit machine immediately
returns to the command prompt. No warnings or error messages or
diagnostics. Builtins and compiled executables work OK. For instance,
if I have a script named "xyz" that goes like so...
#!/bin/bash
man bash
..., executing "xyz" or "~/bin/xyz" results in bash immediately
returning to to the command prompt. If I type "man bash", it works OK.
On top of everything else, getmail seems to go into "forkbomb mode",
generating a gazillion processes, and eventually locking up the machine,
if I type in...
/usr/bin/getmail -v -v -v --rcfile rc_cotse
It looks like the script is being totally ignored, e.g...
waltdnes@i3 ~ $ emerge anyone home?
waltdnes@i3 ~ $
Any ideas what gives?
--
Walter Dnes <waltdnes@waltdnes.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Scripts not working... HELP!
2011-04-28 5:40 [gentoo-user] Scripts not working... HELP! Walter Dnes
@ 2011-04-28 6:11 ` Alexey Mishustin
2011-04-28 6:12 ` Norman Rieß
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Alexey Mishustin @ 2011-04-28 6:11 UTC (permalink / raw
To: gentoo-user
4/28/2011, "Walter Dnes" <waltdnes@waltdnes.org> wrote:
> This message is coming from my 32-bit "hot backup" gentoo machine.
>For some reason, any script that I call on my 64-bit machine immediately
>returns to the command prompt. No warnings or error messages or
>diagnostics. Builtins and compiled executables work OK. For instance,
>if I have a script named "xyz" that goes like so...
>
>#!/bin/bash
>man bash
>
>..., executing "xyz" or "~/bin/xyz" results in bash immediately
>returning to to the command prompt. If I type "man bash", it works OK.
I am not an expert in scripts at all, but I remember there is difference
between interactive and non-interactive shells that could cause things
like this. What happens if you try to execute a script with
non-interactive command? For example:
#!/bin/bash
echo "I am script"
And, just for a case... Are all scripts executable? (+x)
--
Regards,
Alex
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Scripts not working... HELP!
2011-04-28 5:40 [gentoo-user] Scripts not working... HELP! Walter Dnes
2011-04-28 6:11 ` Alexey Mishustin
@ 2011-04-28 6:12 ` Norman Rieß
2011-04-28 10:21 ` Alex Schuster
2011-04-28 22:16 ` [gentoo-user] [SOLVED] " Walter Dnes
3 siblings, 0 replies; 8+ messages in thread
From: Norman Rieß @ 2011-04-28 6:12 UTC (permalink / raw
To: gentoo-user
Had similar symptoms as my default system python was not defined properly.
Use "eselect python list --python2" to see if that is the case.
Set it with "eselect python set --python2 <number>" if necessary.
Regards
Norman
Am 04/28/11 07:40, schrieb Walter Dnes:
> This message is coming from my 32-bit "hot backup" gentoo machine.
> For some reason, any script that I call on my 64-bit machine immediately
> returns to the command prompt. No warnings or error messages or
> diagnostics. Builtins and compiled executables work OK. For instance,
> if I have a script named "xyz" that goes like so...
>
> #!/bin/bash
> man bash
>
> ..., executing "xyz" or "~/bin/xyz" results in bash immediately
> returning to to the command prompt. If I type "man bash", it works OK.
> On top of everything else, getmail seems to go into "forkbomb mode",
> generating a gazillion processes, and eventually locking up the machine,
> if I type in...
> /usr/bin/getmail -v -v -v --rcfile rc_cotse
>
> It looks like the script is being totally ignored, e.g...
>
> waltdnes@i3 ~ $ emerge anyone home?
> waltdnes@i3 ~ $
>
> Any ideas what gives?
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Scripts not working... HELP!
2011-04-28 5:40 [gentoo-user] Scripts not working... HELP! Walter Dnes
2011-04-28 6:11 ` Alexey Mishustin
2011-04-28 6:12 ` Norman Rieß
@ 2011-04-28 10:21 ` Alex Schuster
2011-04-28 22:16 ` [gentoo-user] [SOLVED] " Walter Dnes
3 siblings, 0 replies; 8+ messages in thread
From: Alex Schuster @ 2011-04-28 10:21 UTC (permalink / raw
To: gentoo-user
Walter Dnes writes:
> This message is coming from my 32-bit "hot backup" gentoo machine.
> For some reason, any script that I call on my 64-bit machine immediately
> returns to the command prompt. No warnings or error messages or
> diagnostics. Builtins and compiled executables work OK. For instance,
> if I have a script named "xyz" that goes like so...
>
> #!/bin/bash
> man bash
>
> ..., executing "xyz" or "~/bin/xyz" results in bash immediately
> returning to to the command prompt.
Weeeeird. I have no idea. The usual guess is that a partition is mounted
noexec, but that would give an error. Or that the script is saved in DOS
format, with CR-LF instead of LF endings, but that would throw a 'bad
interpeter' error.
Try 'strace ~/bin/xyz' (emerge strace if you don't have it) and compare the
output with your working machine, that should give some hints to what is
happening.
What happens if you change the script to this?
#!/usr/bin/man bash
Oh, now I _do_ have an idea. What about startup files, like .bashrc,
.bash_profile and such? Any recent chanegs here? Try:
#!/bin/bash -i
This forces the shell to be interactive, so it sources other startup files.
Add 'xv' (bash -ixv) to let bash output which lines are being executed.
Also put some debug info in .bashrc, .bash_profile, /etc/bash/bashrc,
/etc/profile to see what of them is being started.
And try another user without your personal startup files. Same effect?
Wonko
^ permalink raw reply [flat|nested] 8+ messages in thread
* [gentoo-user] [SOLVED] Scripts not working... HELP!
2011-04-28 5:40 [gentoo-user] Scripts not working... HELP! Walter Dnes
` (2 preceding siblings ...)
2011-04-28 10:21 ` Alex Schuster
@ 2011-04-28 22:16 ` Walter Dnes
2011-04-29 7:25 ` Norman Rieß
3 siblings, 1 reply; 8+ messages in thread
From: Walter Dnes @ 2011-04-28 22:16 UTC (permalink / raw
To: Gentoo Users List
[-- Attachment #1: Type: text/plain, Size: 813 bytes --]
It appears that it's only python scripts that are not executing. By
sheer chance, I wanted to use 2 scripts that involved python. My
"getcot" script invokes "getmail" which is a python script. emerge is
also a python script. Maybe it's just python scripts that are the
problem.
Last minute update
==================
I ran "eselect python set 1", and things appear to be working now.
I'm not sure if it's my memory fading, but I seem to recall that before
I ran "eselect python set 1", I got...
[i3][root][~] eselect python list
Available Python interpreters:
[1] python2.7
[2] python3.1
I.e. neither one was selected. Is it possible that...
* my selected version was python2.6
* I ran an update and removed the python 2.6
* but forgot to select 2.7
--
Walter Dnes <waltdnes@waltdnes.org>
[-- Attachment #2: execlog.txt.gz --]
[-- Type: application/octet-stream, Size: 5119 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] [SOLVED] Scripts not working... HELP!
2011-04-28 22:16 ` [gentoo-user] [SOLVED] " Walter Dnes
@ 2011-04-29 7:25 ` Norman Rieß
2011-04-29 8:31 ` Mick
2011-04-29 8:41 ` covici
0 siblings, 2 replies; 8+ messages in thread
From: Norman Rieß @ 2011-04-29 7:25 UTC (permalink / raw
To: gentoo-user
Am 04/29/11 00:16, schrieb Walter Dnes:
> It appears that it's only python scripts that are not executing. By
> sheer chance, I wanted to use 2 scripts that involved python. My
> "getcot" script invokes "getmail" which is a python script. emerge is
> also a python script. Maybe it's just python scripts that are the
> problem.
>
> Last minute update
> ==================
>
> I ran "eselect python set 1", and things appear to be working now.
>
> I'm not sure if it's my memory fading, but I seem to recall that before
> I ran "eselect python set 1", I got...
>
> [i3][root][~] eselect python list
> Available Python interpreters:
> [1] python2.7
> [2] python3.1
>
> I.e. neither one was selected. Is it possible that...
> * my selected version was python2.6
> * I ran an update and removed the python 2.6
> * but forgot to select 2.7
>
That is kind of what i told you...
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] [SOLVED] Scripts not working... HELP!
2011-04-29 7:25 ` Norman Rieß
@ 2011-04-29 8:31 ` Mick
2011-04-29 8:41 ` covici
1 sibling, 0 replies; 8+ messages in thread
From: Mick @ 2011-04-29 8:31 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1170 bytes --]
On Friday 29 April 2011 08:25:07 Norman Rieß wrote:
> Am 04/29/11 00:16, schrieb Walter Dnes:
> > It appears that it's only python scripts that are not executing. By
> >
> > sheer chance, I wanted to use 2 scripts that involved python. My
> > "getcot" script invokes "getmail" which is a python script. emerge is
> > also a python script. Maybe it's just python scripts that are the
> > problem.
> >
> > Last minute update
> > ==================
> >
> > I ran "eselect python set 1", and things appear to be working now.
> >
> > I'm not sure if it's my memory fading, but I seem to recall that before
> > I ran "eselect python set 1", I got...
> >
> > [i3][root][~] eselect python list
> >
> > Available Python interpreters:
> > [1] python2.7
> > [2] python3.1
> >
> > I.e. neither one was selected. Is it possible that...
> > * my selected version was python2.6
> > * I ran an update and removed the python 2.6
> > * but forgot to select 2.7
>
> That is kind of what i told you...
Did you run python-updater after you selected python-2.7? I had a load of
packages to remerge as a result.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] [SOLVED] Scripts not working... HELP!
2011-04-29 7:25 ` Norman Rieß
2011-04-29 8:31 ` Mick
@ 2011-04-29 8:41 ` covici
1 sibling, 0 replies; 8+ messages in thread
From: covici @ 2011-04-29 8:41 UTC (permalink / raw
To: gentoo-user
Norman Rieß <norman@smash-net.org> wrote:
> Am 04/29/11 00:16, schrieb Walter Dnes:
> > It appears that it's only python scripts that are not executing. By
> > sheer chance, I wanted to use 2 scripts that involved python. My
> > "getcot" script invokes "getmail" which is a python script. emerge is
> > also a python script. Maybe it's just python scripts that are the
> > problem.
> >
> > Last minute update
> > ==================
> >
> > I ran "eselect python set 1", and things appear to be working now.
> >
> > I'm not sure if it's my memory fading, but I seem to recall that before
> > I ran "eselect python set 1", I got...
> >
> > [i3][root][~] eselect python list
> > Available Python interpreters:
> > [1] python2.7
> > [2] python3.1
> >
> > I.e. neither one was selected. Is it possible that...
> > * my selected version was python2.6
> > * I ran an update and removed the python 2.6
> > * but forgot to select 2.7
> >
>
> That is kind of what i told you...
I would like to add that whoever fixed the python 3 ebuilds and maybe
even other python ebuilds, to reset the python to what they are emerging
should be ... I have had this happen several times -- easy enough to
fix, but very annoying.
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?
John Covici
covici@ccs.covici.com
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-04-29 8:43 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-28 5:40 [gentoo-user] Scripts not working... HELP! Walter Dnes
2011-04-28 6:11 ` Alexey Mishustin
2011-04-28 6:12 ` Norman Rieß
2011-04-28 10:21 ` Alex Schuster
2011-04-28 22:16 ` [gentoo-user] [SOLVED] " Walter Dnes
2011-04-29 7:25 ` Norman Rieß
2011-04-29 8:31 ` Mick
2011-04-29 8:41 ` covici
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox