How to disallow logout

Atom Smasher atom at smasher.org
Fri Sep 10 03:34:50 UTC 2010


On Thu, 9 Sep 2010, Aryeh Friedman wrote:

> I have a directory that must not exist on logout and rm -rf is not 
> sufficent to do it because the contents need to be processed by our 
> version control system.
=====================

what i would do... make an alias or function of "logout" and/or "exit" in 
the init file that's parsed when the shell starts. alias it to a script or 
assign it to a function that does what you need.

if your shell supports logging out with ^D (or any other keybinding) then 
the details may be shell-specific, but the idea would be to either disable 
it, or bind it to the script.


-- 
         ...atom

  ________________________
  http://atom.smasher.org/
  762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
  -------------------------------------------------

 	"The reasonable man adapts himself to the world; the
 	 unreasonable one persists in trying to adapt the world to
 	 himself. Therefore all progress depends on the
 	 unreasonable man."
 		-- George Bernard Shaw



More information about the freebsd-hackers mailing list