Ignore:
Timestamp:
10/22/2017 08:57:13 PM (5 years ago)
Author:
DJ Lucas <dj@…>
Branches:
10.0, 10.1, 11.0, 11.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, lazarus, perl-modules, qt5new, trunk, upgradedb, xry111/intltool, xry111/test-20220226
Children:
df9499b
Parents:
ad4043e2
Message:

Use timers in systemd where appropriate, not crontab.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@19359 af4574ff-66df-0310-9fd7-8a98e5e911e0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • general/sysutils/pciutils.xml

    rad4043e2 rac8c7d4  
    135135    </para>
    136136
    137     <para>
     137    <para revision="sysv">
    138138      You may wish to add an entry to
    139139      <systemitem class="username">root</systemitem>'s (or any other user who has
     
    142142      periodically.
    143143    </para>
     144
     145    <para revision="systemd">
     146      You should update the <filename>/usr/share/hwdata/pci.ids</filename> file
     147      periodically. Execute the following commands, as the
     148      <systemitem class="username">root</systemitem> user, to create a systemd
     149      timer to update it weekly on Sundays at 3:00 A.M. (local time):
     150    </para>
     151
     152<screen role="root" revision="systemd"><userinput>cat &gt; /lib/systemd/system/update-pciids.service &lt;&lt; "EOF" &amp;&amp;
     153<literal>[Unit]
     154Description=Update pci.ids file
     155Documentation=man:update-pciids(8)
     156DefaultDependencies=no
     157After=local-fs.target
     158Before=shutdown.target
     159
     160[Service]
     161Type=oneshot
     162RemainAfterExit=yes
     163ExecStart=/usr/sbin/update-pciids</literal>
     164EOF
     165cat &gt; /lib/systemd/system/update-pciids.timer &lt;&lt; "EOF" &amp;&amp;
     166<literal>[Unit]
     167Description=Update pci.ids file weekly
     168
     169[Timer]
     170OnCalendar=Sun 02:30:00
     171Persistent=true
     172
     173[Install]
     174WantedBy=timers.target</literal>
     175EOF
     176systemctl enable update-usbids.timer</userinput></screen>
     177
    144178
    145179  </sect2>
Note: See TracChangeset for help on using the changeset viewer.