Changeset 7ff7885c


Ignore:
Timestamp:
03/18/2024 09:56:56 AM (8 weeks ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
lazarus, trunk
Children:
1c6da08
Parents:
053cc79
git-author:
Xi Ruoyao <xry111@…> (03/18/2024 09:45:04 AM)
git-committer:
Xi Ruoyao <xry111@…> (03/18/2024 09:56:56 AM)
Message:

usbutils: Use hwdata package for usb.ids

File:
1 edited

Legend:

Unmodified
Added
Removed
  • general/sysutils/usbutils.xml

    r053cc79 r7ff7885c  
    8787    <bridgehead renderas="sect4">Recommended</bridgehead>
    8888    <para role="recommended">
    89 <!-- git is required by autogen.sh. If using the tarball on kernel.org,
    90      autogen.sh does not need to be run. If using the github source,
    91      autogen.sh needs to be run, and git is used to pull the usbhid-dump
    92      submodule.
    93       <xref linkend="git"/> and -->
    94       <xref linkend="wget"/>
    95 <!-- In the systemd book, a unit/timer is installed to update the
    96      usb.ids file automatically. wget is used in the instructions below. -->
     89      <xref role="runtime" linkend="hwdata"/> (runtime)
    9790    </para>
    9891
     
    121114
    122115    <para>
    123       To install the <filename>usb.ids</filename> data file, using
    124       <xref linkend="wget"/>, run, as the
    125       <systemitem class="username">root</systemitem> user:
    126     </para>
    127 
    128 <screen role="root"><userinput>install -dm755 /usr/share/hwdata/ &amp;&amp;
    129 wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids</userinput></screen>
     116      For the <filename>usb.ids</filename> data file, install the
     117      <xref linkend='hwdata'/> package.
     118    </para>
    130119
    131120    <para>
     
    148137  </sect2>
    149138-->
    150   <sect2 role="configuration">
    151     <title>Configuring USB Utils</title>
    152 
    153     <para revision="sysv">
    154       The <filename>usb.ids</filename> data file is constantly being updated.
    155       To get a current version of this file, using <xref linkend="wget"/>,
    156       periodically run again, as the
    157       <systemitem class="username">root</systemitem> user:
    158     </para>
    159 
    160 <screen role="root" revision="sysv"><userinput>wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids</userinput></screen>
    161 
    162     <para>
    163       You should update the <filename>/usr/share/hwdata/usb.ids</filename> file
    164       periodically. <phrase revision="sysv">If you've installed
    165       <xref linkend="fcron"/> and completed the section on periodic jobs,
    166       execute</phrase><phrase revision="systemd">Execute</phrase> the following       commands, as the  <systemitem class="username">root</systemitem> user,
    167       to create a <phrase revision="sysv">weekly cron job:</phrase>
    168       <phrase revision="systemd">systemd timer to update it weekly on Sundays
    169       at 2:30 A.M. (local time):</phrase>
    170     </para>
    171 
    172 <screen role="nodump" revision="sysv"><userinput>cat &gt; /etc/cron.weekly/update-usbids.sh &lt;&lt; "EOF" &amp;&amp;
    173 <literal>#!/bin/bash
    174 /usr/bin/wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids</literal>
    175 EOF
    176 chmod 754 /etc/cron.weekly/update-usbids.sh</userinput></screen>
    177 
    178 <screen role="root" revision="systemd"><userinput>cat &gt; /usr/lib/systemd/system/update-usbids.service &lt;&lt; "EOF" &amp;&amp;
    179 <literal>[Unit]
    180 Description=Update usb.ids file
    181 Documentation=man:lsusb(8)
    182 DefaultDependencies=no
    183 After=local-fs.target network-online.target
    184 Before=shutdown.target
    185 
    186 [Service]
    187 Type=oneshot
    188 RemainAfterExit=yes
    189 ExecStart=/usr/bin/wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids</literal>
    190 EOF
    191 cat &gt; /usr/lib/systemd/system/update-usbids.timer &lt;&lt; "EOF" &amp;&amp;
    192 <literal>[Unit]
    193 Description=Update usb.ids file weekly
    194 
    195 [Timer]
    196 OnCalendar=Sun 03:00:00
    197 Persistent=true
    198 
    199 [Install]
    200 WantedBy=timers.target</literal>
    201 EOF
    202 systemctl enable update-usbids.timer</userinput></screen>
    203 
    204   </sect2>
    205139
    206140  <sect2 role="content">
Note: See TracChangeset for help on using the changeset viewer.