summaryrefslogtreecommitdiffstats
path: root/update-smart-drivedb.8.in
blob: c20f1d145e3af31aa009a5c9e199283a1c86f096 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
.ig
Copyright (C) 2013 Hannes von Haugwitz <hannes@vonhaugwitz.com>
Copyright (C) 2014-23 Christian Franke

SPDX-License-Identifier: GPL-2.0-or-later

$Id: update-smart-drivedb.8.in 5521 2023-07-24 16:44:49Z chrfranke $

..
.\" Macros borrowed from pages generated with Pod::Man
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp 0.4v
.if n .sp
..
.de Vb \" Begin verbatim text
.if t .ft CW
.if n .ft R
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Use groff extension \(aq (apostrophe quote, ASCII 0x27) if possible
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.TH UPDATE-SMART-DRIVEDB 8 "CURRENT_SVN_DATE" "CURRENT_SVN_VERSION" "SMART Monitoring Tools"
.SH NAME
update-smart-drivedb \- update smartmontools drive database
.Sp
.SH "SYNOPSIS"
.B update-smart-drivedb
.RI [ OPTIONS ]
.RI [ DESTFILE ]
.Sp
.SH "DESCRIPTION"
.\" %IF NOT OS ALL
.\"! [This man page is generated for the OS_MAN_FILTER version of smartmontools.
.\"! It does not contain info specific to other platforms.]
.\"! .PP
.\" %ENDIF NOT OS ALL
.B update-smart-drivedb
updates
.B /usr/local/var/lib/smartmontools/drivedb.h
or
.I DESTFILE
from branches/RELEASE_6_0_DRIVEDB of smartmontools SVN repository.
.PP
The tools used for downloading are either
.BR curl (1),
.BR wget (1),
.BR lynx (1),
.\" %IF OS FreeBSD
.BR fetch (1)
[FreeBSD only],
.\" %ENDIF OS FreeBSD
.\" %IF OS OpenBSD
.BR ftp (1)
[OpenBSD only],
.\" %ENDIF OS OpenBSD
or
.BR svn (1).
.PP
The downloaded file is verified with OpenPGP/GPG key ID 721042C5.
The public key block is included in the script.
.PP
The old file is kept if the downloaded file is identical (ignoring
the differences in Id string) otherwise it is moved to
.BR drivedb.h.old .
.PP
[NEW EXPERIMENTAL UPDATE-SMART-DRIVEDB 7.3 FEATURE]
The old file is also kept if the downloaded file reports an older version
on the same branch.
This could be overridden with the \*(Aq\-\-force\*(Aq option.
If the branch version differs, the file is always updated.
.Sp
.SH "OPTIONS"
.TP
.B \-s SMARTCTL, \-\-smartctl SMARTCTL
Use the
.BR smartctl (8)
executable at path SMARTCTL for drive database syntax check.
The form \*(Aq\-s \-\*(Aq disables the syntax check.
The default is
.BR /usr/local/sbin/smartctl .
.TP
.B \-t [DIR/]TOOL, \-\-tool [DIR/]TOOL
Use TOOL for download.
TOOL is one of:
.I curl wget lynx
.\" %IF OS FreeBSD
.I fetch
.\" %ENDIF OS FreeBSD
.\" %IF OS OpenBSD
.I ftp
.\" %ENDIF OS OpenBSD
.IR svn .
The default is the first one found in PATH.
.br
[NEW EXPERIMENTAL UPDATE-SMART-DRIVEDB 7.3 FEATURE]
A DIR could also be specified.
The plain TOOL name must then begin with any of the above names.
.TP
.B \-u LOCATION, \-\-url\-of LOCATION
Use URL of LOCATION for download.
LOCATION is one of:
.br
.I github
(GitHub mirror of SVN repository),
.br
.I sf
(Sourceforge code browser),
.br
.I svn
(SVN repository),
.br
.I svni
(SVN repository via HTTP instead of HTTPS),
.br
.I trac
(Trac code browser).
.br
The default is
.IR svn .
.TP
.B \-\-url URL
[NEW EXPERIMENTAL UPDATE-SMART-DRIVEDB 7.3 FEATURE]
Download from URL.
A valid OpenPGP/GPG signature with \*(Aq.raw.asc\*(Aq extension must also
exist unless \*(Aq\-\-no\-verify\*(Aq is also specified.
.TP
.B \-\-file FILE
[NEW EXPERIMENTAL UPDATE-SMART-DRIVEDB 7.3 FEATURE]
Copy from local FILE.
A valid OpenPGP/GPG signature \*(AqFILE.raw.asc\*(Aq must also exist
unless \*(Aq\-\-no\-verify\*(Aq is also specified.
.\" %IF ENABLE_DB_INSTALL
.TP
.B \-\-install
[NEW EXPERIMENTAL UPDATE-SMART-DRIVEDB 7.3 FEATURE]
Copy from originally installed drive database file.
This is the same as:
.br
\*(Aq\-\-no\-verify \-\-file /usr/local/share/smartmontools/drivedb.h\*(Aq
.\" %ENDIF ENABLE_DB_INSTALL
.TP
.B \-\-trunk
Download from SVN trunk.
This requires \*(Aq\-\-no\-verify\*(Aq because the trunk versions are not
signed.
.TP
.B \-\-branch X.Y
Download from branches/RELEASE_\fBX\fP_\fBY\fP_DRIVEDB.
This also selects the OpenPGP/GPG key for older branches
(5.40 to 6.6: Key ID DFD22559).
.TP
.B \-\-cacert FILE
Use CA certificates from FILE to verify the peer.
.TP
.B \-\-capath DIR
Use CA certificate files from DIR to verify the peer.
.TP
.B \-\-insecure
Don't abort download if certificate verification fails.
This option is also required if a HTTP URL is selected with \*(Aq\-u\*(Aq
option.
.TP
.B \-\-no\-verify
Don't verify signature with GnuPG.
.TP
.B \-\-force
[NEW EXPERIMENTAL UPDATE-SMART-DRIVEDB 7.3 FEATURE]
Allow downgrades.
By default, the database is not replaced with an older version of the
same branch.
.TP
.B \-\-export\-key
Print the OpenPGP/GPG public key block.
.TP
.B \-\-dryrun
Print download commands only.
.TP
.B \-q, \-\-quiet
[NEW EXPERIMENTAL UPDATE-SMART-DRIVEDB 7.3 FEATURE]
Suppress info messages.
.TP
.B \-v, \-\-verbose
Verbose output.
.TP
.B \-h, \-\-help
Print help text.
.Sp
.SH "EXAMPLES"
Regular update:
.Vb 2
# update-smart-drivedb
/usr/local/var/lib/smartmontools/drivedb.h 7.2/5225 updated to 7.2/5237
.Ve
.PP
Revert to previous version:
.Vb 2
# update-smart-drivedb --force \e
  --file /usr/local/var/lib/smartmontools/drivedb.h.old
/usr/local/var/lib/smartmontools/drivedb.h 7.2/5237 downgraded to 7.2/5225
.Ve
.PP
Download the database from SVN trunk to current directory:
.Vb 2
$ update-smart-drivedb --trunk --no-verify -s - -u trac drivedb-trunk.h
drivedb-trunk.h 7.3/5254 newly installed (NOT VERIFIED)
.Ve
.Sp
.SH "EXIT STATUS"
The exit status is 0 if the database has been successfully updated or is
already up to date.
If an error occurs the exit status is 1.
.Sp
.SH FILES
.TP
.B /usr/local/sbin/update-smart-drivedb
full path of this script.
.TP
.B /usr/local/sbin/smartctl
used to check syntax of new drive database.
.\" %IF ENABLE_DB_INSTALL
.TP
.B /usr/local/share/smartmontools/drivedb.h
originally installed drive database.
.\" %ENDIF ENABLE_DB_INSTALL
.TP
.B /usr/local/var/lib/smartmontools/drivedb.h
current drive database.
.TP
.B /usr/local/var/lib/smartmontools/drivedb.h.raw
current drive database with unexpanded SVN Id string.
.TP
.B /usr/local/var/lib/smartmontools/drivedb.h.raw.asc
signature file.
.TP
.B /usr/local/var/lib/smartmontools/drivedb.h.*old*
previous files.
.TP
.B /usr/local/var/lib/smartmontools/drivedb.h.*error*
new files if rejected due to errors.
.TP
.B /usr/local/var/lib/smartmontools/drivedb.h.lastcheck
empty file created if downloaded file was identical.
.Sp
.SH AUTHORS
\fBChristian Franke\fP.
.br
This manual page was originally written by
.BR "Hannes von Haugwitz <hannes@vonhaugwitz.com>" .
.Sp
.SH REPORTING BUGS
To submit a bug report, create a ticket in smartmontools wiki:
.br
<\fBhttps://www.smartmontools.org/\fP>.
.br
Alternatively send the info to the smartmontools support mailing list:
.br
<\fBhttps://listi.jpberlin.de/mailman/listinfo/smartmontools-support\fB>.
.Sp
.SH SEE ALSO
\fBsmartctl\fP(8), \fBsmartd\fP(8).
.Sp
.SH PACKAGE VERSION
CURRENT_SVN_VERSION CURRENT_SVN_DATE CURRENT_SVN_REV
.br
$Id: update-smart-drivedb.8.in 5521 2023-07-24 16:44:49Z chrfranke $