Thanks Maarten,
I had a feeling that the answer wasn't going to be simple...
We use Solaris here.
Cheers
-----Original Message-----
From: Maarten.Boot AT nl.compuware DOT com [mailto:Maarten.Boot AT nl.compuware
DOT com]
Sent: 14 November 2005 10:18
To: Legato NetWorker discussion; CHRISTOPHER.JONES AT saic DOT com
Subject: Re: [Networker] nsradmin: adding and removing options without
affecting existing values
I do these things with perl, and for the more complex issues like this you
have to build and test custom solutions.
It helps to have a good understanding of the multi-line behavior of the
nsradmin output as this can be quite complex.
create a hash or array of all the individual options and modify the list
before rebuilding the update command.
are you on unix or windows?
On Monday 14 November 2005 10:30, Jones, Stephen (East Kilbride) [OS-IE]
wrote:
> Hi,
>
> Does anyone know the best way of setting and unsetting options within NSR
> resource fields that can have multiple values?
>
> For example, if I wanted to add the "No index save" option to an nsr
group,
> how to I go about it without re-setting all the other options?
>
> A test group has been setup with the options "Revert to full when SSC
> fails" and "Verbose", as shown below:
>
> COMMAND: print type: nsr group; name: TEST_GROUP
>
> OUTPUT: options: Revert to full when SSC fails, Verbose;
>
>
> When I update the options as below, I get the following results:
>
> COMMAND: update options: No index save
>
> COMMAND: print type: nsr group; name: TEST_GROUP
>
> OUTPUT: options: No index save
>
> The "update" command has actually replaced the original options with "No
> index save", and removed the ones that were already there, i.e. "Revert to
> full when SSC fails" and "Verbose"
>
> What I need is the command that would create the following output:
>
> options: Revert to full when SSC fails, Verbose, No index
> save
>
> Similarly, does anyone know how I would go about removing an option here.
> For example, if I wanted to remove the "Verbose" option, but leave the
> "Revert to full when SSC fails" and "No index save" values intact?
>
> I want to be able to script these changes, so going into visual mode or
> using the editor is not an option.
>
> Any advice would be much appreciated.
>
> Thanks
>
> To sign off this list, send email to listserv AT listserv.temple DOT edu and
> type
> "signoff networker" in the body of the email. Please write to
> networker-request AT listserv.temple DOT edu if you have any problems wit this
> list. You can access the archives at
> http://listserv.temple.edu/archives/networker.html or via RSS at
> http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER
--
Maarten Boot,
Compuware Europe B.V.
Hoogoorddreef 5
1101 BA Amsterdam
Tel: +31 20 312 6511
To sign off this list, send email to listserv AT listserv.temple DOT edu and
type "signoff networker" in the
body of the email. Please write to networker-request AT listserv.temple DOT edu
if you have any problems
wit this list. You can access the archives at
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER
|