putdgrp(1M)


putdgrp -- edit device group table

Synopsis

putdgrp [-d] dgroup [device [. . .]]

Description

putdgrp modifies the device group table. It can modify the table by creating a new device group or by removing a device group. It can also change group definitions by adding or removing a device from the group definition.

Command options

The options for putdgrp are:

-d
Delete the group or, if used with device, the device from a group definition.

dgroup
Specify a device group name.

device
Specify the pathname or alias of the device that is to added to or deleted from the device group.

Files

/etc/dgroup.tab

Usage

When putdgrp is executed with only a dgroup specification, the command adds the specified group name to the device group table if it does not already exist. If the -d option is also used with only the dgroup specification, the command deletes the group from the table.

When putdgrp is executed with both a dgroup and a device specification, it adds the given device name (or names) to the group definition. When invoked with both arguments and the -d option, the command deletes the device name (or names) from the group definition.

When putdgrp is executed with both a dgroup and a device specification and the device group does not exist, it creates the group and adds the specified devices to that new group.

Exit codes

On success, putdgrp exits with the value 0. On failure, it exits with one of the following values:

1
Command syntax incorrect, invalid option used, or internal error occurred.

2
Device group table could not be opened for reading or a new device group table could not be created.

3
If executed with the -d option, indicates that an entry in the device group table for the device group dgroup does not exist and so cannot be deleted. Otherwise, indicates that the device group dgroup already exists and cannot be added.

4
If executed with the -d option, indicates that the device group dgroup does not have as members one or more of the specified devices. Otherwise, indicates that the device group dgroup already has one or more of the specified devices as members.

Examples

Add a new device group:

putdgrp floppies

Add a device to a device group:

putdgrp floppies diskette2

Delete a device group:

putdgrp -d floppies

Delete a device from a device group:

putdgrp -d floppies diskette2

References

listdgrp(1M), putdev(1M)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004