Changeset 7ff7885c
- Timestamp:
- 03/18/2024 09:56:56 AM (8 weeks ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
general/sysutils/usbutils.xml
r053cc79 r7ff7885c 87 87 <bridgehead renderas="sect4">Recommended</bridgehead> 88 88 <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) 97 90 </para> 98 91 … … 121 114 122 115 <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/ && 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> 130 119 131 120 <para> … … 148 137 </sect2> 149 138 --> 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 the157 <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> file164 periodically. <phrase revision="sysv">If you've installed165 <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 Sundays169 at 2:30 A.M. (local time):</phrase>170 </para>171 172 <screen role="nodump" revision="sysv"><userinput>cat > /etc/cron.weekly/update-usbids.sh << "EOF" &&173 <literal>#!/bin/bash174 /usr/bin/wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids</literal>175 EOF176 chmod 754 /etc/cron.weekly/update-usbids.sh</userinput></screen>177 178 <screen role="root" revision="systemd"><userinput>cat > /usr/lib/systemd/system/update-usbids.service << "EOF" &&179 <literal>[Unit]180 Description=Update usb.ids file181 Documentation=man:lsusb(8)182 DefaultDependencies=no183 After=local-fs.target network-online.target184 Before=shutdown.target185 186 [Service]187 Type=oneshot188 RemainAfterExit=yes189 ExecStart=/usr/bin/wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids</literal>190 EOF191 cat > /usr/lib/systemd/system/update-usbids.timer << "EOF" &&192 <literal>[Unit]193 Description=Update usb.ids file weekly194 195 [Timer]196 OnCalendar=Sun 03:00:00197 Persistent=true198 199 [Install]200 WantedBy=timers.target</literal>201 EOF202 systemctl enable update-usbids.timer</userinput></screen>203 204 </sect2>205 139 206 140 <sect2 role="content">
Note:
See TracChangeset
for help on using the changeset viewer.