repln
Script
This page provides a reference guide for the
repln
script. The script is useful in creating and maintaining the symbolic
links used to glue our opt
directories together. The
primary job repln
does is to replicate symbolic links,
but its options permit it to do more than that, and in some
usefully-structured ways.
repln [ options ] [ from-directory ] ...
Where 'options' are selected from the following list. Options are divided into four categories:
opt
policies, and have certain pre-determined behaviors
built into their functioning.
/opt
directory structure; ignores
these other options: --(no)new,
--(no)links, --to,
--parent
/opt/bin,
/opt/lib
, etc.; ignores these other options:
--(no)links, --parent; implies
--new
include
subdirectory. Only applies when the --opt or
--app options are used.
/opt
directory remotely. This is actually just shorthand for
--sub=s+/mstr++, but when used with
--from=/opt/mstr/appname --to=/opt/mstr
, works
really cool
--sub=s/pkg/mstr/
, or -s
s+/mstr++
). Use this when the links are being created in the
right place, but for some reason have the wrong value.
-f /net/srvr01/_c/opt.10
, or
--from=/opt/appname
Note that the --parent and --from options are mutually exclusive. To include the parent directory itself when using --parent, add "." (a period, meaning current directory) to the list of subdirectories. Also, --nonew and --nolinks are mutually exclusive; since --nonew is the default, this means that --nolinks must be accompanied by --new.
In the output, a ---> marker denotes a replicated symbolic link. A -+-> marker denotes a new link, created to point to a real file.
After a new app is created in /opt/mstr
, to install
convenience links on the master machine itself:
repln --app --from=/opt/mstr/appname --to=/opt/mstr --master
After one or more new apps have been installed, to propagate links to
another host:
repln --opt --from=/opt/mstr --to=/net/hostname/opt --refresh
To just replicate a set of links from one directory to another:
repln --from=fromdir --to=todir
It is always recommended that you try a command with
the --view (or -v) option first,
before you actually make the links. Remember that the
--from= and --to= options can be
abbreviated as -f and -t respectively.
All the options are summarized above.