Sysinit file
This article or section is out of date. On systems based on SysVinit, init is the first process that is executed once the Linux kernel loads. The word init will always refer to sysvinit in this article.
It contains directions for init on what programs and scripts to run when entering a specific runlevel. This article concentrates on init and inittab. This step will remove systemd-sysvcompat , and you will use sysvinit on reboot. A snapshot of init scripts as packaged in Arch Linux before migration to systemd is available at arch-rcscripts. For support with newer packages, see Writing rc. See Init Configuration for generic configuration steps. You can get an idea of where init lies in the process hierarchy of your system with pstree :.
Besides usual initialization of system as the name suggests , init also handles rebooting, shutdown and booting into recovery mode single-user mode. To support these, inittab groups entries into different runlevel s. The runlevels Arch uses are 0 for halt, 1 aliased as S for single-user mode, 3 for normal booting multi-user mode , 5 for X and 6 for reboot. Other distros may adopt other conventions, but the meanings of 0, 1 and 6 are universal. Upon execution, init scans inittab and carry out appropriate actions.
An entry in inittab takes the form. Where id is a unique identifier for the entry just a name, no real impact on init , and runlevels is a not delimited string of runlevels. If the runlevel init is entering appears in runlevels , action is carried out, executing process if appropriate. The system displays and interprets local times and automatically determines when daylight saving time starts and ends.
This means that you can have dial-up users in different time zones on the same computer, and they can all see the correct current local time.
It also helps when transmitting data from time zone to time zone. You should also know that unit files have templates. An example of a service unit file template is sshd. You will need to follow a unit file template to be able to successfully create a unit file.
When a service is enabled, a symbolic link that is associated with a target will automatically be created in a wants file, meaning that the service, of course, is wanted by a specific target and it has to be defined in a want file.
For instance, in the last line of the sshd unit file above, if the sshd service is enabled, a symbolic link will be created in the multi-user. From the word systemctl system control , it is used to control the systemd service manager.
Masking a service is ciesing a service from starting whether or whether not a user tries to start the service. It is similar to disabling a service, but this time around, the service will be prevented from being activated when any user on the system, even with the right privileges tries to start the masked service. Masking a service can be imperative when you need to totally deactivate a service that can disrupt the system so that any other user on the system will not be able to start the service.
When a service is masked, no user on the system, including the root user can start the service unless the service is unmasked. If there are changes made in the configuration file while the service is started, the service will not recognize the new changes made because the service was not initialized with the changes.
The service must be restarted or reloaded so that it can be initialized with the new changes. The reload option will make the new changes take effect without changing the process ID.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. System init file Ask Question. Asked 11 years, 4 months ago. Active 11 years, 4 months ago. Viewed times. Improve this question. Poorna Poorna 1 1 gold badge 2 2 silver badges 9 9 bronze badges. Add a comment.
0コメント