'\" t
.\" aegis - project change supervisor
.\" Copyright (C) 2006-2008 Peter Miller
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 3 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program. If not, see
.\" .
.\"
.\"
.\" aegis - project change supervisor
.\" Copyright (C) 1991-1993, 1997, 2006-2008 Peter Miller
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 3 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program. If not, see
.\" .
.\"
.ds n) aegis
.ds N) Aegis
.if n .nr )M 8n
.if n .nr IN 8n
.if n .nr )I 8n
.if n .po 0
.hy 0
.if n .ad l
.de r)
.if !'\\*(R)'no' \{\
.PP
See also
.IR \*(n) (1)
for options common to all \*(n) commands.
.\}
..
.de eB
.RS
.nf
.ft CW
.ta 8n 16n 24n 32n
..
.de eE
.ft P
.fi
.RE
..
.ds n) aelock
.TH "\*(n)" 1 \*(N) "Reference Manual" ""
.SH NAME
aelock \- take a lock while a command runs
.XX "aelock(1)" "take a lock while a command runs"
.SH SYNOPSIS
.B aelock
[
.IR option \&...
]
.IR command
.br
.B \*(n)
.B -Help
.br
.B \*(n)
.B -VERSion
.SH DESCRIPTION
The \fI\*(n)"\fP command is used to take a project lock while a command
runs. This may be used to ensure that the project state is stable while
it is being backed up.
.PP
The named command is looked for as an attribute called
\f[CW]aelock:\fP\fIcommand\fP within the \fIproject_\&specific\fP field
of the project configuration file.
.PP
The command is then passed through the usual \fIaesub\fP(5)
substitutions before being executed. The command is executed as the
project owner. If the command returns with a non-zero exit status, the
\fI\*(n)\fP(1) command will return an exit status
of one.
.SS Security Issues
This command is a potential security problem. Because it takes a
read-only lock of all active branches and changes in a project, from the
trunk down, misuse of this command is a potential denial of service
attack. Thus, this command is limited to project administrators only.
.PP
This command could have been designed to take an arbitrary command to
execute, like \fIsudo\fP(1), but this would have granted users, even
project administrators, more privileges than usual. For this reason,
the command is held in a source controlled, fully reviewed project
configuration file, and is simply indicated by name.
.PP
The command is run as the project owner, not the executing user. It
has full write access (that's the way Unix permissions work). Like
\fIaeb\fP(1), this means it can wreak havoc on the project baseline and
meta-data. Use with extreme care.
.SH OPTIONS
The following options are understood:
.\"
.\" aegis - project change supervisor
.\" Copyright (C) 1991-1993, 2006-2008 Peter Miller.
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 3 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program. If not, see
.\" .
.\"
.TP 8n
\fB-Project\fP \fIname\fP
This option may be used to select the project of interest.
When no
.B -Project
option is specified,
the
.I AEGIS_PROJECT
environment variable is consulted.
If that does not exist,
the user's
.I $HOME/.aegisrc
file is examined for a default project field (see
.IR aeuconf (5)
for more information).
If that does not exist,
when the user is only working on changes within a single project,
the project name defaults to that project.
Otherwise,
it is an error.
.\"
.\" aegis - project change supervisor
.\" Copyright (C) 1991-1993, 2006-2008 Peter Miller.
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 3 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program. If not, see
.\" .
.\"
.TP 8n
.B -Help
.br
This option may be used to obtain more information about how to use the
.I \*(n)
program.
.\"
.\" aegis - project change supervisor
.\" Copyright (C) 1991-1993, 2006-2008 Peter Miller.
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 3 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program. If not, see
.\" .
.\"
.r)
.PP
All options may be abbreviated;
the abbreviation is documented as the upper case letters,
all lower case letters and underscores (_) are optional.
You must use consecutive sequences of optional letters.
.PP
All options are case insensitive,
you may type them in upper case or lower case or a combination of both,
case is not important.
.PP
For example:
the arguments "-project, "-PROJ" and "-p" are
all interpreted to mean the \fB-Project\fP option.
The argument "-prj" will not be understood,
because consecutive optional characters were not supplied.
.PP
Options and other command line arguments may be
mixed arbitrarily on the command line,
after the function selectors.
.br
.ne 4
.PP
The GNU long option names are understood.
Since all option names for
.I \*(n)
are long,
this means ignoring the extra leading '-'.
The "\fB--\fIoption\fB=\fIvalue\fR" convention is also understood.
.\"
.\" aegis - project change supervisor
.\" Copyright (C) 1991-1993, 1995, 1997, 2004, 2006-2008 Peter Miller
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 3 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program. If not, see
.\" .
.\"
.SH EXIT STATUS
The
.I \*(n)
command will exit with a status of 1 on any error.
The
.I \*(n)
command will only exit with a status of 0 if there are no errors.
.SH ENVIRONMENT VARIABLES
See \fIaegis\fP(1) for a list of environment variables which may affect
this command.
See \fIaepconf\fP(5) for the project configuration file's
\fIproject_\%specific\fP field for how to set environment variables for
all commands executed by Aegis.
.\"
.\" aegis - project change supervisor
.\" Copyright (C) 1991-1995, 1997, 2006-2008 Peter Miller
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 3 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program. If not, see
.\" .
.\"
.br
.ne 2i
.SH COPYRIGHT
.ds v) 4.24.3
.ds V) 4.24.3.D001
.ds o) 0
.ds p) 4.25
.ds u) 4.24
.ds Y) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
\*(n) version \*(V)
.br
.if t .ds C) \(co
.if n .ds C) (C)
Copyright \*(C) \*(Y) Peter Miller
.PP
The \*(n) program comes with ABSOLUTELY NO WARRANTY;
for details use the '\fI\*(n) -VERSion License\fP' command.
This is free software
and you are welcome to redistribute it under certain conditions;
for details use the '\fI\*(n) -VERSion License\fP' command.
.br
.ne 1i
.SH AUTHOR
.TS
tab(;);
l r l.
Peter Miller;E-Mail:;millerp@canb.auug.org.au
\f(CW/\e/\e*\fR;WWW:;http://www.canb.auug.org.au/~millerp/
.TE