# Extending the shutdown time



## PacketMan (Dec 24, 2018)

If I wanted to extended the `shutdown` process time would I modify 
	
	



```
kern.init_shutdown_timeout
```
 from its default of 120, to say 300 for example?  The goal would be allow programs more time to complete their shutdown process, before they could receive the TERM, and KILL signals from init(8).

So for this objective I could do this?
kern.init_shutdown_timeout=300

I'll play with this over the Christmas days (there are 12 of them you know.  )  but is there any reason I should not do this?


----------



## twllnbrck (Dec 24, 2018)

You could use an alias for shutdown(8) in your default shell instead of changing the default sysctls


----------



## xtaz (Dec 24, 2018)

I set rcshutdown_timeout="300" in /etc/rc.conf. I assume that just sets the sysctl that you mentioned.

**edit** No it doesn't. That's something else, as even with that set the sysctl you mentioned is 120. What's the difference then?

**edit2** OK. So it looks like that rc variable starts a watchdog timer which terminates the shutdown process if it's still running after that time. So that's different to what you wanted.

So for what you wanted, I would say yes, just set it in /etc/sysctl.conf. Shouldn't cause any issues I wouldn't have thought.

**edit3** Some info I just found on google: https://people.freebsd.org/~rse/work/shutdown-timeout.txt


----------



## PacketMan (Dec 28, 2018)

I realize there are documents out there that state "kern.shutdown_timeout" was declared "unused" in 1999", but is that really true.  If it is true then why does it even show up 20 years later?

Surely extending the shutdown sequence to 300 minutes should be easy peesy and well understood.  It would be nice if there was more detail  in Section 12.5 of the handbook.

I'll try to play around with this soon.


----------

