On 03/02/2016 11:56 PM, Linda Walsh wrote:
I was looking over the services in my sysd dir, and notice that some of them end with an '@' sign for no _apparent_ reason:
sys/arpwatch@.service* sys/mdmon@.service sys/kmsconvt@.service sys/openvpn@.service sys/mdadm-grow-continue@.service sys/teamd@.service sys/mdadm-last-resort@.service sys/vpnc@.service sys/mdadm-last-resort@.timer sys/wacom-inputattach@.service
I currently have 122 service entries, with 9 services using '@', and 2 timers w/1 ending in @.
I don't have those. What package do the come with?
Anyone know why '@' is part of the name, or why it is even considered "a good thing" to include '@' as part of a service name (that isn't a "service@location")?
These are not actual service units, they are templates for the generator to work with. The most common example is the getty@.service, though I've made use of the vpn@.servcie as well. If you trace though the active /etc/systemd/system/getty.target.wants You will find and instantiation such as getty@tty1.service The clue that this is built from a template is the line Description=Getty on %I And then there is Documentation=man:agetty(8) man:systemd-getty-generator(8) Documentation=http://0pointer.de/blog/projects/serial-console.html SYSTEMD-GETTY-GENERATOR(8) goes on the explain that it instantiates the actual instance of the getty. The cool thing about this is that the service getty@tty2.service though getty@tty6.service don't actually exist until you hotkey and use those VT! Pretty neat, eh? It use to be that to use a openVPN I had to set up an entry for it in in the Xinetd.conf file and that was just one instance. I had to create more instances for additional VPNs. YMMV. Under systemd this is done with a template and instantiation just like with ttys. <quote src="https://fedoraproject.org/wiki/Openvpn#Working_with_systemd"> With the transition to systemd, OpenVPN no longer has a single monolithic init script, where every connection with a configuration file in /etc/openvpn/ is started automatically. Instead, individual connections can be started and stopped with systemctl. </quote> Hey, that means I can set up arbitrary links like I do with SSH! The most obvious use of templates is to start up FSCK as needed. See man systemd-fsck@.service Its wonderful what you can find if you RTFM. I've learnt something about systemd and instantiation and use of systemctl while researching this post :-) I'm not a systemd guru by any means, just curious and open minded and think that if I have to live with systemd I better not fight and and bitch and complain but rather learn a little more each day. Thank you, Linda, for prompting me to look further into this :-) -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org