New piktc Options
[Notes (edited slightly) issued with the release of PIKT 1.19.0pre2, which: added the new piktc options '-x' & '-X', for piggybacking remote command executions onto other piktc operations (for example, '-i'); also the new piktc option -p#', for pausing # seconds between successive piktc operations.]
Before, if for example you wanted to install a new aliases file, then run the newaliases command, you would have to do it in two separate piktc operations, something like this:
# piktc -iv +F =aliases +H vienna ... processing vienna... installing file(s)... /etc/aliases installed ... # piktc -xv +C "\=newaliases" +H vienna ... processing vienna... executing command(s)... "=newaliases" executed ...
You may now install and execute in a single piktc command as follows:
# piktc -ixv +F =aliases +C "=newaliases" +H vienna ... processing vienna... installing file(s)... /etc/aliases installed executing command(s)... "=newaliases" executed ...
'-x' (also '-X') may be combined with many other piktc options, such as '-B' (for restoring from backup), '-e' (for enabling alerts), '-t' (deleting files), and so on.
Note that, when combined with other piktc operations in this way, commands are always exec'ed after the other operation. (So, for example, 'newaliases' would always be exec'ed after the aliases file install.)
In certain situations, for example restarting server processes in a complex production environment, you might want to allow some arbitrary time between restarts. That is to say, if you did something like this:
# piktc -x +C "=svcfoo restart" +H servers
(or even more so, with '-X', exec without wait), the svcfoo restarts might happen in such rapid succession that problems might result.
With the new '-p#' command-line option, you may now insert an arbitrary pause of # seconds between any successive piktc operation (from system to system). So, for example, you might do this:
# piktc -xp15 +C "=svcfoo restart" +H servers
With that command, piktc would send the '=svcfoo restart' command to the first server, then pause for 15 seconds, then send the restart command to the second server, then pause 15 seconds, and so on.
You may add a '-p#' pause to any piktc operation, not just command execs ('-x' & '-X').
(Note that the before, '-p' was used for PIKT.conf installs. You would now use 'piktc -Q' for that operation.)
For more examples, see Developer's Notes.