LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Systemd (https://www.linuxquestions.org/questions/linux-general-1/systemd-4175427871/)

Brandon9000 09-18-2012 01:39 PM

Systemd
 
All of the work I've done on services has utilized the initd system. I have been trying to understand the systemd method,but after Googling for several hours, there are still some basic things I don't understand. For example, suppose that bluetooth is supposed to come up when the machine boots. How does systemd find out that bluetooth is supposed to start? I've read a lot during the past few hours about .target files and it doesn't help me understand this. In the initd system, it would know because there was a script beginning with the letter "S" in the rcn.d directory of the current runlevel.

TobiSGD 09-18-2012 01:48 PM

You just put a symlink to the bluetooth daemons .service file into the .want-directory for the .target you want to start it in and reload the configuration.
Have a look here: http://www.freedesktop.org/wiki/Soft...AskedQuestions

Brandon9000 09-18-2012 02:21 PM

Thanks. I Googled this for about three hours without any satisfaction.

Let me ask a related question. In the SysV init system, if some maintenance script saw that a service was down and wanted to know whether it ought to be restarted, it could check the current runlevel, and then look in the rc.d directory for that runlevel to see if the service had an "S" script or a "K" script. If it had an "S" script, it would mean that the service ought to be up in the present runlevel and should be restarted.

What is the parallel for systemd? Let's say that I am a maintenance script. I wake up and I see that bluetooth is down. How do I know whether or not it is supposed to be up? In the initd system, first I would have to check what runlevel I was running in. In some runlevels it should be up and in some it should be down. How does this work for systemd?

TobiSGD 09-18-2012 02:45 PM

With systemd you don't have to bother about that, it is doing things like that automatically.
At least, if I am not mistaken, I never used systemd, but became curios now and are at this time doing an install of Arch to have a look at systemd.


All times are GMT -5. The time now is 03:41 AM.