Highlighted

SF 6.0 response file issues

Hello

 

I wonder if I can call upon your skills again.

 

I'm installing SF v.6 onto a Linux Platform, and trying to script an automated install onto multiple servers, without much luck.

 

I have created a basic reponse file using the installsf -makeresponsefile command, which I have tried to edit to call the hostname variable (short name)

As below:

# Configuration Values:
#
MYHOST="`/bin/hostname -s`"
our %CFG;
$CFG{opt}{configure}=1;
$CFG{opt}{prodmode}="SF Enterprise";
$CFG{opt}{vxkeyless}=1;
$CFG{prod}="SF60";
$CFG{systems}=[ qw(${MYHOST}) ];

But all I seem to get is an error, syntax error at /var/tmp/test.response line 5, near "our "

Has anyone created a working file that can call a short hostname within this file?

 

Many thanks in advance.

 

S Parmar

 

1 Solution

Accepted Solutions
Highlighted
Accepted Solution!

The response file is perl so

The response file is perl so you MAY be able to use perl syntax, but I have automated install using responsefiles and just used sed.  Just save generated responsefile to "responsefile.template" just changing hostname to "%MYHOST%" so line in responsefile reads:

$CFG{systems}=[ qw(%MYHOST%) ];

and then run script 

 MYHOST=`/bin/hostname -s`
sed -e s/%MYHOST%/$MYHOST/ responsefile.template > ${MYHOST}.resp

and then call installer with responsefile  ${MYHOST}.resp.

I used this method changing a whole load of variables to configure VCS so expanded sed statement to have a lot of "-e" flags so something like:

 

sed -e s/%MYHOST%/$MYHOST/ -e s/%MYVAR2%/$MYVAR2/ responsefile.template > ${MYHOST}.resp

 

Mike

View solution in original post

6 Replies
Highlighted

Response file is not shell script

Although response file is not shell script, lines you added are in form of shell scripting. Remove first line, and replace "${MYHOST}" with actual host name.
Highlighted

Hi Yasuhisa     Thanks for

Hi Yasuhisa

 

 

Thanks for the reply.

The idea of making the install/configure automated means that I need to insert the hostname (short) into this response file, there will be thousands of server that this will be run on, so if anyone knows of a way they have used to do this, that would really be a help.

 

Thanks

 

Highlighted

why don't you write a script?

why don't you write a script that generate an actual response file from template, and run "installsf -responsefile"?
Highlighted

Nice Idea

Nice Idea, however, never tried like this and not sure, if it will work. From general scripting perspective, try the following :

MYHOST=`/bin/hostname -s`;
our %CFG;

> Remove the quotes (it work even with the quotes on the command line, though. But can't say how the parent script (that calls this faile) treats those quotes)

> End the line with ";"

Highlighted
Accepted Solution!

The response file is perl so

The response file is perl so you MAY be able to use perl syntax, but I have automated install using responsefiles and just used sed.  Just save generated responsefile to "responsefile.template" just changing hostname to "%MYHOST%" so line in responsefile reads:

$CFG{systems}=[ qw(%MYHOST%) ];

and then run script 

 MYHOST=`/bin/hostname -s`
sed -e s/%MYHOST%/$MYHOST/ responsefile.template > ${MYHOST}.resp

and then call installer with responsefile  ${MYHOST}.resp.

I used this method changing a whole load of variables to configure VCS so expanded sed statement to have a lot of "-e" flags so something like:

 

sed -e s/%MYHOST%/$MYHOST/ -e s/%MYVAR2%/$MYVAR2/ responsefile.template > ${MYHOST}.resp

 

Mike

View solution in original post

Highlighted

Many thanks, worked a treat.

Many thanks to all for the input, I tried the last post and it worked a treat.

 

Thanks again.

 

Sparmar