Your personal feelings has some truth to it.
I won't go too much into details, but a linux boot process can be summarized as follows. (Subject to change, as init isn't always default anymore).
- The bootloader hands control over to the linux keel and
init.
init then goes through its checklists and starts traversing its runmodes
init goes into runlevel 1. This is also called Single User Mode, and this is where it starts the essential services for a functioning system. Only processes belonging to root can be started.
init goes into runlevel 2. Similar to the above, but multiuser mode. Processes from other users join the party.
- Runlevel 3 initiates network.
- 4 is skipped (I never understood why. Perpetually reserved for future use I guess).
init instead goes directly to 5, which is where xorg is started. Many userspace services (webservers, mail, etc etc) are commonly started here.
Now, to answer your question, I find it very unlikely that the script is able to start during the process of shutting down the system. If I remember correctly, it's not possible to launch new processes the normal way during this process. From what I understood, the main conce is that the script would start and leave a lockfile that'd be left during the reboot, thus preventing the script from ever running, am I correct? What I would do in this case is to have a small startup scrip, maybe on runlevel 3, that would delete this lockfile if found.
Recent Questions...
ما را در سایت Recent Questions دنبال میکنید
برچسب:
نویسنده: استخدام کار
بازدید: 193
تاريخ: چهارشنبه
12 خرداد
1395 ساعت: 17:38