From c1bb8be5d18d619e8b4f033764c3a11d397e360e Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 4 Jul 2023 11:22:03 +0200 Subject: [PATCH 1/2] tools/nut-usbinfo.pl: add notes to scripts/upower/95-upower-hid.hwdb generator about systemd-hwdb subsystem docs [follow-up to #1342] --- tools/nut-usbinfo.pl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/nut-usbinfo.pl b/tools/nut-usbinfo.pl index 20d72934e4..9ab50b67ac 100755 --- a/tools/nut-usbinfo.pl +++ b/tools/nut-usbinfo.pl @@ -126,8 +126,15 @@ sub gen_usb_files print $outUPower '# This file was automatically generated by NUT:'."\n"; print $outUPower '# https://github.com/networkupstools/nut/'."\n#\n"; print $outUPower '# To keep up to date, monitor upstream NUT'."\n"; - print $outUPower '# https://github.com/networkupstools/nut/commits/master/scripts/upower/95-upower-hid.hwdb'."\n"; + print $outUPower '# https://github.com/networkupstools/nut/commits/master/scripts/upower/95-upower-hid.hwdb'."\n"; print $outUPower "# or checkout the NUT repository and call 'tools/nut-usbinfo.pl'\n"; + print $outUPower '# One or more "match lines" below are used to set a "property" for a device;'."\n"; + print $outUPower '# for more syntax and system installation (and override) notes, see'."\n"; + print $outUPower '# https://www.freedesktop.org/software/systemd/man/hwdb.html'."\n"; + print $outUPower '# (or equivalent for the version of systemd used in your distribution)'."\n"; + print $outUPower '# Note that "During runtime, only the binary database is used" as compiled'."\n"; + print $outUPower '# from files like this by e.g. `systemctl restart systemd-hwdb-update.service`'."\n"; + print $outUPower '# (if you edit your copy locally or maintain a site-local override file in /etc).'."\n"; # Device scanner header my $outDevScanner = do {local *OUT_DEV_SCANNER}; From 18aa20636bc53bdd7cd495dc40fa1cd09aafce49 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 4 Jul 2023 11:31:33 +0200 Subject: [PATCH 2/2] scripts/upower/95-upower-hid.hwdbadd notes about systemd-hwdb subsystem docs [follow-up to #1342] --- scripts/upower/95-upower-hid.hwdb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/upower/95-upower-hid.hwdb b/scripts/upower/95-upower-hid.hwdb index c8e6356607..aa591ca9e1 100644 --- a/scripts/upower/95-upower-hid.hwdb +++ b/scripts/upower/95-upower-hid.hwdb @@ -5,8 +5,15 @@ # https://github.com/networkupstools/nut/ # # To keep up to date, monitor upstream NUT -# https://github.com/networkupstools/nut/commits/master/scripts/upower/95-upower-hid.hwdb +# https://github.com/networkupstools/nut/commits/master/scripts/upower/95-upower-hid.hwdb # or checkout the NUT repository and call 'tools/nut-usbinfo.pl' +# One or more "match lines" below are used to set a "property" for a device; +# for more syntax and system installation (and override) notes, see +# https://www.freedesktop.org/software/systemd/man/hwdb.html +# (or equivalent for the version of systemd used in your distribution) +# Note that "During runtime, only the binary database is used" as compiled +# from files like this by e.g. `systemctl restart systemd-hwdb-update.service` +# (if you edit your copy locally or maintain a site-local override file in /etc). # Hewlett Packard usb:v03F0p0001*