1997-08-02 00:22:52 +00:00
|
|
|
#!/bin/sh
|
1999-08-27 23:37:10 +00:00
|
|
|
# $FreeBSD$
|
1997-08-02 00:22:52 +00:00
|
|
|
|
1999-09-13 15:44:20 +00:00
|
|
|
# Site-specific closing actions for daemons run by init on shutdown,
|
1997-08-02 00:22:52 +00:00
|
|
|
# or before going single-user from multi-user.
|
|
|
|
# Output and errors are directed to console by init, and the
|
|
|
|
# console is the controlling terminal.
|
|
|
|
|
|
|
|
stty status '^T'
|
|
|
|
|
|
|
|
# Set shell to ignore SIGINT (2), but not children;
|
|
|
|
# shell catches SIGQUIT (3) and returns to single user after fsck.
|
|
|
|
trap : 2
|
|
|
|
trap : 3 # shouldn't be needed
|
|
|
|
|
1999-09-13 15:44:20 +00:00
|
|
|
HOME=/
|
1997-08-02 00:22:52 +00:00
|
|
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
|
1999-09-13 15:44:20 +00:00
|
|
|
export HOME PATH
|
1997-08-02 00:22:52 +00:00
|
|
|
|
1999-11-22 04:23:11 +00:00
|
|
|
# Check if /var/db/mounttab is clean.
|
|
|
|
case $1 in
|
|
|
|
reboot)
|
|
|
|
if [ -f /var/db/mounttab ]; then
|
|
|
|
rpc.umntall
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
1999-09-13 15:44:20 +00:00
|
|
|
echo -n "Shutting down daemon processes: "
|
1997-08-02 00:22:52 +00:00
|
|
|
|
|
|
|
# Insert shutdown procedures here
|
|
|
|
|
|
|
|
|
|
|
|
echo '.'
|
|
|
|
exit 0
|