![]() |
|
||||||||
ForumWed Feb 5 00:42:31 2025 UTC
Help:
Cards: The Package Manager
![]() Mon Feb 3 16:37:02 2025 UTC
Help:
Cards: The Package Manager
![]() Mon Feb 3 00:02:45 2025 UTC
Help:
Cards: The Package Manager
![]() Sun Feb 2 05:04:23 2025 UTC
Help:
Cards: The Package Manager
![]() Mon Jan 13 10:12:36 2025 UTC
Help:
General
![]() Mon Dec 16 08:41:36 2024 UTC
Help:
General
![]() Wed Nov 27 11:18:31 2024 UTC
Help:
General
![]() Sun Nov 24 14:26:31 2024 UTC
Help:
General
![]() Mon Nov 18 18:43:34 2024 UTC
Help:
General
![]() Wed Nov 13 08:34:40 2024 UTC
Help:
General
![]() |
Sat Dec 28 14:08:52 2019 UTC SysVinitContentsIntroductionSysVinit is the init process (the process that starts other processies) of NuTyX. Inits are often called PID1 (process ID 1) since they are always the first process to start on a system. They INITialize the system. SysVinit's origins can be traced back to unix and has been frequently used in numerous distros.
RunlevelsSysVinit functions by defining what processes startup based on their runlevels. Runlevels can be found be in the /etc/rc.d folder and are defined in the /etc/initab file. Navigate to /etc/rc.d using the cd command:
cd /etc/rc.d The output from an ls command should be:
init.d rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d rcS.d The following directories e.g. rc0, rc1, etc are all runlevels in NuTyX.
Runlevels in NuTyXThe default configuration of the NuTyX runlevels is:
rcS is a runlevel whose main use is for the initialization of the system. Runlevel 4 is a repeat of 3 so that a user may edit it and use it for what they seem fit.
Contents of the FoldersNavigating to each runlevel, the contents can be listed out through an ls command:
ls Example of my runlevel 2:
K46ntpd K80network S15dbus S25cups S25random S31elogind S70gpm All files within this directory are not startup scripts themselves but symbolic links to startup scripts. These scripts are contained in the /etc/init.d directory. The letter beginning each link has significance. A link beginning with k means that the service is killed at this run level and needs the appropriate portion of the script to run. S means that the service must start at this runlevel. The number following the letter indicates the priority for the service to start or be killed (when starting up services, in what order to start them). The lower numbers are started first and then the higher ones are started.
Looking at a Startup ScriptOpen a script in /etc/init.d with your favorite text editor. The following is a portion of my cups file within init.d:
case $1 in start) log_info_msg "Starting CUPS Printserver..." start_daemon /usr/sbin/cupsd evaluate_retval ;; stop) log_info_msg "Stopping CUPS Printserver..." killproc /usr/sbin/cupsd evaluate_retval ;; Each script is a file written in bash that contains a "case" statement. "Case" statements are used to match an arguement to several different outcomes. Through "case" statements, these scripts only run portions of code needed for specific tasks. For example, upon starting a service, a script will run all of the lines relating to "start" and then "end". |