LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-28-2012, 10:23 AM   #1
Brandon9000
Member
 
Registered: Apr 2012
Location: Florida
Distribution: Many
Posts: 111

Rep: Reputation: Disabled
Systemd Targets


In systemd, the System V init concept of runlevels is replaced by the concept of targets. In a service file, e.g. bluetooth.service, in the install section, there will be a line like

WantedBy= multi-user.target

This means that when the target, multi-user, becomes active, the service, bluetooth in my example, will be started.

I am writing a program which needs to list every service's target. So I am trying to program finding it. Of course, my program could go to the /lib/systemd/system directory and parsing bluetooth.service to get the target, but is there some command I could give that would simply print out the target for a given service?
 
Old 10-17-2012, 11:50 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,561
Blog Entries: 54

Rep: Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927
Short answer: no

Quote:
Originally Posted by Brandon9000 View Post
is there some command I could give that would simply print out the target for a given service?
I did call forth the daemon but regardless of the paraphernalia and incantations used it wouldn't be persuaded into emitting a response suitable for parsing.
 
Old 10-17-2012, 12:59 PM   #3
Brandon9000
Member
 
Registered: Apr 2012
Location: Florida
Distribution: Many
Posts: 111

Original Poster
Rep: Reputation: Disabled
Thanks for trying.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Systemd Brandon9000 Linux - General 3 09-18-2012 03:45 PM
[SOLVED] slackware and systemd fl0 Slackware 512 08-29-2012 12:07 PM
slackware and systemd (OT) eloi Slackware 44 08-24-2012 05:36 PM
Systemd custangro Fedora 2 08-01-2011 08:54 AM
Boot Delay 30min: systemd-analyze blame systemd-tmpfiles-setup.service BGHolmes Fedora 0 07-27-2011 10:02 AM


All times are GMT -5. The time now is 06:44 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration