Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
No output on logout...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
softchill
n00b
n00b


Joined: 28 Jun 2003
Posts: 73
Location: Quebec, Canada

PostPosted: Wed May 26, 2004 1:00 am    Post subject: No output on logout... Reply with quote

Hi,

I put
Code:
 echo "allo"
in my .bash_logout and it doesn't get displayed.
I am sure that it is executing (I also create files with touch).

I don't really care about the output of the .bash_logout file but I do
want the output displayed by a PAM module that I have written (for
debugging). I do not have this problem on Debian.

Does anybody know what's causing this behavior on Gentoo?

Thanks,
Kristian Benoit
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722

PostPosted: Wed May 26, 2004 1:16 am    Post subject: Reply with quote

Works for me...
However, it only gets executed if the shell was a login shell. Try a
Code:
bash --login
followed by an immediate logout - it'll probably execute.
Also: Don't throw a brick yet (I realize this is a stupid question, but sillier oversights have happened) - is the .bash_logout file in your homedir? Also,
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
softchill
n00b
n00b


Joined: 28 Jun 2003
Posts: 73
Location: Quebec, Canada

PostPosted: Wed May 26, 2004 12:45 pm    Post subject: Reply with quote

Thanks, but as I already wrote, the
.bash_logout get executed as a "touch ~/foo"
in it does it's job. The problem is just about
the output. Strangely I dont have the problem
at home... Anyone know what could redirect
the output before .bash_logout get executed? Or perhaps
someone just know the order of execution
at logout which would help find the bug.
Thanks
Kristian Benoit
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722

PostPosted: Wed May 26, 2004 12:51 pm    Post subject: Reply with quote

softchill wrote:
Thanks, but as I already wrote, the
.bash_logout get executed as a "touch ~/foo"
in it does it's job.


Oh - didn't get that one across, I was under the impression that you meant you'd created the file by touching it :) My bad.
Don't know what could cause it - does it echo any special escape sequences or the like?
The order of execution is in man bash :)
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
softchill
n00b
n00b


Joined: 28 Jun 2003
Posts: 73
Location: Quebec, Canada

PostPosted: Wed May 26, 2004 1:59 pm    Post subject: Reply with quote

Thanks for the tip of the bash manual...
Anyway, it just display "logout" and
that's all.
Back to top
View user's profile Send private message
meyerm
Veteran
Veteran


Joined: 27 Jun 2002
Posts: 1311
Location: Munich / Germany

PostPosted: Wed May 26, 2004 9:06 pm    Post subject: Reply with quote

As it sometimes happens too me that I simply don't see some obvious things, I'd like to say sth to that:

Code:
meyerm@yavin meyerm $ echo "echo Hallo Du" > .bash_logout
meyerm@yavin meyerm $ echo "touch undwech" >> .bash_logout
meyerm@yavin meyerm $ bash
meyerm@yavin meyerm $ exit
meyerm@yavin meyerm $ ls -l und*
ls: und*: No such file or directory
meyerm@yavin meyerm $ bash --login
meyerm@yavin meyerm $ logout
Hallo Du
meyerm@yavin meyerm $ ls -l und*
-rw-r--r--  1 meyerm users 0 May 26 23:02 undwech
meyerm@yavin meyerm $


Are you really sure that .bash_logout is executed when you are using NO login shell?

man bash wrote:

When a login shell exits, bash reads and executes commands from the file ~/.bash_logout, if it exists.


Good evening (or perhaps sth. else ;-) )
Marcel
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum