> Fron the nwadmin gui, if you use 'backup command' on a client, rather
> than the generic save, is there a safe way to process the arguments that
> save would have got.
Yes. Create a wrapper script and use that script to call 'save' after
processing the arguments.
> An example script is for backing up afs. I want my afs-script to
> basically say do exactly what you would have done, but prepend kstart
> $KARGS to it
>
> so instead of doing
>
> save -bunch-of-args fsys1
> save -bunch-of-args fsys2
> ..
> save -bunch-of-args fsysN
>
> it does
>
> kstart $KARGS save -bunch-of-args fsysN
Right.
> I tried making afs-script be a simple shell script and trying to process
> "$@"
>
> i.e in a very basic case
>
> #!/bin/sh
> ARGS="$@"
> touch /tmp/aa
> /usr/bin/echo "$ARGS" >> /tmp/aa
>
>
> but this doesn't seem to work very well.
I'm not sure what you mean by "doesn't seem to work very well". What
*does* it do? Does /tmp/aa get created? Do you see it running? (What
OS?) On Solaris you could 'truss' the nsrexecd process to see what it
tries to fire off.
Do note that 'kstart' doesn't appear to be a legal name for the script.
$ man nsr_client
[snip...]
backup command (read/write, string)
The remote command to run to backup data for this
client and save sets. This command can be used to per-
form pre and post backup processing and defaults to the
save command. The value must not include a path and
must start with the prefix "save" or "nsr".
Example: backup command: savemsg;
'kstart' doesn't match that specification. I tried the same thing but
named 'savetest' and in the correct directory and I do get all the
expected arguments output to the file.
--
Darren Dunham ddunham AT taos DOT com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
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
|