Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

admpdisk(1M)

admdumpdevice(1M)

allocate(1)

appropriate_privilege(5)

dg_dev_allocate_ctl(2)



admdevice(1M)                  DG/UX R4.11MU05                 admdevice(1M)


NAME
       admdevice - administer devices

SYNOPSIS
       admdevice -o configure device ...

       admdevice -o deconfigure device ...

       admdevice -o specify { options } device ...

       admdevice -o set { options } device-path ...

       admdevice -o get { options } device-path ...

DESCRIPTION
       The admdevice command provides a few management operations whose
       nature is independent of the type of device being managed.  The
       devices should be specified using the standard DG/UX device naming
       formats.

       On systems with the DG/UX Cluster package installed, devices may be
       specified using cluster-wide device names.  Cluster-wide device names
       use the shared_bus(shared bus number) component instead of the node
       specific bus controller information and are therefore consistent
       across all nodes within a DG/UX cluster.  Only devices that reside on
       a shared bus, defined in the Membership Manager database, will have a
       cluster-wide device name.

       Cluster-wide device names are a feature provided by the DG/UX Cluster
       package which must be purchased separately from the DG/UX® System
       product.  Clusters is an optional DG/UX add-on that will automate
       many features of system resource management, failover, and high
       availability.  A DG/UX cluster is a group of two or more
       interconnected computer systems (nodes) acting together in a closely
       coordinated way. A cluster does what a server in a client/server
       environment does: manages computing resources and provides services
       to clients.

   Operations
       admdevice -o configure device ...

            Configure the device into the kernel.  You must have appropriate
            privilege to configure a device.

       admdevice -o deconfigure device ...

            Deconfigure the device.  The device must not be held open by
            either an application program or another component of the
            kernel.  For example, physical disks cannot be deconfigured
            while they are registered.  When a device is deconfigured, as
            far as the kernel is concerned, it doesn't exist.  You must have
            appropriate privilege to deconfigure a device.

       admdevice -o specify [ -s ] [ -C ] device ...

            Display the canonical device name or cluster-wide device name
            string for the device.  The device being specified must be
            configured.

            -s   Display the short form of the device name.  This option is
                 now obsolete and has no effect on the behavior of the
                 command.  Its use is discouraged.  Support for it will be
                 removed in a future release of the DG/UX system.

            -C   This option is not activated until the DG/UX Cluster
                 package is installed.  Display the cluster-wide device
                 name.  An error is reported if the Cluster package is not
                 installed or if there is no corresponding cluster-wide
                 device name.

       admdevice -o set -a { t | f } [ -p ] device-path ...

            Set the allocable state of the device given by device-path.
            This operation is available only on DG/UX systems with
            Information Security.  When a device is marked as allocable (and
            has not been allocated), it cannot be opened and only the owner
            of the device can modify its attributes.  There is no
            appropriate privilege to override these restrictions.  You must
            have appropriate privilege to set the allocable state of device.

            -a   Specify the allocable state which should be set on the
                 device.  The t (allocable="true") or f (allocable="false")
                 argument is required.  Currently this is the only option
                 available for the set operation.

                 If the device is being marked as allocable, then (unless
                 the -p option is provided), the DAC attributes are reset
                 such that the owner ID is set to the caller's effective
                 uid, the owning group ID is set to the caller's effective
                 gid, any extended ACL entries are removed, and the
                 permission bits are set to 000.  The device will be
                 unavailable to anyone but the administrator invoking the
                 command.  The administrator can then set the attributes of
                 the device appropriately, setting the ACL last.

                 If the device is being marked as unallocable and is
                 currently allocated, the command will succeed.  The device
                 will remain allocated until it is deallocated and closed.
                 The invoker must have appropriate privilege and MAC write
                 access to the device.  If the device is already
                 unallocable, the command will succeed and there will be no
                 change to the state of the device.

            -p   Preserve security attributes.  If the -p flag is provided
                 with the -a t option the device will be marked as
                 allocable, but none of the security attributes of the
                 device will be changed and the device can be allocated by
                 any process with read and/or write access to the device.

       admdevice -o get -A a [ -q ] device-path ...

            Display the allocable state of the device given by the device-
            path.  This operation is available only on DG/UX systems with
            Information Security.  The information displayed includes the
            allocable state of the device, whether the device is currently
            allocated and the user to whom the device is allocated.

            -A   Display the specified attributes.  The characters provided
                 as an argument to this flag indicate the attributes that
                 should be displayed.  The characters used are the same as
                 those used by the set operation to set the value of the
                 attribute.

            -q   Use quiet mode.  By default the get operation will generate
                 a report of the requested attributes for each device
                 specified.  With this flag it will print one line for each
                 device in a format that can be easily parsed by another
                 process (e.g., a shell script).  The format of the line is:

                 device_name:attribute="value":attribute="value":...

                 The format of the allocable attribute is:

                     allocable="attr1,attr2,attr3"

                 where:

                     attr1 is either "true" or "false"
                     attr2 is either "allocated" or "unallocated"
                     attr3 is either "NULL" or the name of the user to whom
                                     the device is allocated

EXAMPLES
       To display the canonical device name or the cluster-wide device name
       string:

            # admdevice -o specify 'sd(ncsc(),0)'
            sd(ncsc(0,7),0,0)

            # admdevice -o specify 'sd(shared_bus(0),1)'
            sd(ncsc(0,7),1,0)

            # admdevice -o specify -C 'sd(ncsc(),1)'
            sd(shared_bus(0),1,0)

       To make /dev/rmt/0 allocable without changing the security attributes
       on the device, use:

           # admdevice -o set -a t -p /dev/rmt/0

       To display the allocable state of /dev/rmt/0 and /dev/ttyr0, use:

           # admdevice -o get -A a /dev/rmt/0 /dev/ttyr0


DIAGNOSTICS
   Exit Codes
        0     The operation was successful.

        1     The operation was unsuccessful.

        2     The operation failed due to access restrictions.

        3     There was an error in the command line.

        4     Device given for specify operation is not configured.

SEE ALSO
       admpdisk(1M), admdumpdevice(1M), allocate(1),
       appropriate_privilege(5) dg_dev_allocate_ctl(2).

NOTES
       In order to maintain the allocable state of a device across boot, the
       command
           admdevice -o set -a t device-path
       can be added to the end of the /sbin/setdevmac script which runs at
       boot.  Additional lines (or the -p flag) should be added to provide
       access to users as desired for allocation of the device.

       The AV/Alert server program (dgsvc_d) sometimes holds open physical
       devices in order to monitor their status.  This can make it
       impossible to deconfigure the device.  If this is the case, the
       commands
            /usr/sbin/init.d/rc.dgserv stop
       and
            /usr/sbin/init.d/rc.dgserv start
       can be used before and after the admdevice command to disable and
       enable the AV/Alert software.

       On a generic DG/UX system, appropriate privilege is granted by having
       an effective UID of 0 (root).  See the appropriate_privilege(5) man
       page for more information.

       On a system with DG/UX information security, appropriate privilege is
       granted by having one or more specific capabilities enabled in the
       effective capability set of the the user.  See the cap_defaults(5)
       man page for the default capabilities for this command.


Licensed material--property of copyright holder(s)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026