WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Startup script execution order?  (Read 3089 times)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Startup script execution order?
« on: November 18, 2009, 05:23:50 PM »
What is the actual startup script execution order? Are these executed in alphabetic order one by one when all extensions loaded or parallel? Is there a difference in 2.5 and 2.6?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Startup script execution order?
« Reply #1 on: November 19, 2009, 02:14:00 AM »
iirc, they are in alphabetical order, and are executed one-by-one as part of each extension's loading

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Startup script execution order?
« Reply #2 on: November 19, 2009, 03:07:17 AM »
iirc, they are in alphabetical order, and are executed one-by-one as part of each extension's loading

Are you saying script is executed immediately after the extension is loaded and not after all extensions loaded?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Startup script execution order?
« Reply #3 on: November 19, 2009, 03:14:16 AM »
Yes

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Startup script execution order?
« Reply #4 on: November 19, 2009, 05:21:47 AM »
Actually, it has been recently changed to where during boot if an extension has a startup script, that startup script name is echoed to a file and the order of extensions is loaded alphabetically, but with dependencies loaded first if a dep file exists for the extension.  At the end of boot, the name of the startup scripts exist in the file in the order that the extensions were loaded.  Then at the end of boot after depmod and ldconfig are run, the startup scripts are executed from that list.

In other words, if dbus has expat listed as a dependency, then expat gets loaded and it's startup script is run before dbus's both during boot as well as with appbrowser use.
« Last Edit: November 19, 2009, 05:26:07 AM by Jason W »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Startup script execution order?
« Reply #5 on: November 19, 2009, 05:48:04 AM »
Jason, thanks for the explanation, it is clear. Only one question. In which version is it introduced? Is 2.5 and 2.6x behaves on the same way or is it new in 2.6?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Startup script execution order?
« Reply #6 on: November 19, 2009, 06:02:52 AM »
Introduced in 2.5, but functionally it has the same effect on extensions as the previous manner of running the scripts upon each extension load during boot, deps first.