Subject: /etc/rc.shutdown.local
To: None <tech-userlevel@NetBSD.org>
From: None <tlaronde@polynum.com>
List: tech-userlevel
Date: 03/17/2007 13:12:54
Hello,

When shutdown(8) is invoked, the rc.d framework does, in reverse order,
a clean stop of services launched (as declared via rc.conf).

For example for PostgreSQL, I wanted to benefit for such a feature but I
wasn't really enthusiastic about placing scripts in /etc/rc.d (I prefer
to keep things orthogonal between system and local additions, I mean
clearly identifying in the file system hierarchy what is added).

Reading /etc/rc.d/local I discovered that such a hook does exist: it's
/etc/rc.shutdown.local.

IMHO it would be helpful to "advertise" this existence by putting a
template empty /etc/rc.shutdown.local in the base distribution, à la
/etc/rc.local.

Regards,

-- 
Thierry Laronde (Alceste) <tlaronde +AT+ polynum +dot+ com>
                 http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C