Service management - Create/Edit guest stop script
Description
This option will allow you to edit the stop script that will be executed at service shutdown.
If the script does not exist, it will be generated automatically based on existing guests and will by default do nothing.
You will have either to add your own shutdown scripts or to get examples provided in the 'charon_gstart.stop.example' script located in the '/opt/charon/utils' folder. Examples are provided for clean shutdown using 'ssh' or 'expect' thanks to the 'guest_shutdown.exp' script
Contents:
Explanation on the example file
Example with SSH, Tru64 or VMS guest
You will have to create an ssh trust between the Charon Linux server and the Tru64 guest in order to use this option.
- Update the configuration file name
- Replace the existing hostname 'pluto' by your Tru64 guest hostname
Example with Expect tool, Tru64 guest
The 'guest_shutdown.exp' script can perform operations to log off user connected on the console, enter a username/password to login, execute the shutdown command and detect the SRM prompt to issue the 'power off' command (AXP) or send the F6 key (VAX) if enabled. Note any existing connection to the console will be killed before executing the expect script.
- Update the configuration file name
- Replace the user, password and shell prompt by the corresponding one (shell prompt is used to determine if a user is logged on the console)
Example with Expect tool, AXP VMS guest
The 'guest_shutdown.exp' script can perform operations to log off user connected on the console, enter a username/password to login, execute the shutdown command and detect the SRM prompt to issue the 'power off' command (AXP) or send the F6 key (VAX) if enabled. Note any existing connection to the console will be killed before executing the expect script.
- Update the configuration file name
- Replace the user, password and shell prompt by the corresponding one (shell prompt is used to determine if a user is logged on the console)
Example with Expect tool, VAX VMS guest
The 'guest_shutdown.exp' script can perform operations to log off user connected on the console, enter a username/password to login, execute the shutdown command and detect the SRM prompt to issue the 'power off' command (AXP) or send the F6 key (VAX) if enabled. Note any existing connection to the console will be killed before executing the expect script.
- Update the configuration file name
- Replace the user, password and shell prompt by the corresponding one (shell prompt is used to determine if a user is logged on the console)
The F6 key can be enabled or not in the configuration file. The expect script will send it if the 'power off' command fails and if the operation fails will exit with return code 9 meaning the emulator process will have to be killed.
Optional guest display status script
It is possible to create a script in the '/opt/charon/utils' folder named 'charon_gstart.chkrun' (an example is provided in the 'charon_gstart.chkrun.example' file).
This will add a status line while displaying the guests list.
Display output example:
Script example:
© Stromasys, 1999-2024 - All the information is provided on the best effort basis, and might be changed anytime without notice. Information provided does not mean Stromasys commitment to any features described.