Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=xfcetesting.git;a=commitdiff;h=717392737d32e771260b109763a1b3b5d0e19473

commit 717392737d32e771260b109763a1b3b5d0e19473
Author: Miklos Vajna <vmik...@frugalware.org>
Date:   Thu Feb 24 00:18:30 2011 +0100

docs/init: update for systemd

diff --git a/docs/init.txt b/docs/init.txt
index cd19ed9..64afcf5 100644
--- a/docs/init.txt
+++ b/docs/init.txt
@@ -2,7 +2,7 @@

== About the kernel

-The Linux kernel is in the kernel package. We use as few patches as possible
+The Linux kernel is in the `kernel` package. We use as few patches as possible
to stay close to the vanilla kernel. We also use
http://alioth.debian.org/projects/splashy[splashy] instead of well known
bootsplash. The kernel contains compiled-in support for most IDE controllers,
@@ -33,29 +33,26 @@ saving changes.
# cp /usr/src/linux/arch/$yourarch$/boot/bzImage /boot/vmlinuz
------------------------------------------------------------
+
-On x86, `$yourarch$` has to be replaced by i386.
+On i686 and x86_64, `$yourarch$` has to be replaced by x86.

== Init scripts and services

-In Frugalware, init scripts are always called rc.something and
-they are located in /etc/rc.d. They are used to setup the environment and 
manage
-system services.
+In Frugalware, init is provided by systemd, its service files are always
+called something.service and they are located in /lib/systemd/system.
+They are used to setup the environment and manage system services.

The services are UNIX daemons that provide various functionality. The spectrum
of their actions is very large. Synchronizing your system clock, running your 
webserver,
running the virus scanner, all of these are services and they offer much much 
more.

-The files that allow you to manage them can be found in /etc/rc.d, but usually
-you will prefer to use our utility `service`. This tool allows you to control
-the running state of the services.
-
In the following examples we will explain how to alter the running state of
-a given service. You will have to replace `$service_name$` with the wanted 
service name.
-As you will see the syntax is simple, and you may get more help looking at the
-`service` manual doing:
+a given service. You will have to replace `$service_name$` with the
+wanted service name, for example `crond.service`.  As you will see the
+syntax is simple, and you may get more help looking at the `systemctl`
+manual doing:

-------------
-$ man service
+$ man systemctl
-------------

IMPORTANT: Later in this document you will see how to alter the configuration 
of these
@@ -69,21 +66,21 @@ system has to offer.

To start a service, simply do:

-------------------------------
-# service $service_name$ start
-------------------------------
+----
+# systemctl start $service_name$
+----

To restart a service, simply do:

---------------------------------
-# service $service_name$ restart
---------------------------------
+-----
+# systemctl restart $service_name$
+-----

To stop a service, simply do:

------------------------------
-# service $service_name$ stop
------------------------------
+----
+# systemctl stop $service_name$
+----

As you can see, controlling a service execution is pretty simple.

@@ -93,45 +90,50 @@ Controlling the automatic execution of services on system 
startup is not much mo

To add a service for automatic execution on system startup, simply do:

-----------------------------
-# service $service_name$ add
-----------------------------
+----
+# systemctl enable $service_name$
+----

To delete a service from automatic execution on system startup, simply do:

-----------------------------
-# service $service_name$ del
-----------------------------
+----
+# systemctl disable $service_name$
+----
+
+To check if the service is enabled, simply do:

-To list the runlevels in which the service will be running, simply do:
+-----
+# systemctl is-enabled $service_name$; echo $?
+----

------------------------------
-# service $service_name$ list
------------------------------
+NOTE: `0` in the output means 'enabled', `1` means 'disabled'

-== System boot, runlevels
+== System boot, targets

If you don't pass any extra 'init=/path/to/init' parameters to it, the kernel
will start /sbin/init as the final step of the kernel boot sequence.
-According to the content of /etc/inittab, init will run:
+According to /etc/systemd/system/default.target, init will run:
+
+1. each service file required by `basic.target`

-1. each S* script at /etc/rc.d/rcS.d
+2. each service file required by the default target.
+This is set to `graphical.target` by default. Here is the list of
+available targets:

-2. each S* script at /etc/rc.d/rcn.d, where n is the default runlevel.
-This is set to 4 by default. Here is the list of available runlevels:
+----
+halt.target = halt
+emergency.target = similar to 'init=/bin/sh'
+rescue.target = single user mode
+multi-user.target = multiuser mode (text mode)
+graphical.target = multiuser mode, X11 with KDM/GDM/XDM (default Frugalware 
target)
+reboot.target = reboot
+----

---------------------------------------------------------------------------
-0 = halt
-1 = single user mode
-2 = unused (but configured the same as runlevel 3)
-3 = multiuser mode (text mode)
-4 = multiuser mode, X11 with KDM/GDM/XDM (default Frugalware runlevel)
-5 = unused (but configured the same as runlevel 3)
-6 = reboot
---------------------------------------------------------------------------
+NOTE: `emergency.target` has the advantage that you can boot the system
+without a reboot later.

-If X11 is configured, /etc/rc.d/rc.4 will start one of the desktop managers,
-as configured in '/etc/sysconfig/desktop'.
+If X11 is configured, prefdm.service will start one of the desktop
+managers, as configured in '/etc/sysconfig/desktop'.

== GRUB gfxmenu
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to