HWUP(8)

NAME
hwup - start a preconfigured hardware device.
hwdown - stop a (preconfigured) hardware device.
hwstatus - show the state of a (preconfigured) hardware device.

SYNOPSIS
hw{up,down,status} [ <configuration-name> ] <hardware-description> [-o options ]

NOTATION
We use the terms configuration, interface and device in a dedicated way. A device is always the piece of hardware representing a physically or logically present hardware, e.g. a PCI- or PCMCIA-card or an USB device. An interface then is the name of the corresponding interface it gets from the kernel when the device has been registered. A configuration is a set of parameters which are required for the intialisation of the device like modules or initialisation scripts.

DESCRIPTION
hwup is used to initialise a device. It is usually invoked by the hotplug subsystem. It can also be used to configure devices manually on the command line. It loads the specified modules and calls any configured intialisation scripts required to initialise the device.

hwdown is used to deconfigure a device. It should be called to fully deconfigure a device so that a next call to hwup will succeed.

hwstatus Displays the status of the device.

<hardware-description> describes the device that should be initialized. It has to be compliant with the device naming rules as specified in getcfg.8. getcfg is used to look for the best matching configuration for this device. Every configuration is stored in files below /etc/sysconfig/hardware which are named hwcfg-<configuration-name>.
Currently this hardware-description is mostly not used for anything else then looking for the right configuration, but this might change in future. Hopefully we will soon get more control over individual devices via sysfs.

<configuration-name> is the name of a configuration that should be used to set up the device. It may be used to circumvent the automatic search for a configuration with getcfg. In this case the configuration names are not restricted. For example if you have a configuration file hwcfg-my-special you may call hwup my-special <hwdesc>. If this configuration does not need information about the device (for example if just loading modules) <hwdesc> may be any string.

OPTIONS

The following are options can be specified after the -o switch.

auto
    Only set up the device if the configuration has the STARTMODE=auto.

hotplug
    Only set up the device if the configuration has the STARTMODE=auto. This is nearly equivalent to auto, just some messages were omitted.

FILES
/sbin/hw{up,down,status}
    The scripts themselves.
/etc/sysconfig/hardware/hwcfg-*
    The files containing the configuration of the devices.
/etc/sysconfig/hardware/scripts
    Helper scripts used to configure individual devices. They are called if specified via the parameter SCRIPTUP or SCRIPTDOWN in the configuration file as specified below.
/etc/sysconfig/hardware/skel
    Template file for the various device types.

VARIABLES
The following is a list of variables that can be put in the configuration file, with an example in parentheses.

STARTMODE (auto|manual|off)
    Choose when the configuration should be activated. Automatic via the hotplug system at boot time or when plugged, manually by the sysadmin or not at all.

MODULEmodule_name
    The module to load for this device. If multiple modules have to be loaded then uses this variable multiple times with any suffix appended. You must then use the same suffixes for multiple MODULE_OPTIONS variables. Example:
            MODULE_A="foo"
            MODULE_B="bar"
            MODULE_OPTIONS_A="foo-opt"
            MODULE_OPTIONS_B="bar-opt1=xyz bar-opt2=off"

MODULE_OPTIONSoptions
    Options to pass to this module for insmod.8 or modprobe.8. Options for multiple modules will be specified by using the same suffixes of the MODULES variable.

SCRIPT{UP,DOWN}_[type]
    Script to be called for the initialisation / deconfiguration of a specific device type. This script is called if the type of the device to be initialized matches the type given in this parameter.

SCRIPT{UP,DOWN}
    Script to be called for the initialisation / deconfiguration of the device. It will only be called if no matching type-specific script are configured.

S/390 specific variables
The following list of variables are valid on S/390 architectures only.

CCW_CHAN_NUM
    Number of CCW channels required for this device. Default values are 3 for qeth, 2 for 3088 type-devices (ctc, lcs), 1 for all other devices.

CCW_CHAN_IDS
    CCW IDS for this device, separated by spaces. The number of CCW IDS specified must match the number of CCW IDs required as specified by CCW_CHAN_NUM

CCW_CHAN_MODE
    (ctc, qeth devices only) The protocol number (for ctc) or port name (for qeth) for this device. For CTC device the valid choices are 0 for compability mode, 1 for extended mode, 2 for CTC-base tty (Linux-Linux) connections, or 3 for compability mode with OS/390 and z/OS.

ZFCP_LUNS
    (zfcp only). A list of configured zfcp devices. Entries in this list should be separated with a space. Each entry consists of the zfcp WWPN and zfcp LUN for this device, separated by a colon ':'. The zfcp WWPN and zfcp LUN are 8-byte hexadecimal numbers prefixed by '0x', e.g. 0x5005076300c590a9:0x0001000000000000

DASD_USE_DIAG
    (dasd only). If set to 1 , enable DIAG access to this device. DIAG access is only possible for S/390 DASD devices in 31-bit mode running under z/VM, so it can not be guaranteed that DIAG access can be enabled for this device.

GENERAL VARIABLES
There are some general settings in the file /etc/sysconfig/hardware/config.

DEBUG

USE_SYSLOG

FAILURE_ACTION

Please see the description of these variables in
    /etc/sysconfig/hardware/config.

BUGS
hwstatus is still not implemented.

Please report bugs at <http://www.suse.de/feedback>

AUTHOR
Christian Zoz <zoz@suse.de> -- hwup script
Hannes Reinecke <hare@suse.de> -- S/390 configuration

SEE ALSO
getcfg(8),
/etc/sysconfig/hardware/*,
/etc/sysconfig/hardware/skel/*