View previous topic :: View next topic |
Author |
Message |
softchill n00b
Joined: 28 Jun 2003 Posts: 73 Location: Quebec, Canada
|
Posted: Wed May 26, 2004 1:00 am Post subject: No output on logout... |
|
|
Hi,
I put 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 |
|
|
moocha Watchman
Joined: 21 Oct 2003 Posts: 5722
|
Posted: Wed May 26, 2004 1:16 am Post subject: |
|
|
Works for me...
However, it only gets executed if the shell was a login shell. Try a 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 |
|
|
softchill n00b
Joined: 28 Jun 2003 Posts: 73 Location: Quebec, Canada
|
Posted: Wed May 26, 2004 12:45 pm Post subject: |
|
|
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 |
|
|
moocha Watchman
Joined: 21 Oct 2003 Posts: 5722
|
Posted: Wed May 26, 2004 12:51 pm Post subject: |
|
|
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 |
|
|
softchill n00b
Joined: 28 Jun 2003 Posts: 73 Location: Quebec, Canada
|
Posted: Wed May 26, 2004 1:59 pm Post subject: |
|
|
Thanks for the tip of the bash manual...
Anyway, it just display "logout" and
that's all. |
|
Back to top |
|
|
meyerm Veteran
Joined: 27 Jun 2002 Posts: 1311 Location: Munich / Germany
|
Posted: Wed May 26, 2004 9:06 pm Post subject: |
|
|
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 |
|
|
|