Re: systemctl command that is the same as chkconfig --level

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2011-06-18 at 10:30 -0400, Tom H wrote:
> On Sat, Jun 18, 2011 at 9:18 AM, Aaron Konstam <akonstam@xxxxxxxxxxxxx> wrote:
> > On Fri, 2011-06-17 at 19:01 -0400, Sam Varshavchik wrote:
> >> Petrus de Calguarium writes:
> >>
> >>> To start it during this session:
> >>> systemctl start <service name>.service
> >>>
> >>> To start every time you start graphical.target:
> >>> systemctl enable <service name>.service
> >>>
> >>> I'm not sure how you would differentiate between multi-user.target and
> >>> graphical.target.
> >>
> >> This is specified by the service unit. systemd uses a slightly different
> >> paradigm. The service itself knows what system state it should be running
> >> in, by default. Enabling the service puts it as a target for the state.
> >
> > Now II am really confused. How does a service like sshd.service know
> > what system state it is to run  at
> 
> For sysvinit services, it probably looks at the "/etc/init.d/" script headers.
> 
> For example, you have to start the nfs server after installing it.
> 
> "/etc/init.d/nfs" has
> 
> --- 8< ---
> chkconfig - 30 60
> --- >8 ---
> 
> in its "checkconfig" header section and
> 
> --- 8< ---
> Required-Start: $local_fs $network $syslog $rpcbind
> Required-Stop: $local_fs $network $syslog $rpcbind
> Defaul-Stop: 0 1 6
> --- >8 ---
> 
> in its LSB header section.
> 
> Running "systemctl enable nfs" set it up to start in runlevels 2 3 4 5
> and stop in runlevels 0 1 6 in the same way that "chkconfig nfs on"
> would (in fact, since the nfs server's a legacy service, there's a
> message that systemctl's handing over to chkconfig - I've forgotten
> the actual wording).
> 
> Since runlevels 2 3 4 are symlinked to multi-user.target, ...
> 
> For systemd services, it probably looks at the "Unit" section of the
> "*.service" files in "/lib/systemd/system/".

That is certainly useful information.
But: chkconfig --level 35 nfs on

would start on entering runlevel 3 and 5 and not on entering runlevel 2
4. Are you saying you can't arrange to do that in systemd. Is that
considered a step up?
-- 
=======================================================================
Not drinking, chasing women, or doing drugs won't make you live longer
-- it just seems that way.
=======================================================================
Aaron Konstam telephone: (210) 656-0355 e-mail: akonstam@xxxxxxxxxxxxx

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux