1update_drv(1M)          System Administration Commands          update_drv(1M)
2
3
4

NAME

6       update_drv - modify device driver attributes
7

SYNOPSIS

9       update_drv [-f | -v] [-n] driver_module
10
11
12       update_drv [-b basedir] [-f | -v] [-n] -a [-m 'permission']
13            [-i 'identify-name'] [-P 'privilege'] [-p 'policy'] driver_module
14
15
16       update_drv [-b basedir] [-f | -v] [-n] -d [-m 'permission']
17            [-i 'identify-name'] [-P 'privilege'] [-p 'policy'] driver_module
18
19

DESCRIPTION

21       The update_drv command informs the system about attribute changes to an
22       installed device driver. It can be used to re-read  the  driver.conf(4)
23       file, or to add, modify, or delete a driver's minor node permissions or
24       aliases.
25
26
27       Without options, update_drv reloads the driver.conf file.
28
29
30       Upon successfully updating the aliases, the driver binding takes effect
31       upon reconfig boot or hotplug of the device.
32
33
34       Upon  successfully  updating the permissions, only the new driver minor
35       nodes get created with the modified set of file  permissions.  Existing
36       driver minor nodes do not get modified.
37

OPTIONS

39       The following options are supported:
40
41       -a
42
43           Add a permission, aliases, privilege or policy entry.
44
45           With  the  -a  option  specified,  a permission entry (using the -m
46           option), or a driver's aliases  entry  (using  the  -i  option),  a
47           device  privilege (using the -P option) or a a device policy (using
48           the -p option), can be added or updated. If a matching  minor  node
49           permissions  entry  is encountered (having the same driver name and
50           the minor node), it is replaced. If a  matching  aliases  entry  is
51           encountered (having a different driver name and the same alias), an
52           error is reported.
53
54           The -a and -d options are mutually exclusive.
55
56
57       -b basedir
58
59           Installs or modifies the driver on the system with a root directory
60           of   basedir   rather  than  installing  on  the  system  executing
61           update_drv.
62
63           Note -
64
65             The root file system of any non-global zones must not  be  refer‐
66             enced with the -b option. Doing so might damage the global zone's
67             file system, might compromise the security of  the  global  zone,
68             and might damage the non-global zone's file system. See zones(5).
69
70
71       -d
72
73           Delete a permission, aliases, privilege or policy entry.
74
75           The  -m permission, -i identify-name, -P privilege or the -p policy
76           option needs to be specified with the -d option.
77
78           The -d and -a options are mutually exclusive.
79
80           If the entry doesn't exist update_drv returns an error.
81
82
83       -f
84
85           Force the system to reread the driver.conf file even if the  driver
86           module cannot be unloaded. See NOTES section for details.
87
88           Without   this  option,  when  removing  an  alias  for  a  driver,
89           update_drv updates the binding files for the next boot, but returns
90           an  error  if  one  or more devices that reference the driver-alias
91           binding remains. With the -f option, update_drv does not return  an
92           error if such devices remain.
93
94
95       -i 'identify-name'
96
97           A white-space separated list of aliases for the driver. If -a or -d
98           option is not specified then this option is ignored. The  identify-
99           name  string  is  mandatory.  If  all  aliases  need to be removed,
100           rem_drv(1M) is recommended.
101
102
103       -m 'permission'
104
105           Specify a white-space separated list of file system permissions for
106           the  device  node  of  the device driver. If -a or -d option is not
107           specified then, this option is ignored. The  permission  string  is
108           mandatory.
109
110
111       -n
112
113           Do not try to load and attach device_driver, just modify the system
114           configuration files for that driver.
115
116
117       -p 'policy'
118
119           With the -a option, policy is a white-space separated list of  com‐
120           plete  device  policies. For the -d option, policy is a white space
121           separated list of minor device  specifications.  The  minor  device
122           specifications   are   matched   exactly  against  the  entries  in
123           /etc/security/device_policy, that is., no wildcard matching is per‐
124           formed.
125
126
127       -P 'privilege'
128
129           With  the  -a  option, privilege is a comma separated list of addi‐
130           tional driver privileges. For the -d option, privilege is a  single
131           privilege.  The  privileges  are  added  to  or  removed  from  the
132           /etc/security/extra_privs file.
133
134
135       -v
136
137           Verbose.
138
139

EXAMPLES

141       Example 1 Adding or Modifying an Existing Minor Permissions Entry
142
143
144       The following command adds or modifies the exisitng  minor  permissions
145       entry of the clone driver:
146
147
148         example# update_drv -a -m 'llc1 777 joe staff' clone
149
150
151
152       Example 2 Removing All Minor Permissions Entries
153
154
155       The  following  command  removes  all  minor  permission entries of the
156       usbprn driver, the USB printer driver:
157
158
159         example# update_drv -d -m '* 0666 root sys' usbprn
160
161
162
163       Example 3 Adding a Driver Aliases Entry
164
165
166       The following command adds a driver aliases entry of  the  ugen  driver
167       with the identity string of usb459,20:
168
169
170         example# update_drv -a -i '"usb459,20"' ugen
171
172
173
174       Example 4 Re-reading the driver.conf File For the ohci Driver
175
176
177       The following command re-reads the driver.conf(4) file.
178
179
180          example# update_drv ohci
181
182
183
184       Example 5 Requiring a Self-defined Privilege to Open a tcp Socket
185
186
187       The  following  command requires a self-defined privilege to open a tcp
188       socket:
189
190
191         example#   update_drv -a -P net_tcp -p \
192              'write_priv_set=net_tcp read_priv_set=net_tcp' tcp
193
194
195
196       Example 6 Establishing a Path-oriented Alias
197
198
199       The following command establishes a path-oriented alias to force a spe‐
200       cific driver, qlt, to be used for a particular device path:
201
202
203         example#   update_drv -a -i '"/pci@8,600000/SUNW,qlc@4"' qlt
204
205
206

EXIT STATUS

208       The following exit values are returned:
209
210       0
211
212           Successful completion.
213
214
215       >0
216
217           An error occurred.
218
219

ATTRIBUTES

221       See attributes(5) for descriptions of the following attributes:
222
223
224
225
226       ┌─────────────────────────────┬─────────────────────────────┐
227       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
228       ├─────────────────────────────┼─────────────────────────────┤
229       │Availability                 │SUNWcsu                      │
230       └─────────────────────────────┴─────────────────────────────┘
231

SEE ALSO

233       add_drv(1M), modunload(1M), rem_drv(1M), driver.conf(4), attributes(5),
234       privileges(5)
235

NOTES

237       If -a or -d options are  specified,  update_drv  does  not  reread  the
238       driver.conf file.
239
240
241       A  forced  update  of the driver.conf file reloads the driver.conf file
242       without reloading the driver binary module. In this case, devices which
243       cannot  be  detached  reference  driver  global properties from the old
244       driver.conf file, while the remaining driver instances reference global
245       properties in the new driver.conf file.
246
247
248       It  is possible to add an alias , which changes the driver binding of a
249       device already being managed by a different driver. A force update with
250       the  -a  option  tries to bind to the new driver and report error if it
251       cannot. If you specify more than one of the -m, -i, -P or -p options, a
252       force flag tries to modify aliases or permissions. This is done even if
253       the other operation fails and vice-versa.
254
255
256
257SunOS 5.11                        10 Feb 2009                   update_drv(1M)
Impressum