[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Solaris JET finish script confusion

Posted on 2008-06-15
5
Medium Priority
?
1,453 Views
Last Modified: 2013-12-27
Hi

I have alot of confusion regarding the running of a finish script after a Sollaris JET install.
The Jet install works fine and the finish script runs but I do not understand if the script is running on the Jumpstart server or client and why the /a directory is empty.

I would like to copy some files from the Jumpstart server to the Jumpstart client but initially I would like to understand exactly what is mounted to what.

I am using JET, so a JET template
The template defines the finish script as:  custom_scripts_m="athena-finish.sh"
The actual script exists on the Jumpstart server under here: /opt/SUNWjet/Clients/athena/athena-finish.sh
The script runs ok but I can not seem to use the mounted /a directory and I am not sure which server is running the script - The Jumpstart  server or the client.

The finish script is this:
#!/bin/sh
BASE="/a"
CLIENT=athena
SERVER="192.168.1.140"
echo "******************************"
echo "***** FINISH SCRIPT **********"
echo "******************************"
echo "**** Check a dir"
ls -alp
ls -alp ${BASE}
echo "***** COPY 1 ****"
echo "***** Running on server"
cp /opt/SUNWjet/Clients/athena/hosts ${BASE}/etc/inet/hosts
cp /opt/SUNWjet/Clients/athena/.profile ${BASE}/.profile
echo "*** Running on client"
cp ${BASE}/opt/SUNWjet/Clients/athena/hosts /etc/inet/hosts
cp ${BASE}/opt/SUNWjet/Clients/athena/.profile /.profile

The output is this:

CUSTOM: Running 001.custom.002.athena-finish.sh
******************************
***** FINISH SCRIPT **********
******************************
**** Check a dir
total 1087
drwxr-xr-x  23 root     root         512 Jun 15 18:45 ./
drwxr-xr-x  23 root     root         512 Jun 15 18:45 ../
-rwxr-xr-x   1 root     other       4374 Jun 15 08:22 .profile
drwxr-xr-x   2 root     root         512 Jun 14 21:49 a/
drwxr-xr-x   3 root     root         512 Jun 14 21:42 apps/
lrwxrwxrwx   1 root     root           9 Jun 15 18:43 bin -> ./usr/bin/
drwxr-xr-x  17 root     sys         3584 Jun 15 18:45 dev/
drwxr-xr-x   5 root     sys          512 Jun 15 18:43 devices/
drwxr-xr-x  60 root     sys         3584 Jun 15 18:49 etc/
drwxr-xr-x   3 root     sys          512 Jun 15 18:43 export/
dr-xr-xr-x   1 root     root           1 Jun 15 18:49 home/
drwxr-xr-x  10 root     sys          512 Jun 15 18:43 kernel/
lrwxrwxrwx   1 root     root           9 Jun 15 18:43 lib -> ./usr/lib/
drwx------   2 root     root        8192 Jun 14 21:11 lost+found/
drwxr-xr-x   2 root     sys          512 Jun 14 21:12 mnt/
dr-xr-xr-x   1 root     root           1 Jun 15 18:49 net/
-rw-r--r--   1 root     root           0 Jun 15 18:44 noautoshutdown
drwxr-xr-x   4 root     sys          512 Jun 15 18:43 opt/
drwxr-xr-x  47 root     sys         2048 Jun 15 18:43 platform/
-rw-r--r--   1 root     other      26112 Jun 15 10:57 post-flash.tar
dr-xr-xr-x  36 root     root      480032 Jun 15 18:49 proc/
drwxr-xr-x   2 root     sys         1024 Jun 15 18:43 sbin/
drwxrwxrwt   3 root     sys          185 Jun 15 18:49 tmp/
drwxr-xr-x  37 root     sys         1024 Jun 15 18:43 usr/
drwxr-xr-x  34 root     sys          512 Jun 15 18:39 var/
dr-xr-xr-x   2 root     root         512 Jun 14 21:49 vol/
drwxr-xr-x   3 root     root         512 Jun 14 21:42 wkspace/
dr-xr-xr-x   1 root     root           1 Jun 15 18:49 xfn/
total 4
drwxr-xr-x   2 root     root         512 Jun 14 21:49 ./
drwxr-xr-x  23 root     root         512 Jun 15 18:45 ../
**** Check a dir
***** COPY 1 ****
***** Running on server
cp: cannot access /opt/SUNWjet/Clients/athena/hosts
cp: cannot access /opt/SUNWjet/Clients/athena/.profile
*** Running on client
cp: cannot access /a/opt/SUNWjet/Clients/athena/hosts
cp: cannot access /a/opt/SUNWjet/Clients/athena/.profile
501 Terminated

I do not understand why I do not have access to the a/opt/SUNWjet/Clients/athena directory ?

Thanks in advance

0
Comment
Question by:s2budd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 38

Accepted Solution

by:
yuzh earned 200 total points
ID: 21790338
It is for finishing your client's configurations.

Have a look at the following links to get more backgroud information:
http://jet.maui.co.uk/wiki/index.php/JETPrimer
http://www.sun.com/bigadmin/content/jet/
http://wikis.sun.com/display/JET/Home;jsessionid=792CB5BBE568C706B861479474AF8387
0
 

Author Comment

by:s2budd
ID: 21790900
Hello
Thanks for your reply. Yes I know about the above references and I did look in them again before posting but I am still confused. I can find some information within the the Yahoo group that's about 25% relevant and the JET documentation needs an update but does include a finish script but with a Perl script that modifies Jumpstart which is a bit confusing.

Does the finish script in the above example from the JET template:  custom_scripts_m="athena-finish.sh"
actually run on the Jumpstart server or the jumpstart client?
I am about 70% sure that it runs on the client but do not know why the directory /a is empty. I thought that a/ whould contain one of the NFS shares from the Jumpstart server.
0
 
LVL 22

Assisted Solution

by:blu
blu earned 300 total points
ID: 21792625
It definitely runs on the client.
0
 
LVL 22

Assisted Solution

by:blu
blu earned 300 total points
ID: 21792725
When the finish script runs, the newly installed operating system is usually installed at /a, but it is possible that a different location is used. If that is what is happening to you, you can change your script to use the variable
$ROOTDIR where you have $BASE now, except you don't set it in the scrip of course.
0
 

Author Closing Comment

by:s2budd
ID: 31467610
Thanks guys
Awarded points as:  50, 50, 25
And what do points make? Points make prizes.

0

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question