[systemd-devel] systemd inquiry

Mark Hounschell markh at compro.net
Mon Apr 9 09:40:31 PDT 2012


On 04/09/2012 10:30 AM, Colin Guthrie wrote:
> 'Twas brillig, and Mark Hounschell at 09/04/12 14:59 did gyre and gimble:
>> On 04/05/2012 05:23 PM, Colin Guthrie wrote:
>>> 'Twas brillig, and Mark Hounschell at 05/04/12 18:26 did gyre and gimble:
>>>> I'm not a systemd developer but I am trying to use it in place of
>>>> sysvinit to create a dedicated "run-level" for our application. Is this
>>>> list an appropriate place to inquire about problems I have?
>>>
>>> Yup, ask questions here, but make sure you've read up on the various
>>> articles and documentation and such like on
>>> http://www.freedesktop.org/wiki/Software/systemd first :)
>>>
>>
>> Thanks, I've read a lot but nowhere did I find pointers to do what I
>> need to do. So I thought I would just try to understand the process of
>> getting to "single-user" mode. I expected  that I would be able to look
>> at /lib/systemd/system/single.target for a starting point but it's just
>> a link to /dev/null? I was then lost....
>>
>> So I just created a test target that I expected/hoped would just start a
>> single mingetty on tty1. It did do that but I also got agettys on ttys
>> 2-6.
>
> Are you sure you get them? Are they not started on-demand as soon as you
> switch to them? This is handled by autovt at .serivce (which is just a
> symlink to getty at .service by default).
>

You are correct, they were started "on demand" when I switched to them.

> Systemd handles this magically. Simply set: NAutoVTs=0 in logind.conf to
> disable.
>

Yep, that works. Can the NAutoVTs be set differently on a per target basis?

> Make sure however you do enabled at least one getty manually if you do
> this. I'm not sure you test.target did that. You'll want a
> test.target.wants/getty at tty1.service symlink (pointing to your
> getty at .service file.
>

Simply adding the "Wants=mingetty at tty1.service" to the target file seems 
to be enough. A link in the .wants directory doesn't seem to be needed.

>> I also got some unwanted Console-Kit and Polkit stuff running that
>> I also do not want or need.
>
> Well consolekit I agree with, but polkit is likely loaded automatically
> when you start running systemctl commands. It uses polkit to decide
> whether or not you are allowed to do stuff.
>
> However, consolekit is likely started as a consequence of logging in.
>
> Chances are you have some pam modules (i.e. pam_ck_connector) in
> whatever pam config you're using to login.
>

Yep, you are correct. Using sysvinit, I get the same thing.

This might turn out to be easier than I thought after all. Can you 
comment on the NAutoVTs thing above?

Thanks and regards
Mark




More information about the systemd-devel mailing list