.bash_logout and shutdown -- need ideas

Svein Halvor Halvorsen svein.h at lvor.halvorsen.cc
Fri Aug 4 17:38:31 UTC 2006


DW wrote:
> Just started using a .bash_logout script to handle doing my unison
:
> The problem with that though, is that the shutdown process runs as root,
> and just drops the system, and I'm never actually getting logged out as
> much as booted out. So my .bash_logout doesn't run, and thus no unison
> unless I remember to run it manually first.
> 
> Any ideas on how to work around this sitch?


At shutdown FreeBSD runs /etc/rc.shutdown. It seems that this script, by
means of /etc/rc.subr, will iterate all the files in (among others)
/usr/local/etc/rc.d/ and call them with the "faststop" argument.

Maybe you could just add a script in there?

(Actually, only files with a "# PROVIDES" line are considered, it seems,
so you should think about that).


	Svein Halvor

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 247 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20060804/e5fc86ba/signature.pgp


More information about the freebsd-questions mailing list