Changeset 5bc57bb


Ignore:
Timestamp:
07/15/2014 11:44:38 AM (10 years ago)
Author:
Christopher Gregory <cjg@…>
Branches:
gnome
Children:
d555a31
Parents:
cae7a6f
Message:

Converted ntp rpcbind rsync samba wpa_supplicant avahi networkmanager and wicd pages to systemd

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/gnome@13414 af4574ff-66df-0310-9fd7-8a98e5e911e0

Files:
9 edited

Legend:

Unmodified
Added
Removed
  • introduction/welcome/changelog.xml

    rcae7a6f r5bc57bb  
    4444
    4545-->
     46
     47    <listitem>
     48      <para>July 15th, 2014</para>
     49      <itemizedlist>
     50        <listitem>
     51          <para>[cjg] - Converted ntp page to systemd.</para>
     52        </listitem>
     53        <listitem>
     54          <para>[cjg] - Converted rcpbind page to systemd.</para>
     55        </listitem>
     56        <listitem>
     57          <para>[cjg] - Converted rsync page to systemd.</para>
     58        </listitem>
     59        <listitem>
     60          <para>[cjg] - Converted samba page to systemd.</para>
     61        </listitem>
     62        <listitem>
     63          <para>[cjg] - Converted wpa_supplicant page to systemd.</para>
     64        </listitem>
     65          <listitem>
     66          <para>[cjg] - Converted avahi page to systemd.</para>
     67        </listitem>
     68         <listitem>
     69          <para>[cjg] - Converted networkmanager page to systemd.</para>
     70        </listitem>
     71         <listitem>
     72          <para>[cjg] - Converted wicd page to systemd.</para>
     73        </listitem>
     74      </itemizedlist>
     75    </listitem>
     76
    4677    <listitem>
    4778      <para>July 14th, 2014</para>
  • networking/netprogs/ntp.xml

    rcae7a6f r5bc57bb  
    173173    </sect3>
    174174
    175     <sect3  id="ntp-init">
     175    <sect3  id="ntp-init-systemd">
    176176      <title>Synchronizing the Time</title>
    177177
     
    182182
    183183      <para>If you choose Option one, then install the
    184       <filename>/etc/rc.d/init.d/ntp</filename>
    185       init script included in the
    186       <xref linkend="bootscripts"/> package.</para>
    187 
    188       <indexterm zone="ntp ntp-init">
     184        native systemd unit included in the
     185      <xref linkend="systemd-units"/> package as the <systemitem class="username">root</systemitem>
     186       user:</para>
     187
     188      <indexterm zone="ntp ntp-init-systemd">
    189189        <primary sortas="f-ntp">ntp</primary>
    190190      </indexterm>
  • networking/netprogs/rpcbind.xml

    rcae7a6f r5bc57bb  
    106106    <title>Configuring rpcbind</title>
    107107
    108     <sect3 id="rpcbind-init">
    109       <title>Boot Script</title>
     108    <sect3 id="rpcbind-init-systemd">
     109      <title>Systemd Unit File</title>
    110110
    111       <para>Install the <filename>/etc/rc.d/init.d/rpcbind</filename> init script
    112       included in the <xref linkend="bootscripts"/> package.</para>
     111      <para>The systemd-units package provides a native systemd unit file.
     112        To install and activate the systemd unit file included in the
     113      <xref linkend="systemd-units"/> package run the following command as the
     114      <systemitem class="username">root</systemitem> user:</para>
    113115
    114       <indexterm zone="rpcbind rpcbind-init">
     116      <indexterm zone="rpcbind rpcbind-init-systemd">
    115117         <primary sortas="f-rpcbind">rpcbind</primary>
    116118      </indexterm>
  • networking/netprogs/rsync.xml

    rcae7a6f r5bc57bb  
    164164    </sect3>
    165165
    166     <sect3 id="rsync-init">
    167       <title>Boot Script</title>
     166    <sect3 id="rsync-init-systemd">
     167      <title>Systemd Unit File</title>
    168168
    169169      <para>Note that you only want to start the
     
    171171      <application>rsync</application> archive on your local machine.
    172172      You don't need this script to run the
    173       <application>rsync</application> client.</para>
    174 
    175       <para>Install the <filename>/etc/rc.d/init.d/rsyncd</filename> init
    176       script included in the
    177       <xref linkend="bootscripts"/> package.</para>
     173      <application>rsync</application> client.
     174      The systemd-units package provides two types of units: A service file and
     175      a socket file. The service file will start rsyncd daemon once at boot
     176      and it will keep running until the system shuts down. The socket
     177      file will make systemd listen to sshd port (Default 873) and will start rsyncd daemon
     178      when something tries to connect to that port and stop the daemon when the connection is terminated.
     179      This is called socket activation.
     180      By default, the first method is used - rsyncd daemon is started at boot and stopped at shutdown.
     181      </para>
     182
     183      <para>To install the systemd unit file init included in the
     184      <xref linkend="systemd-units"/> package run the following command
     185       as the <systemitem class="username">root</systemitem>
     186       user:
     187      </para>
    178188
    179189<screen role="root"><userinput>make install-rsyncd</userinput></screen>
     190
     191      <note>
     192      <para>
     193       Note that socket method is only useful for remote backups. For local backups you'll need 
     194       the service method.
     195      </para>
     196      </note>
     197
     198      <para>
     199       If the socket method is desired, you need to run the following commands as the
     200       <systemitem class="username">root</systemitem>
     201       user:
     202      </para>
     203
     204<screen role="root">
     205<userinput>
     206
     207systemctl stop rsyncd &amp;&amp;
     208systemctl disable rsyncd.service &amp;&amp;
     209systemctl enable rsyncd.socket &amp;&amp;
     210systemctl start rsync.socket
     211
     212</userinput></screen>
    180213
    181214    </sect3>
  • networking/netprogs/samba.xml

    rcae7a6f r5bc57bb  
    397397      </sect4>
    398398
    399       <sect4 id="samba-init">
    400         <title>Boot Script</title>
    401 
    402         <para>For your convenience, boot scripts have been provided for
    403         <application>Samba</application>. There are two included in the
    404         <xref linkend="bootscripts"/> package. The first,
    405         <filename>samba</filename>, will start the <command>smbd</command>
    406         and <command>nmbd</command> daemons needed to provide SMB/CIFS
    407         services. The second script, <filename>winbind</filename>, starts
    408         the <command>winbindd</command> daemon, used for providing Windows
    409         domain services to Linux clients.</para>
    410 
    411         <indexterm zone="samba samba-init">
     399      <sect4 id="samba-init-systemd">
     400        <title>Systemd Unit File</title>
     401
     402        <para>The <xref linkend="systemd-units"/> package provides types of units:
     403         A service file and a socket file.
     404         The service file will start smbd daemon once at boot and it
     405         will keep running until the system shuts down. The socket
     406         file will make systemd listen to sshd port (Default 445) and
     407         will start smbd daemon when something tries to connect to that
     408         port and stop the daemon when the connection is terminated.
     409         This is called socket activation. By default, the first method
     410         is used - smbd daemon is started at boot and stopped at shutdown.
     411        </para>
     412
     413        <indexterm zone="samba samba-init-systemd">
    412414          <primary sortas="f-samba">samba</primary>
    413415        </indexterm>
    414416
    415         <indexterm zone="samba samba-init">
     417        <indexterm zone="samba samba-init-systemd">
    416418          <primary sortas="f-winbind">winbind</primary>
    417419        </indexterm>
     
    431433    -s /bin/false -u 99 nobody</userinput></screen>
    432434
    433         <para>Install the <filename>samba</filename> script with the following
     435        <para>Install the <filename>samba</filename> systemd unit file with the following
    434436        command issued as the <systemitem class="username">root</systemitem>
    435437        user:</para>
     
    441443
    442444<screen role="root"><userinput>make install-winbindd</userinput></screen>
     445
     446         <note>
     447         <para>
     448           Note that nmbd and winbindd do not have (and should/can not have)
     449           units for socket based activation.
     450         </para>
     451         </note>
     452
     453        <para>If the socket method is desired, you need to run
     454         the following command issues as the <systemitem class="username">root</systemitem>
     455         user:
     456        </para>
     457
     458<screen role="root">
     459<userinput>
     460
     461systemctl stop smbd &amp;&amp;
     462systemctl disable smbd.service &amp;&amp;
     463systemctl enable smbd.socket &amp;&amp;
     464systemctl start smbd.socket
     465
     466</userinput></screen>
     467
     468         <note>
     469         <para>
     470           Note that nmbd and winbindd do not have (and should/can not have)
     471           units for socket based activation.
     472         </para>
     473         </note>
    443474
    444475       </sect4>
  • networking/netprogs/wpa_supplicant.xml

    rcae7a6f r5bc57bb  
    312312
    313313      <para id="wpa-service">
    314         If you want to configure network interfaces at boot using
    315         <command>wpa_supplicant</command>, you need to install the
    316         <filename>/lib/services/wpa</filename> script
    317         included in <xref linkend="bootscripts"/> package:
    318       </para>
    319 
    320 <screen role="root"><userinput>make install-service-wpa</userinput></screen>
     314        This package provides systemd units in the source tarball.
     315        To install them, issue the following commands as the
     316        <systemitem class="username">root</systemitem> user:
     317      </para>
     318
     319<screen role="root">
     320<userinput>
     321install -v -m644 systemd/*.service /lib/systemd/system
     322</userinput></screen>
     323 
     324      <para>
     325        The following files were installed:
     326
     327        /lib/systemd/system/wpa_supplicant.service
     328
     329        /lib/systemd/system/wpa_supplicant-nl80211@.service
     330        /lib/systemd/system/wpa_supplicant-wired@.service
     331        /lib/systemd/system/wpa_supplicant@.service
     332
     333        The first service should be enabled if D-Bus interface was built into
     334        wpa_supplicant, so that wpa_supplicant D-Bus interface can be started at boot
     335        instead of being automatically activated by the D-Bus daemon which doesn't work
     336        when using systemd.
     337        To enable the service issue the following command as the
     338        <systemitem class="username">root</systemitem> user:
     339       </para>
     340
     341<screen role="root">
     342<userinput>
     343systemctl enable wpa_supplicant.service
     344</userinput></screen>
     345
     346       <para>
     347         The following three files are per-interface specific files.
     348         Much like LFS ifupdown@.service, they will start wpa_supplicant for a network
     349         interface. Only difference between the three files is the wpa_supplicant_driver
     350         being used.
     351
     352         The first one uses -Dnl80211, the second one uses -Dwired and the last one uses
     353         default -D option (not specified).
     354       </para>
     355
    321356
    322357      <indexterm zone="wpa_supplicant wpa-service">
     
    327362        If your router/access point uses DHCP to allocate IP addresses, you
    328363        can install <xref linkend="dhcp"/> client and use it to
    329         automatically obtain network addresses. Create the
    330         <filename>/etc/sysconfig/ifconfig-<replaceable>wifi0</replaceable>
     364        automatically obtain network addresses. If your using the first unit file
     365        Create the
     366        <filename>/etc/wpa_supplicant/wpa_supplicant-nl80211-<replaceable>wifi0</replaceable>.conf
    331367        </filename> by running the following command as the
    332368        <systemitem class="username">root</systemitem> user:
    333369      </para>
    334370
    335 <screen role="root"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> &lt;&lt; "EOF"
     371      <note>
     372      <para>
     373        wifi0 needs to be replaced with the actual interface.
     374      </para>
     375      </note>
     376
     377<screen role="root"><userinput>cat &gt; /etc/wpa_supplicant/wpa_supplicant-nl80211-<replaceable>wifi0</replaceable>.conf &lt;&lt; "EOF"
    336378<literal>ONBOOT="yes"
    337379IFACE="<replaceable>wlan0</replaceable>"
     
    354396EOF</userinput></screen>
    355397
     398      <note>
     399      <para>
     400        Note that the argument after @ and the interface name,
     401        ie wifi0 must be the same.
     402      </para>
     403      </note>
     404
     405      <para>
     406        To enable it, issue the following command as the
     407        <systemitem class="username">root</systemitem> user:
     408      </para>
     409<screen role="root"><userinput>
     410systemctl enable wpa_supplicant-nl80211@wifi0
     411</userinput></screen>
     412
     413      <para>
     414        If your using the second unit file
     415        Create the
     416        <filename>/etc/wpa_supplicant/wpa_supplicant-wired-<replaceable>eth0</replaceable>.conf
     417        </filename> by running the following command as the
     418        <systemitem class="username">root</systemitem> user:
     419      </para>
     420
     421<screen role="root"><userinput>cat &gt; /etc/wpa_supplicant/wpa_supplicant-wired-<replaceable>eth0</replaceable>.conf &lt;&lt; "EOF"
     422<literal>ONBOOT="yes"
     423IFACE="<replaceable>eth0</replaceable>"
     424SERVICE="wpa"
     425
     426# Additional arguments to wpa_supplicant
     427WPA_ARGS=""
     428
     429WPA_SERVICE="dhclient"
     430DHCP_START=""
     431DHCP_STOP=""
     432
     433# Set PRINTIP="yes" to have the script print
     434# the DHCP assigned IP address
     435PRINTIP="no"
     436
     437# Set PRINTALL="yes" to print the DHCP assigned values for
     438# IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
     439PRINTALL="no"</literal>
     440EOF</userinput></screen>
     441
     442      <note>
     443      <para>
     444        Note that the argument after @ and the interface name,
     445        ie eth0 must be the same.
     446      </para>
     447      </note>
     448
     449      <para>
     450        To enable it, issue the following command as the
     451        <systemitem class="username">root</systemitem> user:
     452      </para>
     453
     454<screen role="root"><userinput>
     455systemctl enable wpa_supplicant-wired@eth0
     456</userinput></screen>
     457
     458      <para>
     459        If your using the third unit file
     460        Create the
     461        <filename>/etc/wpa_supplicant/wpa_supplicant-<replaceable>eth0</replaceable>.conf
     462        </filename> by running the following command as the
     463        <systemitem class="username">root</systemitem> user:
     464      </para>
     465
     466<screen role="root"><userinput>cat &gt; /etc/wpa_supplicant/wpa_supplicant-<replaceable>eth0</replaceable>.conf &lt;&lt; "EOF"
     467<literal>ONBOOT="yes"
     468IFACE="<replaceable>eth0</replaceable>"
     469SERVICE="wpa"
     470
     471# Additional arguments to wpa_supplicant
     472WPA_ARGS=""
     473
     474WPA_SERVICE="dhclient"
     475DHCP_START=""
     476DHCP_STOP=""
     477
     478# Set PRINTIP="yes" to have the script print
     479# the DHCP assigned IP address
     480PRINTIP="no"
     481
     482# Set PRINTALL="yes" to print the DHCP assigned values for
     483# IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
     484PRINTALL="no"</literal>
     485EOF</userinput></screen>
     486
     487      <note>
     488      <para>
     489        Note that the argument after @ and the interface name,
     490        ie eth0 must be the same.
     491      </para>
     492      </note>
     493
     494      <para>
     495        To enable it, issue the following command as the
     496        <systemitem class="username">root</systemitem> user:
     497      </para>
     498
     499<screen role="root"><userinput>
     500systemctl enable wpa_supplicant-@eth0
     501</userinput></screen>
     502
    356503      <para>
    357504        If you prefer <xref linkend="dhcpcd"/> instead of
    358505        <xref linkend="dhcp"/> client, then create the
    359         <filename>/etc/sysconfig/ifconfig-<replaceable>wifi0</replaceable>
     506        <filename>/etc/wpa_supplicant/wpa_supplicant-nl80211-<replaceable>wifi0</replaceable>.conf
    360507        </filename> by running the following command as the
    361508        <systemitem class="username">root</systemitem> user:
    362509      </para>
    363510
    364 <screen role="root"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> &lt;&lt; "EOF"
     511<screen role="root"><userinput>cat &gt; /etc/wpa_supplicant/wpa_supplicant-nl80211-<replaceable>wifi0</replaceable>.conf &lt;&lt; "EOF"
    365512<literal>ONBOOT="yes"
    366 IFACE="<replaceable>wlan0</replaceable>"
     513IFACE="<replaceable>wifi0</replaceable>"
    367514SERVICE="wpa"
    368515
     
    378525        Alternatively, if you use static addresses on your local network,
    379526        then create the
    380         <filename>/etc/sysconfig/ifconfig-<replaceable>wifi0</replaceable>
     527        <filename>/etc/wpa_supplicant/wpa_supplicant-nl80211-<replaceable>wifi0</replaceable>.conf
    381528        </filename> by running the following command as the
    382529        <systemitem class="username">root</systemitem> user:
    383530      </para>
    384531
    385 <screen role="root"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> &lt;&lt; "EOF"
     532<screen role="root"><userinput>cat &gt; /etc/wpa_supplicant/wpa_supplicant-nl80211-<replaceable>wifi0</replaceable>.conf &lt;&lt; "EOF"
    386533<literal>ONBOOT="yes"
    387 IFACE="<replaceable>wlan0</replaceable>"
     534IFACE="<replaceable>wifi0</replaceable>"
    388535SERVICE="wpa"
    389536
  • networking/netutils/avahi.xml

    rcae7a6f r5bc57bb  
    242242    <title>Configuring avahi</title>
    243243
    244     <sect3  id="avahi-init">
    245       <title>Boot Script</title>
     244    <sect3  id="avahi-init-systemd">
     245      <title>Systemd Unit File</title>
    246246
    247247      <para>
    248         To automatically start the <command>avahi-daemon</command>
    249         when the system is rebooted, install the
    250         <filename>/etc/rc.d/init.d/avahi</filename> bootscript from
    251         the <xref linkend="bootscripts"/> package.
     248        This package will automatically install systemd units
     249        if systemd is detected. To enable them, issue the following
     250        commands as the <systemitem class="username">root</systemitem>
     251        user:
    252252      </para>
    253253
    254       <indexterm zone="avahi avahi-init">
     254      <indexterm zone="avahi avahi-init-systemd">
    255255        <primary sortas="f-avahi">avahi</primary>
    256256      </indexterm>
    257257
    258 <screen role="root"><userinput>make install-avahi</userinput></screen>
     258<screen role="root"><userinput>systemctl enable avahi-daemon</userinput></screen>
     259
     260      <para>
     261        If desired issue the following command as the <systemitem class="username">root</systemitem>
     262        user:
     263      </para>
     264 
     265<screen role="root"><userinput>systemctl enable avahi-dnsconfd</userinput></screen>
    259266
    260267    </sect3>
  • networking/netutils/networkmanager.xml

    rcae7a6f r5bc57bb  
    133133            --with-nmtui         \
    134134            --disable-ppp        \
    135             --with-systemdsystemunitdir=no &amp;&amp;
     135            --with-session-tracking=systemd \
     136            --with-systemdsystemunitdir=/lib/systemd/system &amp;&amp;
    136137make</userinput></screen>
    137138
     
    158159
    159160    <para>
    160       <parameter>--with-systemdsystemunitdir=no</parameter>: This parameter is
    161       used for sysv init systems. If you use systemd, replace "no" by the
    162       proper directory.
     161      <parameter>--with-systemdsystemunitdir=/lib/systemd/system</parameter>: This parameter is
     162      used to specifiy the correct location for the systemd unit files.
     163    </para>
     164
     165    <para>
     166      <parameter>--with-session-tracking=systemd</parameter>: This parameter
     167       enables the use of systemd-logind for session tracking.
    163168    </para>
    164169
     
    223228    </sect3>
    224229
    225     <sect3 id="NetworkManager-init">
    226       <title>Boot Script</title>
     230    <sect3 id="NetworkManager-init-systemd">
     231      <title>Systemd Unit File</title>
    227232
    228233      <para>
    229         To automatically start the <command>NetworkManager</command> daemon when the
    230         system is rebooted, install the
    231         <filename>/etc/rc.d/init.d/networkmanager</filename> bootscript from the
    232         <xref linkend="bootscripts"/> package.
     234        This package will automatically install systemd units if systemd is detected.
     235        To enable the NetworkManager daemon, issue the following command as the
     236        <systemitem class="username">root</systemitem> user:
    233237      </para>
    234238
    235       <indexterm zone="NetworkManager NetworkManager-init">
     239      <indexterm zone="NetworkManager NetworkManager-init-systemd">
    236240        <primary sortas="f-NetworkManager">NetworkManager</primary>
    237241      </indexterm>
    238242
    239 <screen role="root"><userinput>make install-networkmanager</userinput></screen>
     243<screen role="root"><userinput>systemctl enable NetworkManager</userinput></screen>
     244
     245      <para>
     246        The other systemd unit that this package provides is NetworkManager-wait-online.service
     247        which can be used to block programs that require connectivity (depending on the systemd network.target)
     248        from starting untill the network interfaces have been configured.
     249      </para>
    240250
    241251    </sect3>
  • networking/netutils/wicd.xml

    rcae7a6f r5bc57bb  
    115115    commands:</para>
    116116
    117 <screen><userinput>sed -i '/wpath.logrotate\|wpath.systemd/d' setup.py &amp;&amp;
     117<screen><userinput>sed -i '/wpath.logrotate/d' setup.py &amp;&amp;
    118118rm po/*.po                                          &amp;&amp;
    119119python setup.py configure --no-install-kde     \
     
    139139
    140140    <para><command>sed -i '/wpath...</command>: This <command>sed</command>
    141     prevents installation of <command>logrotate</command> and systemd
    142     configuration files. You may omit it if you use these utilities.</para>
     141    prevents installation of <command>logrotate</command>
     142    configuration files. You may omit it if you use this utility.</para>
    143143
    144144    <para><option>--no-install-kde</option>: Prevent installation of an
     
    152152
    153153    <para><option>--no-install-pmutils</option>: Prevent installation of hooks for
    154     pm-utils. Omit this option if you use pm-utils.</para>
     154    pm-utils.</para>
    155155
    156156    <para><option>--no-install-init</option>: Prevent installation of any init scripts,
     
    174174    </sect3>
    175175
    176     <sect3 id="wicd-init">
     176    <sect3 id="wicd-init-systemd">
    177177      <title>Configuration Information</title>
    178178
    179       <para>To automatically start Wicd at boot time, you need to first install
    180       the Wicd bootscript,
    181       <filename>/etc/rc.d/init.d/wicd</filename>,
    182       included in the <xref linkend="bootscripts"/> package
     179      <para>This package ships a systemd unit in the tarball. To enable it
     180       issue the following command
    183181      (as user <systemitem class="username">root</systemitem>):</para>
    184182
    185       <indexterm zone="wicd wicd-init">
    186         <primary sortas="f-wicd">wicd (bootscript)</primary>
     183      <indexterm zone="wicd wicd-init-systemd">
     184        <primary sortas="f-wicd">wicd (systemd unit file)</primary>
    187185      </indexterm>
    188186
    189       <screen role='root'><userinput>make install-wicd</userinput></screen>
    190 
    191       <para>Since Wicd will now handle all configuration of network devices,
    192       the network bootscript installed by LFS should be disabled. This can be
    193       achieved by either removing any <filename>S*network</filename> and
    194       <filename>K*network</filename> symlinks in the <filename>/etc/rc*.d</filename>
    195       directories or by setting <literal>ONBOOT=no</literal> in any
    196       <filename>/etc/sysconfig/ifconfig.*</filename> files.</para>
     187      <screen role='root'><userinput>systemctl enable wicd</userinput></screen>
    197188
    198189      <para>No manual configuration of Wicd is needed if you use the graphical
Note: See TracChangeset for help on using the changeset viewer.