Use chshut and dumpconf to configure a CP command
as a shutdown action, or directly write to the relevant sysfs attributes.
Before you start: This information applies to Linux® on z/VM
only.
In sysfs, two attributes are required to set a z/VM CP
command as a shutdown action for a trigger <trigger>:
/sys/firmware/shutdown_actions/on_<trigger> must be
set to vmcmd.
/sys/firmware/vmcmd/on_<trigger> specifies the z/VM CP command.
The values of the attributes in the /sys/firmware/vmcmd directory must
conform to these rules:
The value must be a valid z/VM CP command.
The commands, including any z/VM user IDs or device
numbers, must be specified with uppercase characters.
Commands that include blanks must be delimited by double quotation marks (").
The value must not exceed 127 characters.
You can specify multiple z/VM CP commands that are
separated by the newline character \n. Each newline is counted as one character. When writing
values with multiple commands, use this syntax to ensure that the newline character is processed
correctly:
Figure 1 illustrates the relationship of the sysfs attributes
for this example.Figure 1. sysfs branch with shutdown action settings
Example for multiple z/VM CP commands
Issue the following command to configure two z/VM CP
commands as the shutdown action for the poff shutdown trigger. First a message is
sent to user OPERATOR, and then the LOGOFF command is
issued.