LSM Script Types
•Are Scripts written in bash (for the LSM RAM Agent's Live-Ubuntu) and are executed by the LSM RAM Agent in RAM (volatile memory) of a Machine
•Are one of 2 types of Payload stages, Snapshots being the other Payload stage type
•Are User-provided (and examples are provided) and LSM-provided
•Can be used to copy files/Scripts to/from the LSM Server and a Machine's on-disk Target OS (Windows, Linux...)
LSM RAM Agent Scripts are managed by the LSM GUI
Target OS Files (including Target OS Scripts):
•User-provided Target OS files (including Scripts) are copied to and from the LSM Server and the disk(s) of a Machine being serviced.
•User-provided Target OS Scripts can be first-boot Scripts that can perform any number of system management tasks, including Machine personalization/de-personalization, software installation/configuration, service registration, etc.
oAre written in the desired language of the Target OS:
▪Windows, e.g., .ps1, .vbs, .wsh
▪Linux, .e.g., .sh, .php, etc.
Target OS Files and Scripts are placed by the User on the LSM file system and are NOT managed by the LSM GUI, rather are copied by LSM RAM Agent Scripts to the Target OS (Windows, Linux...)
Go to the Scripts page:
Note the 3 areas of the page:
•Registered User RAM Agent Scripts
•Source User RAM Agent Scripts (these have yet to be registered by the User)
•LSM RAM Agent Scripts (provided with LSM)
RAM Agent bash scripts must begin with #!/bin/bash
Place your RAM Agent scripts in:
/home/LinMin/service/serviceScripts/user_source_ram_os_scripts
For example:
# pwd
/home/LinMin/service/serviceScripts/user_source_ram_os_scripts
[root@rhel7-lsm70 user_source_ram_os_scripts]# ll
total 20
-rw-r--r--. 1 root root 12 May 23 15:14 CentOS7_personalize_settings.sh
-rw-r--r--. 1 root root 12 May 23 15:14 RHEL7_personalize_settings.sh
-rw-r--r--. 1 root root 12 May 23 15:14 Ubuntu18-04_personalize_settings.sh
-rw-r--r--. 1 root root 12 May 23 15:15 WS2016_SQL_Server_install.sh
-rw-r--r--. 1 root root 12 May 23 15:15 WS2016_SQL_Server_personalize.sh
Refresh the list and you will see your RAM Agent scripts appear (still Unregistered).
Register a Script by clicking the Register button next to the Script:
You are now brought to the RAM Agent Script Details page. Change script name, group and/or Descriptions then Commit Register:
Review your changes then Return to Scripts List:
Your Registered Script now appears in the Scripts List:
Your Script was copied to:
# ll /home/LinMin/service/serviceScripts/ram_os_scripts/Cent*
-rw-r--r--. 1 root root 12 May 23 15:14 /home/LinMin/service/serviceScripts/ram_os_scripts/CentOS7_personalize_settings.sh
Your original Script was not touched:
# ll /home/LinMin/service/serviceScripts/user_source_ram_os_scripts/CentOS7_p*
-rw-r--r--. 1 root root 12 May 23 15:14 /home/LinMin/service/serviceScripts/user_source_ram_os_scripts/CentOS7_personalize_settings.sh
Modify then Replace Registered Scripts if Not In User
When you modify a Registered Script, do so in the original directory user_source_ram_os_scripts/:
# ll /home/LinMin/service/serviceScripts/user_source_ram_os_scripts/CentOS7_p*
-rw-r--r--. 1 root root 13 May 23 16:01 /home/LinMin/service/serviceScripts/user_source_ram_os_scripts/CentOS7_personalize_settings.sh
LSM will discover that the Registered Script does not match the source script and the GUI allows you to Replace the Script so long that the Registered Script is Not In Use.
Click REPLACE to replace the Script (that is not In Use):
The Registered Script has now been replaced:
Your newly Registered Script is now available as a Stage in a Payload:
An example of several registered User Scripts:
Search keyword(s): scripts_list script_details