LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 09: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, 10:50 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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, 11:59 AM   #3
Brandon9000
Member
 
Registered: Apr 2012
Location: Florida
Distribution: Many
Posts: 111

Original Poster
Rep: Reputation: Disabled
Thanks for trying.
 
  


Reply



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 02:45 PM
[SOLVED] slackware and systemd fl0 Slackware 512 08-29-2012 11:07 AM
slackware and systemd (OT) eloi Slackware 44 08-24-2012 04:36 PM
Systemd custangro Fedora 2 08-01-2011 07:54 AM
Boot Delay 30min: systemd-analyze blame systemd-tmpfiles-setup.service BGHolmes Fedora 0 07-27-2011 09:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:26 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration