Sample scripts for customized solutions
To create customized solutions for distribution using Distribution Manager Add-on, you must upload a setup script and unsetup script for installing and uninstalling the solution. The following are examples of these scripts.
Sample setup script:
\#!/opt/VRTSsfmh/bin/perl
BEGIN { @INC = ("/opt/VRTSsfmh/lib/modules"); }
\# Stage area for the distribution is defined as $stage_dir.
\# All files in the distribution will be under $stage_dir
my $stage_dir = $ENV{'Store'};
\# Code for installing distribution goes here
\# For example
\# my $out = 'rpm -i $stage_dir/mypackage-1.0.rpm';
\# if($? == 0)
\# {
\# exit(0); #Success
\# }
\# else
\# {
\# exit(1); #Failed
\# }
Sample unsetup script:
\#!/opt/VRTSsfmh/bin/perl
BEGIN { @INC = ("/opt/VRTSsfmh/lib/modules"); }
\# Stage area for the distribution is defined as $stage_dir
\# All files in the distribution will be under $stage_dir
my $stage_dir = $ENV{'Store'};
\# Code for un-installing distribution goes here
\# For example
\# my $out = 'rpm -e mypackage-1.0'
\# if($? == 0)
\# {
\# exit(0); #Success
\# }
\# else
\# {
\# exit(1); #Failed
\# }
Related information