1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
|
.\" $Header$
.\" vim:tw=72:filetype=nroff
.\"
.\" manpage for slack.conf
.\"
.TH slack 8 2004-10-22 "Administrative commands"
.SH NAME
slack \- Sysadmin's lazy autoconfiguration kit
.SH SYNOPSIS
\fBslack\fR [\fIoption ...\fR] [\fIrole ...\fR]
.SH DESCRIPTION
slack is a master command which coordinates the activities of its
backends, which variously:
.IP \(bu
determine the list of roles to be installed on this server
.IP \(bu
create a local cached copy of the role files from the central repository
.IP \(bu
merge file trees from subroles into a single, unified tree
.IP \(bu
install files onto the local filesystem
.IP \(bu
run scripts before and after installation
.PP
Options you give to slack will be generally passed along to the backends
where relevant.
.SH OPTIONS
.TP
\fB\-h\fR, \fB\-\-help\fR
Print a usage statement.
.TP
\fB\-\-version\fR
Print the version and exit.
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Increase verbosity. Can be specified multiple times.
.TP
\fB\-\-quiet\fR
Don't be verbose (Overrides previous uses of --verbose).
.TP
\fB\-C\fR, \fB\-\-config FILE\fR
Use the specfied FILE for configuration instead of the default,
.IR /etc/slack.conf .
.TP
\fB\-s\fR, \fB\-\-source DIR\fR
Source directory for slack files
.TP
\fB\-e\fR, \fB\-\-rsh COMMAND\fR
Remote shell for rsync
.TP
\fB\-c\fR, \fB\-\-cache DIR\fR
Local cache directory for slack files
.TP
\fB\-t\fR, \fB\-\-stage DIR\fR
Local staging directory for slack files
.TP
\fB\-r\fR, \fB\-\-root DIR\fR
Root destination for slack files
.TP
\fB\-\-no\-sync\fR
Skip the slack-sync step (useful if you're pushing stuff into the CACHE
outside slack).
.TP
\fB\-\-no\-files\fR
Don't install any files in ROOT, but tell rsync to print what it
would do.
.TP
\fB\-\-no\-scripts\fR
Don't run scripts
.TP
\fB\-n\fR, \fB\-\-dry\-run\fR
Same as \-\-no\-files \-\-no\-scripts (CACHE, STAGE will still be
updated)
.TP
\fB\-\-role\-list\fR
Role list for
.BR slack-getroles (8).
.TP
\fB\-b\fR, \fB\-\-backup\fR
Make backups of existing files in ROOT that are overwritten. This
option defaults to on if it is not set to 0 in a config file or disabled
with --nobackup on the command line.
.TP
\fB\-\-backup\-dir\fR
Put backups from the
.B \-\-backup
option into this directory.
.TP
\fB\-H\fR, \fB\-\-hostname HOST\fR
Pretend to be running on HOST, instead of the name given by
gethostname(2).
.TP
\fB\-\-preview MODE\fR
Do a diff of scripts and files before running them.
MODE can be one of 'simple' or 'prompt' (See PREVIEW MODES, below).
.TP
\fB\-\-diff PROG\fR
Use this diff program for previews.
.TP
\fB\-\-sleep TIME\fR
Randomly sleep between 1 and TIME seconds before starting
operations. Useful in crontabs.
.SH PREVIEW MODES
.PP
Preview functionality is new in slack 0.14.0. I haven't quite
worked out how things will work, so this usage is somewhat subject to
change in future versions. I thought I would try it this way and see
how people like it.
.PP
In 'simple' mode, after syncing and staging the files directory, slack
will present a diff of the files and scripts. In this mode, slack will
not run the preinstall or fixfiles scripts, and because of this, it may
provide some false output about permissions changes to files.
.PP
In 'prompt' mode, after syncing and staging the files directory, slack
will diff the script directory. If there are differences, slack will
present them to you and ask you if you want to continue. If you say
no, it will exit. If you say yes, it will stage the scripts directory,
run the preinstall and fixfiles scripts, and then diff the files in the
stage with those in the root. If there are differences, slack will
present them to you and ask you if you want to continue. If you say no,
it will exit. If you say yes, it will install the files and run the
postinstall script.
.PP
So, the 'simple' mode is easy to use, and will be accurate if you don't
use fixfiles. The 'prompt' mode will be accurate if you use fixfiles,
but requires some interaction.
.PP
Why can't we just have one mode that works with fixfiles and requires no
interaction? Well, that would require slack to understand what your
free-form fixfiles executable was going to do, which would either
require some kind of universe simulator or would require you to write
your fixfiles in a less free-form way, which would make slack less like
slack.
.SH EXAMPLES
.PP
To install all the roles configured in the role list for a server:
.RS
slack
.RE
.PP
To install a specific role:
.RS
slack
.I rolename
.RE
.PP
To test a new role before checking in the changes:
.RS
slack --source
.IR user @ workstation :/home/ user /.../slack
.I rolename
.RE
.PP
To avoid killing your master server when calling from cron:
.RS
slack --sleep 3600
.RE
.SH FILES
.I /etc/slack.conf
.SH SEE ALSO
.BR slack.conf (5),
.BR rsync (1)
|