2

I have an upstart script that needs to run on reboot or shutdown, but it needs to access the network to post an http requests and wait for the replies, I tried

start on starting rc

and

start on starting (rc and net-device-up IFACE=eth0)

but no luck.

Unenumrated
  • 121
  • 1
  • nope, it doesn't work and doesn't answer my question see the last comment in the first answer, it doesn't block the shutdown, I need to block the shutdown until my script finishes – Unenumrated Feb 11 '14 at 17:31
  • Problem with blocking shutdown is that the system may assume that the blocker is simply crashed/frozen, and kill it. Shutdown on some devices may assume that the user may be inconvenienced by the lengthy delay (they might miss a bus), or that power is about imminently shut off (low battery)...init has no way to be convinced that your shutdown job is intended behavior. That's why shutdown jobs are discouraged. – user535733 Mar 20 '14 at 15:16

0 Answers0