summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2013-04-20 19:11:19 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2013-04-20 19:58:21 (GMT)
commit59849e3be117458f687e5e540dbc870aa4dfd920 (patch) (side-by-side diff)
treee18dc445beb1a3c1162bdbed3c10dfccdaf3f8b8
parent0320e20133d5f606dc65dac164b0e3731bca9b46 (diff)
downloadeclat-59849e3be117458f687e5e540dbc870aa4dfd920.tar.gz
eclat-59849e3be117458f687e5e540dbc870aa4dfd920.tar.bz2
Implement new command - lsattr. Improve docs.
The lsattr command combines the functionality of lsiattr and lssattr.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--TODO289
-rw-r--r--doc/eclat-allocaddr.14
-rw-r--r--doc/eclat-assocaddr.14
-rw-r--r--doc/eclat-atvol.114
-rw-r--r--doc/eclat-conmesg.14
-rw-r--r--doc/eclat-deimg.112
-rw-r--r--doc/eclat-devol.114
-rw-r--r--doc/eclat-disasaddr.112
-rw-r--r--doc/eclat-freeaddr.14
-rw-r--r--doc/eclat-lsaddr.16
-rw-r--r--doc/eclat-lsiattr.14
-rw-r--r--doc/eclat-lsimg.18
-rw-r--r--doc/eclat-lsinst.14
-rw-r--r--doc/eclat-lsistat.16
-rw-r--r--doc/eclat-lsreg.16
-rw-r--r--doc/eclat-lssattr.110
-rw-r--r--doc/eclat-lssg.18
-rw-r--r--doc/eclat-lssnap.18
-rw-r--r--doc/eclat-lstag.112
-rw-r--r--doc/eclat-lsvol.16
-rw-r--r--doc/eclat-lszon.112
-rw-r--r--doc/eclat-mkimg.116
-rw-r--r--doc/eclat-mksnap.14
-rw-r--r--doc/eclat-mktag.112
-rw-r--r--doc/eclat-mkvol.110
-rw-r--r--doc/eclat-reboot.14
-rw-r--r--doc/eclat-rmsnap.14
-rw-r--r--doc/eclat-rmtag.112
-rw-r--r--doc/eclat-rmvol.18
-rw-r--r--doc/eclat-setiattr.14
-rw-r--r--doc/eclat-start.14
-rw-r--r--doc/eclat-stop.14
-rw-r--r--doc/eclat.159
-rw-r--r--etc/Makefile.am4
m---------grecs0
-rw-r--r--src/Makefile.am2
-rw-r--r--src/cmdline.opt14
-rw-r--r--src/eclat.c89
-rw-r--r--src/eclat.h2
-rw-r--r--src/lsattr-cl.opt44
-rw-r--r--src/lsattr.c55
41 files changed, 492 insertions, 306 deletions
diff --git a/TODO b/TODO
index 594c478..d753794 100644
--- a/TODO
+++ b/TODO
@@ -1,151 +1,152 @@
This is a list of EC2 actions and their status in Eclat.
A check mark in Impl column means the corresponding action is implemented,
-and that in Doc columnt means the action is documented. The abbreviation
-column lists the action abbreviation, which is used to name the source files.
+and that in Doc columnt means the action is documented. The Eclat Command
+column lists the corresponding command name, which is used to request the
+operation from the command line.
+---------------------------------+----------------------+------------+-------+
-| Action | Abbreviation | Impl | Doc |
+| Action | Eclat Command | Impl | Doc |
+---------------------------------+----------------------+------------+-------+
-AllocateAddress ALLCADR [X] [X]
-AssignPrivateIpAddresses ASGNPRIVIPADRS [ ] [ ]
-AssociateAddress ASSCADR [X] [X]
-AssociateDhcpOptions ASSCDHCPOPTS [ ] [ ]
-AssociateRouteTable ASSCROUTTAB [ ] [ ]
-AttachInternetGateway ATTINETGW [ ] [ ]
-AttachNetworkInterface ATTNETIF [ ] [ ]
-AttachVolume ATTVOL [X] [X]
-AttachVpnGateway ATTVPNGW [ ] [ ]
-AuthorizeSecurityGroupEgress AUTHSECGRPEG [ ] [ ]
-AuthorizeSecurityGroupIngress AUTHSECGRPIG [ ] [ ]
-BundleInstance BUNINST [ ] [ ]
-CancelBundleTask CANBUNTSK [ ] [ ]
-CancelConversionTask CANCVRSTSK [ ] [ ]
-CancelExportTask CANEXPTSK [ ] [ ]
-CancelReservedInstancesListing CANRSRVDINSTSLST [ ] [ ]
-CancelSpotInstanceRequests CANSPOTINSTREQS [ ] [ ]
-ConfirmProductInstance CFRMPRODINST [ ] [ ]
-CreateCustomerGateway CRECUSTGW [ ] [ ]
-CreateDhcpOptions CREDHCPOPTS [ ] [ ]
-CreateImage CREIMG [X] [X]
-CreateInstanceExportTask CREINSTEXPTSK [ ] [ ]
-CreateInternetGateway CREINETGW [ ] [ ]
-CreateKeyPair CREKEYPAIR [ ] [ ]
-CreateNetworkAcl CRENETACL [ ] [ ]
-CreateNetworkAclEntry CRENETACLENT [ ] [ ]
-CreateNetworkInterface CRENETIF [ ] [ ]
-CreatePlacementGroup CREPLCGRP [ ] [ ]
-CreateReservedInstancesListing CRERSRVDINSTSLST [ ] [ ]
-CreateRoute CREROUT [ ] [ ]
-CreateRouteTable CREROUTTAB [ ] [ ]
-CreateSecurityGroup CRESECGRP [ ] [ ]
-CreateSnapshot CRESNAP [X] [X]
-CreateSpotDatafeedSubscription CRESPOTDFSSCR [ ] [ ]
-CreateSubnet CRESUB [ ] [ ]
-CreateTags CRETAGS [X] [X]
-CreateVolume CREVOL [X] [X]
-CreateVpc CREVPC [ ] [ ]
-CreateVpnConnection CREVPNCNCT [ ] [ ]
-CreateVpnConnectionRoute CREVPNCNCTROUT [ ] [ ]
-CreateVpnGateway CREVPNGW [ ] [ ]
-DeleteCustomerGateway DELCUSTGW [ ] [ ]
-DeleteDhcpOptions DELDHCPOPTS [ ] [ ]
-DeleteInternetGateway DELINETGW [ ] [ ]
-DeleteKeyPair DELKEYPAIR [ ] [ ]
-DeleteNetworkAcl DELNETACL [ ] [ ]
-DeleteNetworkAclEntry DELNETACLENT [ ] [ ]
-DeleteNetworkInterface DELNETIF [ ] [ ]
-DeletePlacementGroup DELPLCGRP [ ] [ ]
-DeleteRoute DELROUT [ ] [ ]
-DeleteRouteTable DELROUTTAB [ ] [ ]
-DeleteSecurityGroup DELSECGRP [ ] [ ]
-DeleteSnapshot DELSNAP [X] [X]
-DeleteSpotDatafeedSubscription DELSPOTDFSSCR [ ] [ ]
-DeleteSubnet DELSUB [ ] [ ]
-DeleteTags DELTAGS [X] [X]
-DeleteVolume DELVOL [X] [X]
-DeleteVpc DELVPC [ ] [ ]
-DeleteVpnConnection DELVPNCNCT [ ] [ ]
-DeleteVpnConnectionRoute DELVPNCNCTROUT [ ] [ ]
-DeleteVpnGateway DELVPNGW [ ] [ ]
-DeregisterImage DRGIMG [X] [X]
-DescribeAddresses DSCRADRS [X] [X]
-DescribeAvailabilityZones DSCRAZS [X] [X]
-DescribeBundleTasks DSCRBUNTSKS [ ] [ ]
-DescribeConversionTasks DSCRCVRSTSKS [ ] [ ]
-DescribeCustomerGateways DSCRCUSTGWS [ ] [ ]
-DescribeDhcpOptions DSCRDHCPOPTS [ ] [ ]
-DescribeExportTasks DSCREXPTSKS [ ] [ ]
-DescribeImageAttribute DSCRIMGATTR [ ] [ ]
-DescribeImages DSCRIMGS [X] [X]
-DescribeInstanceAttribute DSCRINSTATTR [X] [X]
-DescribeInstances DSCRINSTS [X] [X]
-DescribeInstanceStatus DSCRINSTSTAT [X] [X]
-DescribeInternetGateways DSCRINETGWS [ ] [ ]
-DescribeKeyPairs DSCRKEYPAIRS [ ] [ ]
-DescribeNetworkAcls DSCRNETACLS [ ] [ ]
-DescribeNetworkInterfaceAttribute DSCRNETIFATTR [ ] [ ]
-DescribeNetworkInterfaces DSCRNETIFS [ ] [ ]
-DescribePlacementGroups DSCRPLCGRPS [ ] [ ]
-DescribeRegions DSCRREGS [X] [X]
-DescribeReservedInstances DSCRRSRVDINSTS [ ] [ ]
-DescribeReservedInstancesListings DSCRRSRVDINSTSLSTS [ ] [ ]
-DescribeReservedInstancesOfferings DSCRRSRVDINSTSOFRS [ ] [ ]
-DescribeRouteTables DSCRROUTTABS [ ] [ ]
-DescribeSecurityGroups DSCRSECGRPS [X] [X]
-DescribeSnapshotAttribute DSCRSNAPATTR [X] [X]
-DescribeSnapshots DSCRSNAPS [X] [X]
-DescribeSpotDatafeedSubscription DSCRSPOTDFSSCR [ ] [ ]
-DescribeSpotInstanceRequests DSCRSPOTINSTREQS [ ] [ ]
-DescribeSpotPriceHistory DSCRSPOTPRICHIST [ ] [ ]
-DescribeSubnets DSCRSUBS [ ] [ ]
-DescribeTags DSCRTAGS [X] [X]
-DescribeVolumes DSCRVOLS [X] [X]
-DescribeVolumeAttribute DSCRVOLATTR [ ] [ ]
-DescribeVolumeStatus DSCRVOLSTAT [ ] [ ]
-DescribeVpcs DSCRVPCS [ ] [ ]
-DescribeVpnConnections DSCRVPNCNCTS [ ] [ ]
-DescribeVpnGateways DSCRVPNGWS [ ] [ ]
-DetachInternetGateway DETINETGW [ ] [ ]
-DetachNetworkInterface DETNETIF [ ] [ ]
-DetachVolume DETVOL [X] [X]
-DetachVpnGateway DETVPNGW [ ] [ ]
-DisableVgwRoutePropagation DISVGWROUTPRPG [ ] [ ]
-DisassociateAddress DSSCADR [X] [X]
-DisassociateRouteTable DSSCROUTTAB [ ] [ ]
-EnableVgwRoutePropagation ENAVGWROUTPRPG [ ] [ ]
-EnableVolumeIO ENAVOLIO [ ] [ ]
-GetConsoleOutput GETCONOUT [X] [X]
-GetPasswordData GETPWDDATA [ ] [ ]
-ImportInstance IMPINST [ ] [ ]
-ImportKeyPair IMPKEYPAIR [ ] [ ]
-ImportVolume IMPVOL [ ] [ ]
-ModifyImageAttribute MODIMGATTR [ ] [ ]
-ModifyInstanceAttribute MODINSTATTR [X] [X]
-ModifyNetworkInterfaceAttribute MODNETIFATTR [ ] [ ]
-ModifySnapshotAttribute MODSNAPATTR [X] [ ]
-ModifyVolumeAttribute MODVOLATTR [ ] [ ]
-MonitorInstances MONINSTS [ ] [ ]
-PurchaseReservedInstancesOffering PURRSRVDINSTSOFR [ ] [ ]
-RebootInstances RBTINSTS [X] [X]
-RegisterImage REGIMG [ ] [ ]
-ReleaseAddress RLSADR [X] [X]
-ReplaceNetworkAclAssociation RPLNETACLASCN [ ] [ ]
-ReplaceNetworkAclEntry RPLNETACLENT [ ] [ ]
-ReplaceRoute RPLROUT [ ] [ ]
-ReplaceRouteTableAssociation RPLROUTTABASCN [ ] [ ]
-ReportInstanceStatus REPINSTSTAT [ ] [ ]
-RequestSpotInstances REQSPOTINSTS [ ] [ ]
-ResetImageAttribute RSTIMGATTR [ ] [ ]
-ResetInstanceAttribute RSTINSTATTR [ ] [ ]
-ResetNetworkInterfaceAttribute RSTNETIFATTR [ ] [ ]
-ResetSnapshotAttribute RSTSNAPATTR [X] [ ]
-RevokeSecurityGroupEgress RVKSECGRPEG [ ] [ ]
-RevokeSecurityGroupIngress RVKSECGRPIG [ ] [ ]
-RunInstances RUNINSTS [X] [ ]
-StartInstances STAINSTS [X] [X]
-StopInstances STOINSTS [X] [X]
-TerminateInstances TRMINSTS [ ] [ ]
-UnassignPrivateIpAddresses USGNPRIVIPADRS [ ] [ ]
-UnmonitorInstances UMONINSTS [ ] [ ]
+AllocateAddress allocaddr [X] [X]
+AssignPrivateIpAddresses - [ ] [ ]
+AssociateAddress assocaddr [X] [X]
+AssociateDhcpOptions - [ ] [ ]
+AssociateRouteTable - [ ] [ ]
+AttachInternetGateway - [ ] [ ]
+AttachNetworkInterface - [ ] [ ]
+AttachVolume atvol [X] [X]
+AttachVpnGateway - [ ] [ ]
+AuthorizeSecurityGroupEgress - [ ] [ ]
+AuthorizeSecurityGroupIngress - [ ] [ ]
+BundleInstance - [ ] [ ]
+CancelBundleTask - [ ] [ ]
+CancelConversionTask - [ ] [ ]
+CancelExportTask - [ ] [ ]
+CancelReservedInstancesListing - [ ] [ ]
+CancelSpotInstanceRequests - [ ] [ ]
+ConfirmProductInstance - [ ] [ ]
+CreateCustomerGateway - [ ] [ ]
+CreateDhcpOptions - [ ] [ ]
+CreateImage mkimg [X] [X]
+CreateInstanceExportTask - [ ] [ ]
+CreateInternetGateway - [ ] [ ]
+CreateKeyPair - [ ] [ ]
+CreateNetworkAcl - [ ] [ ]
+CreateNetworkAclEntry - [ ] [ ]
+CreateNetworkInterface - [ ] [ ]
+CreatePlacementGroup - [ ] [ ]
+CreateReservedInstancesListing - [ ] [ ]
+CreateRoute - [ ] [ ]
+CreateRouteTable - [ ] [ ]
+CreateSecurityGroup - [ ] [ ]
+CreateSnapshot mksnap [X] [X]
+CreateSpotDatafeedSubscription - [ ] [ ]
+CreateSubnet - [ ] [ ]
+CreateTags mktag [X] [X]
+CreateVolume mkvol [X] [X]
+CreateVpc - [ ] [ ]
+CreateVpnConnection - [ ] [ ]
+CreateVpnConnectionRoute - [ ] [ ]
+CreateVpnGateway - [ ] [ ]
+DeleteCustomerGateway - [ ] [ ]
+DeleteDhcpOptions - [ ] [ ]
+DeleteInternetGateway - [ ] [ ]
+DeleteKeyPair - [ ] [ ]
+DeleteNetworkAcl - [ ] [ ]
+DeleteNetworkAclEntry - [ ] [ ]
+DeleteNetworkInterface - [ ] [ ]
+DeletePlacementGroup - [ ] [ ]
+DeleteRoute - [ ] [ ]
+DeleteRouteTable - [ ] [ ]
+DeleteSecurityGroup - [ ] [ ]
+DeleteSnapshot rmsnap [X] [X]
+DeleteSpotDatafeedSubscription - [ ] [ ]
+DeleteSubnet - [ ] [ ]
+DeleteTags rmtag [X] [X]
+DeleteVolume rmvol [X] [X]
+DeleteVpc - [ ] [ ]
+DeleteVpnConnection - [ ] [ ]
+DeleteVpnConnectionRoute - [ ] [ ]
+DeleteVpnGateway - [ ] [ ]
+DeregisterImage deimg [X] [X]
+DescribeAddresses lsaddr [X] [X]
+DescribeAvailabilityZones lszon [X] [X]
+DescribeBundleTasks - [ ] [ ]
+DescribeConversionTasks - [ ] [ ]
+DescribeCustomerGateways - [ ] [ ]
+DescribeDhcpOptions - [ ] [ ]
+DescribeExportTasks - [ ] [ ]
+DescribeImageAttribute - [ ] [ ]
+DescribeImages lsimg [X] [X]
+DescribeInstanceAttribute lsiattr [X] [X]
+DescribeInstances lsinst [X] [X]
+DescribeInstanceStatus lsistat [X] [X]
+DescribeInternetGateways - [ ] [ ]
+DescribeKeyPairs - [ ] [ ]
+DescribeNetworkAcls - [ ] [ ]
+DescribeNetworkInterfaceAttribute - [ ] [ ]
+DescribeNetworkInterfaces - [ ] [ ]
+DescribePlacementGroups - [ ] [ ]
+DescribeRegions lsreg [X] [X]
+DescribeReservedInstances - [ ] [ ]
+DescribeReservedInstancesListings - [ ] [ ]
+DescribeReservedInstancesOfferings - [ ] [ ]
+DescribeRouteTables - [ ] [ ]
+DescribeSecurityGroups lssg [X] [X]
+DescribeSnapshotAttribute lssattr [X] [X]
+DescribeSnapshots lssnap [X] [X]
+DescribeSpotDatafeedSubscription - [ ] [ ]
+DescribeSpotInstanceRequests - [ ] [ ]
+DescribeSpotPriceHistory - [ ] [ ]
+DescribeSubnets - [ ] [ ]
+DescribeTags lstag [X] [X]
+DescribeVolumes lsvol [X] [X]
+DescribeVolumeAttribute - [ ] [ ]
+DescribeVolumeStatus - [ ] [ ]
+DescribeVpcs - [ ] [ ]
+DescribeVpnConnections - [ ] [ ]
+DescribeVpnGateways - [ ] [ ]
+DetachInternetGateway - [ ] [ ]
+DetachNetworkInterface - [ ] [ ]
+DetachVolume devol [X] [X]
+DetachVpnGateway - [ ] [ ]
+DisableVgwRoutePropagation - [ ] [ ]
+DisassociateAddress disasaddr [X] [X]
+DisassociateRouteTable - [ ] [ ]
+EnableVgwRoutePropagation - [ ] [ ]
+EnableVolumeIO - [ ] [ ]
+GetConsoleOutput conmesg [X] [X]
+GetPasswordData - [ ] [ ]
+ImportInstance - [ ] [ ]
+ImportKeyPair - [ ] [ ]
+ImportVolume - [ ] [ ]
+ModifyImageAttribute - [ ] [ ]
+ModifyInstanceAttribute setiattr [X] [X]
+ModifyNetworkInterfaceAttribute - [ ] [ ]
+ModifySnapshotAttribute setsattr [X] [ ]
+ModifyVolumeAttribute - [ ] [ ]
+MonitorInstances - [ ] [ ]
+PurchaseReservedInstancesOffering - [ ] [ ]
+RebootInstances reboot [X] [X]
+RegisterImage - [ ] [ ]
+ReleaseAddress freeaddr [X] [X]
+ReplaceNetworkAclAssociation - [ ] [ ]
+ReplaceNetworkAclEntry - [ ] [ ]
+ReplaceRoute - [ ] [ ]
+ReplaceRouteTableAssociation - [ ] [ ]
+ReportInstanceStatus - [ ] [ ]
+RequestSpotInstances - [ ] [ ]
+ResetImageAttribute - [ ] [ ]
+ResetInstanceAttribute - [ ] [ ]
+ResetNetworkInterfaceAttribute - [ ] [ ]
+ResetSnapshotAttribute clrsattr [X] [ ]
+RevokeSecurityGroupEgress - [ ] [ ]
+RevokeSecurityGroupIngress - [ ] [ ]
+RunInstances mkinst [X] [ ]
+StartInstances start [X] [X]
+StopInstances stop [X] [X]
+TerminateInstances killinst [ ] [ ]
+UnassignPrivateIpAddresses - [ ] [ ]
+UnmonitorInstances - [ ] [ ]
diff --git a/doc/eclat-allocaddr.1 b/doc/eclat-allocaddr.1
index 2c97280..8c183b1 100644
--- a/doc/eclat-allocaddr.1
+++ b/doc/eclat-allocaddr.1
@@ -13,9 +13,9 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH ALLOCADDR 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH ALLOCADDR 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat allocaddr \- allocate an Elastic IP address
+eclat allocaddr or allocate\-address \- allocate an Elastic IP address
.SH SYNOPSIS
\fBeclat allocaddr\fR [\fB\-v\fR] [\f\--vpc\fR]
diff --git a/doc/eclat-assocaddr.1 b/doc/eclat-assocaddr.1
index 5c84232..342d83b 100644
--- a/doc/eclat-assocaddr.1
+++ b/doc/eclat-assocaddr.1
@@ -13,9 +13,9 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH ASSOCADDR 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH ASSOCADDR 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat assocaddr \- associate an IP address with an instance
+eclat assocaddr, associate\-address \- associate an IP address with an instance
.SH SYNOPSIS
\fBeclat assocaddr\fR [\fIOPTIONS\fR] \fIINSTANCE\fR \fIIP\fR
diff --git a/doc/eclat-atvol.1 b/doc/eclat-atvol.1
index 87c85bf..5d060c4 100644
--- a/doc/eclat-atvol.1
+++ b/doc/eclat-atvol.1
@@ -13,29 +13,29 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH ECLAT\-ATVOL 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH ECLAT\-ATVOL 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat atvol \- attach a volume to an instance
+eclat atvol, attach\-volume \- attach a volume to an instance
.SH SYNOPSIS
-\fBeclat atvol\fR \fBVOL\-ID\fR \fBINST\-ID\fR \fBDEV\-NAME\fR
+\fBeclat atvol\fR \fIVOL\-ID\fR \fIINST\-ID\fR \fIDEV\-NAME\fR
\fBeclat atvol\fR \fB\-\-help\fR
.SH DESCRIPTION
The \fBatvol\fR command attaches an existing volume to an EC2
instance. The
-.B VOL\-ID
+.I VOL\-ID
argument specifies the identifier of the volume to attach. If ID
mapping is enabled (see the section \fBMAPS\fR
in
.BR eclat (1)),
-\fBVOL\-ID\fR is treated as a volume name and is translated
+\fIVOL\-ID\fR is treated as a volume name and is translated
it to the AWS ID using the \fBVolumeId\fR map. The
-.B INST\-ID
+.I INST\-ID
argument specifies the ID of the instance to attach the volume to. If
ID mapping is enabled, this argument is translated using the
.B InstanceId
map. Finally, the
-.B DEV\-NAME
+.I DEV\-NAME
argument specifies the name of the device to use for this volume.
.SH EXAMPLE
.nf
diff --git a/doc/eclat-conmesg.1 b/doc/eclat-conmesg.1
index 60c2011..8f04c0b 100644
--- a/doc/eclat-conmesg.1
+++ b/doc/eclat-conmesg.1
@@ -13,9 +13,9 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH MESG 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH MESG 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat conmesg \- get console output from the instance
+eclat conmesg, get\-console\-output \- get console output from the instance
.SH SYNOPSIS
\fBeclat conmesg\fR \fIINSTANCE\-ID\fR
diff --git a/doc/eclat-deimg.1 b/doc/eclat-deimg.1
index 8da014c..40eda63 100644
--- a/doc/eclat-deimg.1
+++ b/doc/eclat-deimg.1
@@ -13,21 +13,21 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH DEIMG 1 "April 11, 2013" "ECLAT" "Eclat User Reference"
+.TH DEIMG 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat deimg \- deregister an EC2 image
+eclat deimg, deregister\-image \- deregister an EC2 image
.SH SYNOPSIS
-\fBeclat deimg\fR \fBID\fR
+\fBeclat deimg\fR \fIID\fR
\fBeclat deimg\fR \fB\-\-help\fR
.SH DESCRIPTION
This command deregisters an existing Amazon image (AMI) identified by
-\fBID\fR.
+\fIID\fR.
.PP
-If ID mapping is in use (see the section \fBMAPS\fR
+If \fIID\fR mapping is in use (see the section \fBMAPS\fR
in
.BR eclat (1)),
-the command treat the ID as a symbolic name and uses the \fBImageId\fR
+the command treat the \fIID\fR as a symbolic name and uses the \fBImageId\fR
map to translate it.
.PP
Note that this command does not destroy other resources associated with the
diff --git a/doc/eclat-devol.1 b/doc/eclat-devol.1
index a06417c..e5356e6 100644
--- a/doc/eclat-devol.1
+++ b/doc/eclat-devol.1
@@ -13,30 +13,30 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH ECLAT\-DEVOL 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH ECLAT\-DEVOL 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat devol \- detach a volume from an instance
+eclat devol, detach\-volume \- detach a volume from an instance
.SH SYNOPSIS
-\fBeclat devol\fR [\fB\-f\fR] [\fB\-\-force\fR] \fBVOL\-ID\fR\
- [\fBINST\-ID\fR [\fBDEV\-NAME\fR]]
+\fBeclat devol\fR [\fB\-f\fR] [\fB\-\-force\fR] \fIVOL\-ID\fR\
+ [\fIINST\-ID\fR [\fIDEV\-NAME\fR]]
\fBeclat devol\fR \fB\-\-help\fR
.SH DESCRIPTION
The \fBdevol\fR command detaches a volume from an EC2
instance. The volume is identified by the
-.B VOL\-ID
+.I VOL\-ID
argument, which specifies its identifier or symbolic name (if
ID
mapping is enabled). In the latter case, the name is translated to ID
using the \fBVolumeId\fR map.
.PP
The optional argument
-.B INST\-ID
+.I INST\-ID
specifies the ID of the instance to attach the volume to. If
ID mapping is enabled, it is translated using the
.B InstanceId
map. Finally, the optional argument
-.B DEV\-NAME
+.I DEV\-NAME
specifies the name of the device that refers to this volume.
.SH EXAMPLE
.nf
diff --git a/doc/eclat-disasaddr.1 b/doc/eclat-disasaddr.1
index a76659b..8b465ee 100644
--- a/doc/eclat-disasaddr.1
+++ b/doc/eclat-disasaddr.1
@@ -13,13 +13,13 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH DISASSOCADDR 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH DISASSOCADDR 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat disassaddr \- disassociate IP address from EC2 instance.
+eclat disasaddr, disassociate\-address \- disassociate IP address from EC2 instance.
.SH SYNOPSIS
-\fBeclat disassaddr\fR [\fB\-\-vpc\fR] [\fB\-v\fR] IP
+\fBeclat disasaddr\fR [\fB\-\-vpc\fR] [\fB\-v\fR] \fIIP\fR
-\fBeclat disassaddr\fR \fB\-\-help\fR
+\fBeclat disasaddr\fR \fB\-\-help\fR
.SH DESCRIPTION
This command disassociates IP address from the EC2 instance.
.SH OPTIONS
@@ -41,13 +41,13 @@ is unable to recognize the response.
Disassociate the Elastic IP:
.P
.nf
-.B eclat disassaddr 192.0.2.1
+.B eclat disasaddr 192.0.2.1
.fi
.SS 2.
Disassociate the VPC Elastic IP:
.P
.nf
-.B eclat disassaddr \-\-vpc eipalloc\-5723d13e
+.B eclat disasaddr \-\-vpc eipalloc\-5723d13e
.fi
.SH "SEE ALSO"
.BR eclat (1),
diff --git a/doc/eclat-freeaddr.1 b/doc/eclat-freeaddr.1
index 847e7d5..4701ccd 100644
--- a/doc/eclat-freeaddr.1
+++ b/doc/eclat-freeaddr.1
@@ -13,9 +13,9 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH DISASSOCADDR 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH DISASSOCADDR 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat freeaddr \- release Elastic IP address.
+eclat freeaddr, release\-address \- release Elastic IP address.
.SH SYNOPSIS
\fBeclat freeaddr\fR [\fB\-\-vpc\fR] [\fB\-v\fR] \fIIP\-OR\-ALLOCID\fR
diff --git a/doc/eclat-lsaddr.1 b/doc/eclat-lsaddr.1
index 8ae1565..ebaf41d 100644
--- a/doc/eclat-lsaddr.1
+++ b/doc/eclat-lsaddr.1
@@ -13,12 +13,12 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH LSADDR 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH LSADDR 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat lsaddr \- return information about IP addresses in
+eclat lsaddr, describe\-addresses \- return information about IP addresses in
your account
.SH SYNOPSIS
-\fBeclat lsaddr\fR [\fB\-v\fR] [\fB\-\-vpc\fR] [\fBFILTER\fR...]
+\fBeclat lsaddr\fR [\fB\-v\fR] [\fB\-\-vpc\fR] [\fIFILTER\fR...]
\fBeclat lsaddr\fR \fB\-\-help\fR
.SH DESCRIPTION
diff --git a/doc/eclat-lsiattr.1 b/doc/eclat-lsiattr.1
index 403c156..a998d50 100644
--- a/doc/eclat-lsiattr.1
+++ b/doc/eclat-lsiattr.1
@@ -13,9 +13,9 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH LSIATTR 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH LSIATTR 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat lsiattr \- describes attribute of an instance
+eclat lsiattr, describe\-instance\-attribute \- describes attribute of an instance
.SH SYNOPSIS
\fBeclat lsiattr\fR \fIINSTANCE-ID\fR \fIATTR\fR
diff --git a/doc/eclat-lsimg.1 b/doc/eclat-lsimg.1
index da945bb..d4774a3 100644
--- a/doc/eclat-lsimg.1
+++ b/doc/eclat-lsimg.1
@@ -13,14 +13,14 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH LSIMG 1 "April 18, 2013" "ECLAT" "Eclat User Reference"
+.TH LSIMG 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat lsimg \- describe available Amazon images
+eclat lsimg, describe\-images \- describe available Amazon images
.SH SYNOPSIS
-\fBeclat lsimg\fB\
+\fBeclat lsimg\fR\
[\fB\-a\fR] [\fB\-u\fR \fIID\fR]\
[\fB\-x\fR \fIID\fR] [\fB\-\-owner\fR=\fIID\fR]
- [\fB\-\-executable\-by\fR=\fIID\fR]\
+ [\fB\-\-executable\-by\fR=\fIID\fR]\
[\fIFILTER\fR...] [\fIAMI\fR...]
\fBeclat lsimg\fB \fB\-\-help\fR
diff --git a/doc/eclat-lsinst.1 b/doc/eclat-lsinst.1
index e2d21a0..8367c83 100644
--- a/doc/eclat-lsinst.1
+++ b/doc/eclat-lsinst.1
@@ -13,9 +13,9 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH LSINST 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH LSINST 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat lsinst \- describe available EC2 instances
+eclat lsinst, describe\-instances \- describe available EC2 instances
.SH SYNOPSIS
\fBeclat lsinst\fR [\fIFILTER\fR...]
diff --git a/doc/eclat-lsistat.1 b/doc/eclat-lsistat.1
index 6e9b9d7..07ee9cb 100644
--- a/doc/eclat-lsistat.1
+++ b/doc/eclat-lsistat.1
@@ -13,11 +13,11 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH LSISTAT 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH LSISTAT 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat lsistat \- describe status of EC2 instances
+eclat lsistat, describe\-instance\-status \- describe status of EC2 instances
.SH SYNOPSIS
-\fBeclat lsistat\fR [\fB\-a\fR] [\fB\-\-all\fR] [\fBFILTER\fR...]
+\fBeclat lsistat\fR [\fB\-a\fR] [\fB\-\-all\fR] [\fIFILTER\fR...]
\fBeclat lsistat\fR \fB\-\-help\fR
.SH DESCRIPTION
diff --git a/doc/eclat-lsreg.1 b/doc/eclat-lsreg.1
index 4ee550c..d532031 100644
--- a/doc/eclat-lsreg.1
+++ b/doc/eclat-lsreg.1
@@ -13,11 +13,11 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH ECLAT\-LSREG 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH ECLAT\-LSREG 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat lsreg \- describe EC2 regions
+eclat lsreg, describe\-regions \- describe EC2 regions
.SH SYNOPSIS
-\fBeclat lsreg\fR [\fBFILTER\fR...] [\fBREGION\fR...]
+\fBeclat lsreg\fR [\fIFILTER\fR...] [\fIREGION\fR...]
\fBeclat lsreg\fR \fB\-\-help\fR
.SH DESCRIPTION
diff --git a/doc/eclat-lssattr.1 b/doc/eclat-lssattr.1
index 161a388..9366cdd 100644
--- a/doc/eclat-lssattr.1
+++ b/doc/eclat-lssattr.1
@@ -13,16 +13,16 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH LSSATTR 1 "April 18, 2013" "ECLAT" "Eclat User Reference"
+.TH LSSATTR 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat lssattr \- lists the attribute of a EBS snapshot
+eclat lssattr, describe\-snapshot\-attribute \- lists the attribute of a EBS snapshot
.SH SYNOPSIS
-\fBeclat lssattr\fB \fBSNAP\-ID\fR [\fBATTR\fR]
+\fBeclat lssattr\fB \fISNAP\-ID\fR [\fIATTR\fR]
\fBeclat lssattr\fB \fB\-\-help\fR
.SH DESCRIPTION
-Thic command outputs the value of the attribute \fBATTR\fR of the EBS
-snapshot \fBSNAP\-ID\fR. The latter is either the snapshot
+Thic command outputs the value of the attribute \fIATTR\fR of the EBS
+snapshot \fISNAP\-ID\fR. The latter is either the snapshot
identifier, or, if ID mapping is enabled (see the section \fBMAPS\fR
in
.BR eclat (1)),
diff --git a/doc/eclat-lssg.1 b/doc/eclat-lssg.1
index 86ab244..92f6f53 100644
--- a/doc/eclat-lssg.1
+++ b/doc/eclat-lssg.1
@@ -13,12 +13,12 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH LSSEC 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH LSSEC 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat lssg \- return information about security groups
+eclat lssg, describe\-security\-groups \- return information about security groups
.SH SYNOPSIS
\fBeclat lssg\fR [\fB\-n\fR] [\fB\-\-name\fR]\
- [\fBFILTER\fR...] [\fBID\fR]
+ [\fIFILTER\fR...] [\fIID\fR]
\fBeclat lssg\fR \fB\-\-help\fR
.SH DESCRIPTION
@@ -31,7 +31,7 @@ line. The set of groups can further be abridged by using filters.
If ID mapping is enabled (see the section \fBMAPS\fR
in
.BR eclat (1)),
-this command translates \fBID\fR supplied in the command line
+this command translates \fIID\fR supplied in the command line
using the \fBGroupId\fR map or \fBGroupName\fR map, if the \fB\-n\fR
(\fB\-\-name\fR) option is used.
.SH OPTIONS
diff --git a/doc/eclat-lssnap.1 b/doc/eclat-lssnap.1
index cecb7af..59acbf4 100644
--- a/doc/eclat-lssnap.1
+++ b/doc/eclat-lssnap.1
@@ -13,14 +13,14 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH LSSNAP 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH LSSNAP 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat lssnap \- describes available Amazon EBS snapshots
+eclat lssnap, describe\-snapshots \- describes available Amazon EBS snapshots
.SH SYNOPSIS
\fBeclat lssnap\fR [\fB\-r\fR \fIID\fR] [\fB\-u \fIID\fR]\
[\fI\-\-restorable\-by \fIID\fR]
- [\fB\-\-owner \fINAME\fR]\
- [\fISNAPSHOT\-ID\fR...] [\fBFILTER\fI...]
+ [\fB\-\-owner \fINAME\fR]\
+ [\fISNAPSHOT\-ID\fR...] [\fIFILTER\fR...]
\fBeclat lssnap\fR \fB\-\-help\fR
.SH DESCRIPTION
diff --git a/doc/eclat-lstag.1 b/doc/eclat-lstag.1
index af48c2a..8a6667c 100644
--- a/doc/eclat-lstag.1
+++ b/doc/eclat-lstag.1
@@ -13,16 +13,16 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH LSTAG 1 "February 9, 2013" "ECLAT" "Eclat User Reference"
+.TH LSTAG 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat lstag \- list the EC2 tags
+eclat lstag, describe\-tags \- list the EC2 tags
.SH SYNOPSIS
\fBeclat lstag\fR [\fB\-a\fR \fIID\fR] [\fB\-i\fR \fIID\fR]\
[\fB\-r\fR [\fIMAP\fR:]\fIID\fR] [\fB\-s \fIID\fR] [\fB\-v\fR \fIID\fR]
- [\fB\-T\fR \fIFILE\fR]
- [\fB\-\-ami\fR \fIID\fR] [\fB\-\-instance\fR \fIID\fR] [\fB\-\-resource\-id\fR [\fIMAP\fR:]\fIID\fR]
- [\fB\-\-volume\fR \fIID\fR] [\fB\-\-snapshot\fR \fIID\fR]
-[\fBFILTER\fR...]
+ [\fB\-T\fR \fIFILE\fR]
+ [\fB\-\-ami\fR \fIID\fR] [\fB\-\-instance\fR \fIID\fR] [\fB\-\-resource\-id\fR [\fIMAP\fR:]\fIID\fR]
+ [\fB\-\-volume\fR \fIID\fR] [\fB\-\-snapshot\fR \fIID\fR]
+[\fIFILTER\fR...]
\fBeclat lstag\fR \fB\-\-help\fR
.SH DESCRIPTION
diff --git a/doc/eclat-lsvol.1 b/doc/eclat-lsvol.1
index 1d2731d..4f044da 100644
--- a/doc/eclat-lsvol.1
+++ b/doc/eclat-lsvol.1
@@ -13,11 +13,11 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH LSVOL 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH LSVOL 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat lsvol \- list EBS volumes
+eclat lsvol, describe\-volumes \- list EBS volumes
.SH SYNOPSIS
-\fBeclat lsvol\fR [\fBFILTER\fR...] [\fBID\fR...]
+\fBeclat lsvol\fR [\fIFILTER\fR...] [\fIID\fR...]
\fBeclat lsvol\fR \fB\-\-help\fR
.SH DESCRIPTION
diff --git a/doc/eclat-lszon.1 b/doc/eclat-lszon.1
index 90626bc..b7e7141 100644
--- a/doc/eclat-lszon.1
+++ b/doc/eclat-lszon.1
@@ -13,13 +13,13 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH DESCRIBE\-AVAILABILITY\-ZONES 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH LSZON 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat describe\-availability\-zones \- describe availability zones
+eclat lszon, describe\-availability\-zones \- describe availability zones
.SH SYNOPSIS
-\fBeclat describe\-availability\-zones\fR [\fBFILTER\fR...] [\fBZONE\fR...]
+\fBeclat lszon\fR [\fIFILTER\fR...] [\fIZONE\fR...]
-\fBeclat describe\-availability\-zones\fR \fB\-\-help\fR
+\fBeclat lszon\fR \fB\-\-help\fR
.SH DESCRIPTION
This command lists availability zones accessible to your account. The
results include zones only for the region you're currently using, as
@@ -60,14 +60,14 @@ in subsequent lines. Each message is indented one tab stop.
.SH EXAMPLE
.nf
.sp 2
-$ \fBeclat describe\-availability\-zones\fR
+$ \fBeclat lszon\fR
eu-west-1a available
eu-west-1b available
eu-west-1c available
.fi
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-describe\-regions (1).
+.BR eclat\-lsreg (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-mkimg.1 b/doc/eclat-mkimg.1
index ac6e7d5..2c80d95 100644
--- a/doc/eclat-mkimg.1
+++ b/doc/eclat-mkimg.1
@@ -13,28 +13,28 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH MKIMG 1 "April 11, 2013" "ECLAT" "Eclat User Reference"
+.TH MKIMG 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat mkimg \- create an AMI image
+eclat mkimg, create\-image \- create an AMI image
.SH SYNOPSIS
\fBeclat mkimg\fR\
[\fB\-N\fR]\
[\fB\-d\fR \fIDESCR\fR]\
[\fB\-m\fR \fIDEV\fR=\fISPEC\fR]\
[\fB\-\-noreboot\fR]
- [\fB\-\-no\-reboot\fR]\
+ [\fB\-\-no\-reboot\fR]\
[\fB\-\-description\fR=\fISTRING\fR]
- [\fB\-\-devmap\fR=\fIDEV\fR=\fISPEC\fR]
- [\fB\-\-block\-device\-mapping\fR=\fIDEV\fR=\fISPEC\fR]
- \fBNAME\fR \fBINSTANCE\-ID\fR
+ [\fB\-\-devmap\fR=\fIDEV\fR=\fISPEC\fR]
+ [\fB\-\-block\-device\-mapping\fR=\fIDEV\fR=\fISPEC\fR]
+ \fINAME\fR \fIINSTANCE\-ID\fR
\fBeclat mkimg\fR \fB\-\-help\fR
.SH DESCRIPTION
This command creates an Amazon EBS-backed AMI from an existing
-instance \fBINSTANCE\-ID\fR. If the instance is running it will be
+instance \fIINSTANCE\-ID\fR. If the instance is running it will be
rebooted, unless the \fB\-N\fR (\fB\-\-noreboot\fR) option is used.
.PP
-The \fBNAME\fR argument sets the name of the new AMI.
+The \fINAME\fR argument sets the name of the new AMI.
.PP
Upon successful completion the ID of the newly created AMI is printed
on the stdandard output.
diff --git a/doc/eclat-mksnap.1 b/doc/eclat-mksnap.1
index efb3db2..cffa398 100644
--- a/doc/eclat-mksnap.1
+++ b/doc/eclat-mksnap.1
@@ -13,9 +13,9 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH MKSNAP 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH MKSNAP 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat mksnap \- creates a snapshot of an Amazon EBS volume
+eclat mksnap, create\-snapshot \- creates a snapshot of an Amazon EBS volume
.SH SYNOPSIS
\fBeclat mksnap\fR \fIVOLUME\-ID\fR [\fIDESCR\fR]
diff --git a/doc/eclat-mktag.1 b/doc/eclat-mktag.1
index 06811a4..919fa79 100644
--- a/doc/eclat-mktag.1
+++ b/doc/eclat-mktag.1
@@ -13,16 +13,16 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH MKTAG 1 "January 22, 2013" "ECLAT" "Eclat User Reference"
+.TH MKTAG 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat mktag \- create or replace tags for a resource
+eclat mktag, create\-tags \- create or replace tags for a resource
.SH SYNOPSIS
\fBeclat mktag\fR [\fB\-a\fR \fIID\fR] [\fB\-i\fR \fIID\fR]\
[\fB\-r\fR [\fIMAP\fR:]\fIID\fR] [\fB\-s \fIID\fR] [\fB\-v\fR \fIID\fR]
- [\fB\-T\fR \fIFILE\fR]
- [\fB\-\-ami\fR \fIID\fR] [\fB\-\-instance\fR \fIID\fR] [\fB\-\-resource\-id\fR [\fIMAP\fR:]\fIID\fR]
- [\fB\-\-volume\fR \fIID\fR] [\fB\-\-snapshot\fR \fIID\fR]
- [\fB\-\-from\-file\fR \fIFILE\fR] \fITAG\fR[=\fIVAL\fR]...
+ [\fB\-T\fR \fIFILE\fR]
+ [\fB\-\-ami\fR \fIID\fR] [\fB\-\-instance\fR \fIID\fR] [\fB\-\-resource\-id\fR [\fIMAP\fR:]\fIID\fR]
+ [\fB\-\-volume\fR \fIID\fR] [\fB\-\-snapshot\fR \fIID\fR]
+ [\fB\-\-from\-file\fR \fIFILE\fR] \fITAG\fR[=\fIVAL\fR]...
\fBeclat mktag\fR \fB\-\-help\fR
.SH DESCRIPTION
diff --git a/doc/eclat-mkvol.1 b/doc/eclat-mkvol.1
index b25630e..6bb91b6 100644
--- a/doc/eclat-mkvol.1
+++ b/doc/eclat-mkvol.1
@@ -13,17 +13,17 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH ECLAT\-MKVOL 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH ECLAT\-MKVOL 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat mkvol \- create an Amazon EBS volume
+eclat mkvol, create\-volume \- create an Amazon EBS volume
.SH SYNOPSIS
\fBeclat mkvol\fR [\fB\-i\fR \fIN\fR] [\fB\-s\fR]\
- [\fB\-\-iops\fR=\fIN\fR] [\fB\-\-snapshot\fR=\fIID\fR] \fBSIZE\fR \fBZONE\fR
+ [\fB\-\-iops\fR=\fIN\fR] [\fB\-\-snapshot\fR=\fIID\fR] \fISIZE\fR \fIZONE\fR
\fBeclat mkvol\fR \fB\-\-help\fR
.SH DESCRIPTION
-This command creates a new Amazon EBS volume of size \fBSIZE\fR in the
-availability zone \fBZONE\fR. The created volume can then be attached
+This command creates a new Amazon EBS volume of size \fISIZE\fR in the
+availability zone \fIZONE\fR. The created volume can then be attached
to any EC2 instance in the same Availability Zone.
.SH OPTIONS
.TP
diff --git a/doc/eclat-reboot.1 b/doc/eclat-reboot.1
index 3130393..4ba5548 100644
--- a/doc/eclat-reboot.1
+++ b/doc/eclat-reboot.1
@@ -13,9 +13,9 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH REBOOT 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH REBOOT 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat reboot \- reboot EC2 instances
+eclat reboot, reboot\-instances \- reboot EC2 instances
.SH SYNOPSIS
\fBeclat reboot\fR \fIID\fR [\fIID\fR...]
diff --git a/doc/eclat-rmsnap.1 b/doc/eclat-rmsnap.1
index 4887239..c5415c7 100644
--- a/doc/eclat-rmsnap.1
+++ b/doc/eclat-rmsnap.1
@@ -13,9 +13,9 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH RMSNAP 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH RMSNAP 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat rmsnap \- delete a snapshot of an Amazon EBS volume
+eclat rmsnap, delete\-snapshot \- delete a snapshot of an Amazon EBS volume
.SH SYNOPSIS
\fBeclat rmsnap\fR \fISNAPSHOT\-ID\fR
diff --git a/doc/eclat-rmtag.1 b/doc/eclat-rmtag.1
index 8e205c2..94ffd11 100644
--- a/doc/eclat-rmtag.1
+++ b/doc/eclat-rmtag.1
@@ -13,16 +13,16 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH RMTAG 1 "January 24, 2013" "ECLAT" "Eclat User Reference"
+.TH RMTAG 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat rmtag \- delete or replace tags for a resource
+eclat rmtag, delete\-tags \- delete or replace tags for a resource
.SH SYNOPSIS
\fBeclat rmtag\fR [\fB\-a\fR \fIID\fR] [\fB\-i\fR \fIID\fR]\
[\fB\-r\fR [\fIMAP\fR:]\fIID\fR] [\fB\-s \fIID\fR] [\fB\-v\fR \fIID\fR]
- [\fB\-T\fR \fIFILE\fR]
- [\fB\-\-ami\fR \fIID\fR] [\fB\-\-instance\fR \fIID\fR] [\fB\-\-resource\-id\fR [\fIMAP\fR:]\fIID\fR]
- [\fB\-\-volume\fR \fIID\fR] [\fB\-\-snapshot\fR \fIID\fR]
- [\fB\-\-from\-file\fR \fIFILE\fR] [\fITAG\fR[=\fIVAL\fR]...]
+ [\fB\-T\fR \fIFILE\fR]
+ [\fB\-\-ami\fR \fIID\fR] [\fB\-\-instance\fR \fIID\fR] [\fB\-\-resource\-id\fR [\fIMAP\fR:]\fIID\fR]
+ [\fB\-\-volume\fR \fIID\fR] [\fB\-\-snapshot\fR \fIID\fR]
+ [\fB\-\-from\-file\fR \fIFILE\fR] [\fITAG\fR[=\fIVAL\fR]...]
\fBeclat rmtag\fR \fB\-\-help\fR
.SH DESCRIPTION
diff --git a/doc/eclat-rmvol.1 b/doc/eclat-rmvol.1
index 0648aa4..4458234 100644
--- a/doc/eclat-rmvol.1
+++ b/doc/eclat-rmvol.1
@@ -13,11 +13,11 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH ECLAT\-RMVOL 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH ECLAT\-RMVOL 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat rmvol \- delete an EC2 volume
+eclat rmvol, delete\-volume \- delete an EC2 volume
.SH SYNOPSIS
-\fBeclat rmvol\fR \fBVOL\-ID\fR
+\fBeclat rmvol\fR \fIVOL\-ID\fR
\fBeclat rmvol\fR \fB\-\-help\fR
.SH DESCRIPTION
@@ -27,7 +27,7 @@ available state, i.e. it must not be attached to an instance.
If ID mapping is enabled (see the section \fBMAPS\fR
in
.BR eclat (1)),
-this command treats the \fBVOL\-ID\fR as volume names and translates
+this command treats the \fIVOL\-ID\fR as volume names and translates
it to the AWS IDs using the \fBVolumeId\fR map.
.SH "SEE ALSO"
.BR eclat (1),
diff --git a/doc/eclat-setiattr.1 b/doc/eclat-setiattr.1
index 5b2ad40..a1b78ac 100644
--- a/doc/eclat-setiattr.1
+++ b/doc/eclat-setiattr.1
@@ -13,9 +13,9 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH SETIATTR 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH SETIATTR 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat setiattr \- modifies attribute of an instance
+eclat setiattr, modify\-instance\-attribute \- modifies attribute of an instance
.SH SYNOPSIS
\fBeclat setiattr\fR \fIINSTANCE-ID\fR \fIATTR\fR\
\fIVALUE\fR [\fIVALUE\fR...]
diff --git a/doc/eclat-start.1 b/doc/eclat-start.1
index 1fdd9e0..e43ac83 100644
--- a/doc/eclat-start.1
+++ b/doc/eclat-start.1
@@ -13,9 +13,9 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH START 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH START 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat start \- start EC2 instances
+eclat start, start\-instances \- start EC2 instances
.SH SYNOPSIS
\fBeclat start\fR \fIID\fR [\fIID\fR...]
diff --git a/doc/eclat-stop.1 b/doc/eclat-stop.1
index d1c1767..2833849 100644
--- a/doc/eclat-stop.1
+++ b/doc/eclat-stop.1
@@ -13,9 +13,9 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH STOP 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH STOP 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat stop \- stop EC2 instances
+eclat stop, stop\-instances \- stop EC2 instances
.SH SYNOPSIS
\fBeclat stop\fR \fIID\fR [\fIID\fR...]
diff --git a/doc/eclat.1 b/doc/eclat.1
index aaf6102..28342f9 100644
--- a/doc/eclat.1
+++ b/doc/eclat.1
@@ -44,7 +44,7 @@ reads its configuration file
.BR eclat.conf .
The default location of this file is determined when compiling the
package. Normally it is
-.BR /etc or /usr/local/etc .
+.BR /etc " or " /usr/local/etc .
This file provides the default configuration settings for the program,
such as the location of Amazon endpoints, default availability region,
etc. See
@@ -253,6 +253,7 @@ place of the partial name.
To get a help on a particular command, refer to \fBeclat\-\fIcommand\fR
(1), where \fIcommand\fR is the command name. Currently the following
commands are implemented:
+.sp
.nf
.ta 8n 20n
.ul
@@ -304,6 +305,62 @@ Preprocess configuration and exit.
\fB\-c\fR, \fB\-\-config\-file\fR=\fIFILE\fR
Use \fIFILE\fR instead of the default configuration.
.TP
+\fB\-l\fR, \fB\-\-list\-commands\fR=\fIFORMAT\fR
+List all available commands using the supplied \fIFORMAT\fR. The
+format specification consists of \fIconversion specifiers\fR,
+\fIescape sequences\fR and \fIordinary character sequences\fR.
+
+A \fIconversion specifier\fR is introduced by the \fB%\fR character and
+and terminated by a \fIconversion specifier character\fR. Depending
+on that character, conversion specifiers are replaced in the output with:
+.sp
+.nf
+.ta 8n 20n
+.ul
+ Specifier Expansion
+ \fBn\fR Eclat command name
+ \fBi\fR EC2 command name
+.fi
+.sp
+Up to two additional character sequences delimited with a semicolon may
+appear between the \fB%\fR and the conversion specifier character.
+A sequence before the semicolon supplies the prefix string to be printed
+before the expansion. A sequence after the semicolon supplies the suffix
+string, which is printed after the expansion. If the expansion is
+empty, neither prefix nor suffix appear in the output.
+.sp
+\fIEscape sequences\fR are two-character sequences beginning with a
+backslash. They are replaced in the output according to the table
+below:
+.sp
+.nf
+.ta 8n 18n 42n
+.ul
+ Sequence Expansion ASCII
+ \fB\\\\\fR \fB\\\fR 134
+ \fB\\"\fR \fB"\fR 042
+ \fB\\a\fR audible bell 007
+ \fB\\b\fR backspace 010
+ \fB\\f\fR form-feed 014
+ \fB\\n\fR new line 012
+ \fB\\r\fR charriage return 015
+ \fB\\t\fR horizontal tabulation 011
+ \fB\\v\fR vertical tabulation 013
+.fi
+.sp
+Any other character following a backslash is output verbatim.
+.sp
+Finally, ordinary characters are reproduced on the output as is.
+.sp
+This option is intended to help in generating documentation listings.
+For example, the command listing above was produced using the
+following command:
+.sp
+.nf
+.in +4
+.B eclat -l '\\\\t\\\\\\\\fB%n\\\\\\\\fR\\\\t\\\\\\\\fB%i\\\\\\\\fR\\\\n'
+.fi
+.TP
\fB\-\-match\-commands\fR, \fB\-m\fR
Print matching command names and exit. This option is intended for
use in completion facilities, such as Programmable Completion Builtins
diff --git a/etc/Makefile.am b/etc/Makefile.am
index a8a903b..00c34a1 100644
--- a/etc/Makefile.am
+++ b/etc/Makefile.am
@@ -60,8 +60,10 @@ if SPLIT_FORMATS
SUFFIXES += .forlan .fln
.fln.forlan:
$(AM_V_GEN)$(abs_builddir)/flncat $< default.fln > $@
-FORMATFILES = $(FLNFILES:.fln=.forlan)
+FORMATFILES = $(FLNFILES:.fln=.forlan) lsattr.forlan
FORMATNAME = $${command}
+lsattr.forlan: describe-instance-attribute.fln describe-snapshot-attribute.fln default.fln
+ $(AM_V_GEN)(cd $(srcdir); $(abs_builddir)/flncat describe-instance-attribute.fln describe-snapshot-attribute.fln default.fln) > lsattr.forlan
else
FORMATFILES = eclat.forlan
eclat.forlan: $(FLNFILES) default.fln
diff --git a/grecs b/grecs
-Subproject 9cf45f0c658b583ee1ebdcb3d6345ad290993d6
+Subproject 5596f7cdcdc1983021185c5e0900d5fcba7f328
diff --git a/src/Makefile.am b/src/Makefile.am
index ff13ecf..ed0a5b9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -32,6 +32,7 @@ eclat_SOURCES=\
genericcl.c\
getconout.c\
lsaddr.c\
+ lsattr.c\
lsiattr.c\
lsimg.c\
lsinst.c\
@@ -70,6 +71,7 @@ OPTFILES=\
freeaddr-cl.opt\
generic-cl.opt\
lsaddr-cl.opt\
+ lsattr-cl.opt\
lsimg-cl.opt\
lsistat-cl.opt\
lssg-cl.opt\
diff --git a/src/cmdline.opt b/src/cmdline.opt
index 05e3e8a..cd8c280 100644
--- a/src/cmdline.opt
+++ b/src/cmdline.opt
@@ -81,6 +81,13 @@ BEGIN
match_command_mode = 1;
END
+OPTION(list-commands,l,FMT,
+ [<list commands using the supplied format>])
+BEGIN
+ listcmd(optarg);
+ exit(0);
+END
+
GROUP(Modifiers)
OPTION(config-file,c,FILE,
@@ -187,13 +194,6 @@ BEGIN
translate_option = 1;
END
-OPTION(list-commands,l,FMT,
- [<list commands using the supplied format>])
-BEGIN
- listcmd(optarg);
- exit(0);
-END
-
GROUP(Preprocessor control)
OPTION(include-directory,I,DIR,
diff --git a/src/eclat.c b/src/eclat.c
index 13b8e74..30f0b70 100644
--- a/src/eclat.c
+++ b/src/eclat.c
@@ -271,7 +271,9 @@ struct eclat_command cmdtab[] = {
{ "mkimg", "create-image", "CreateImage",
eclat_create_image, CMD_MOD },
{ "deimg", "deregister-image", "DeregisterImage",
- eclat_deregister_image, CMD_MOD|CMD_DESTR }
+ eclat_deregister_image, CMD_MOD|CMD_DESTR },
+ { "lsattr", NULL, NULL,
+ eclat_lsattr, CMD_NOQRY },
};
size_t cmdcnt = sizeof(cmdtab) / sizeof(cmdtab[0]);
@@ -280,7 +282,15 @@ cmdcmp(const void *a, const void *b)
{
struct eclat_command const *cmda = a;
struct eclat_command const *cmdb = b;
- return strcmp(cmda->ident, cmdb->ident);
+ if (cmda->name && cmdb->name)
+ return strcmp(cmda->name, cmdb->name);
+ else if (cmda->ident && cmdb->ident)
+ return strcmp(cmda->ident, cmdb->ident);
+ else if (cmda->ident || cmda->name)
+ return 127;
+ else if (cmdb->ident || cmdb->name)
+ return -127;
+ return 0;
}
static void
@@ -370,11 +380,13 @@ listcmd(char *fmt)
continue;
}
- if (p != start)
- fmtstr(start, p - start);
- fmtstr(s[0], l[0]);
- printf("%s", str);
- fmtstr(s[1], l[1]);
+ if (str) {
+ if (p != start)
+ fmtstr(start, p - start);
+ fmtstr(s[0], l[0]);
+ printf("%s", str);
+ fmtstr(s[1], l[1]);
+ }
start = p = end;
} else {
p++;
@@ -393,11 +405,12 @@ listcmdhook()
printf("Available commands\n");
printf("Eclat name EC2 Name\n");
printf("-----------+---------\n");
- for (cp = cmdtab; cp < cmdtab + cmdcnt; cp++)
- if (cp->name)
- printf(" %-10s %s\n", cp->name, cp->ident);
- else
- printf(" %10s %s\n", "", cp->ident);
+ for (cp = cmdtab; cp < cmdtab + cmdcnt; cp++) {
+ printf(" %-10s", cp->name ? cp->name : "");
+ if (cp->ident)
+ printf (" %s", cp->ident);
+ putchar ('\n');
+ }
printf("\nRun \"%s COMMAND --help\" to get help on a particular command.\n",
program_name);
@@ -439,8 +452,10 @@ find_command_name(const char *name)
struct eclat_command *cp, *match = NULL;
for (cp = cmdtab; cp < cmdtab + cmdcnt; cp++) {
- if (strcmp(cp->name, name) == 0)
+ if (cp->name && strcmp(cp->name, name) == 0)
return cp;
+ if (!cp->ident)
+ continue;
switch (ident_matches(cp->ident, name)) {
case NO_MATCH:
break;
@@ -472,7 +487,8 @@ print_matching_commands(const char *pat)
size_t patlen = strlen (pat);
for (cp = cmdtab; cp < cmdtab + cmdcnt; cp++) {
- if (cp->name && strlen (cp->name) >= patlen && memcmp (cp->name, pat, patlen) == 0)
+ if (cp->name && strlen (cp->name) >= patlen &&
+ memcmp (cp->name, pat, patlen) == 0)
printf("%s\n", cp->name);
if (ident_matches(cp->ident, pat) != NO_MATCH)
printf("%s\n", cp->ident);
@@ -701,7 +717,7 @@ read_format(struct eclat_command *cmd)
char *filename;
kwe[0] = "command";
- kwe[1] = cmd->ident;
+ kwe[1] = cmd->ident ? cmd->ident : cmd->name;
kwe[2] = "action";
kwe[3] = cmd->tag;
kwe[4] = NULL;
@@ -735,7 +751,29 @@ read_format(struct eclat_command *cmd)
exit(EX_UNAVAILABLE);
return env;
}
-
+
+int
+eclat_do_command(eclat_command_env_t *env, struct eclat_command *command,
+ int argc, char **argv)
+{
+ int rc;
+
+ if (!(command->flags & CMD_NOQRY)) {
+ env->query = eclat_query_create(use_ssl ? EC2_QF_HTTPS : 0,
+ endpoint, "/");
+ eclat_query_add_param(env->query, "Action", command->tag);
+ }
+
+ rc = command->handler(env, argc, argv);
+
+ if (rc == 0 && !(command->flags & CMD_NOQRY)) {
+ if (!eclat_confirm(confirm_mode,
+ "Proceed with %s", command->ident))
+ die(EX_CANCELLED, "command not confirmed");
+ rc = eclat_send_query(env->curl, env->query);
+ }
+ return rc;
+}
int
main(int argc, char **argv)
@@ -888,25 +926,10 @@ main(int argc, char **argv)
memset(&cmdenv, 0, sizeof(cmdenv));
cmdenv.cmd = command;
cmdenv.curl = curl;
-
- if (!(command->flags & CMD_NOQRY)) {
- cmdenv.query = eclat_query_create(use_ssl ? EC2_QF_HTTPS : 0,
- endpoint, "/");
- eclat_query_add_param(cmdenv.query, "Action", command->tag);
- }
-
- rc = command->handler(&cmdenv, argc, argv);
+
+ rc = eclat_do_command(&cmdenv, command, argc, argv);
if (rc)
exit(rc);
-
- if (!(command->flags & CMD_NOQRY)) {
- if (!eclat_confirm(confirm_mode,
- "Proceed with %s", command->ident))
- die(EX_CANCELLED, "command not confirmed");
- rc = eclat_send_query(cmdenv.curl, cmdenv.query);
- if (rc)
- exit(rc);
- }
curl_easy_cleanup(curl);
XML_Parse(parser, "", 0, 1);
diff --git a/src/eclat.h b/src/eclat.h
index 1848cd0..0ffd127 100644
--- a/src/eclat.h
+++ b/src/eclat.h
@@ -124,6 +124,8 @@ int eclat_describe_images(eclat_command_env_t *env, int argc, char **argv);
int eclat_create_image(eclat_command_env_t *env, int argc, char **argv);
int eclat_deregister_image(eclat_command_env_t *env, int argc, char **argv);
+int eclat_lsattr(eclat_command_env_t *env, int argc, char **argv);
+
char *region_to_endpoint(const char *region);
void define_format(const char *name, const char *format, grecs_locus_t *locus);
diff --git a/src/lsattr-cl.opt b/src/lsattr-cl.opt
new file mode 100644
index 0000000..3a51377
--- a/dev/null
+++ b/src/lsattr-cl.opt
@@ -0,0 +1,44 @@
+/* This file is part of Eclat.
+ Copyright (C) 2012, 2013 Sergey Poznyakoff.
+
+ Eclat 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, or (at your option)
+ any later version.
+
+ Eclat 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 Eclat. If not, see <http://www.gnu.org/licenses/>. */
+
+OPTIONS_BEGIN("eclat lsattr",
+ [<List EC2 resource attributes>],
+ [<ID [ATTR]>],
+ [<gnu>],
+ [<nousage>],
+ [<noversion>])
+
+OPTION(instance,i,,
+ [<instance ID>])
+BEGIN
+ cmdname = "lsiattr";
+ idname = "InstanceId";
+END
+
+OPTION(snapshot,s,,
+ [<snapshot ID>])
+BEGIN
+ cmdname = "lssattr";
+ idname = "SnapshotId";
+END
+
+OPTIONS_END
+
+static void
+parse_options(int argc, char *argv[], int *index)
+{
+ GETOPT(argc, argv, *index, exit(EX_USAGE))
+}
diff --git a/src/lsattr.c b/src/lsattr.c
new file mode 100644
index 0000000..706be6b
--- a/dev/null
+++ b/src/lsattr.c
@@ -0,0 +1,55 @@
+/* This file is part of Eclat.
+ Copyright (C) 2012, 2013 Sergey Poznyakoff.
+
+ Eclat 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, or (at your option)
+ any later version.
+
+ Eclat 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 Eclat. If not, see <http://www.gnu.org/licenses/>. */
+
+#include "eclat.h"
+char *idname;
+char *cmdname;
+#include "lsattr-cl.h"
+
+int
+eclat_lsattr(eclat_command_env_t *env, int argc, char **argv)
+{
+ int i;
+ struct eclat_command *command;
+
+ parse_options(argc, argv, &i);
+
+ argc -= i;
+ argv += i;
+
+ if (argc < 1)
+ die(EX_USAGE, "wrong number of arguments");
+
+ if (cmdname) {
+ translate_ids(1, argv, idname);
+ } else {
+ if (strncmp (argv[0], "i-", 2) == 0)
+ cmdname = "lsiattr";
+ else if (strncmp (argv[0], "snap-", 5) == 0)
+ cmdname = "lssattr";
+ else
+ die(EX_USAGE, "unrecognized resource type: %s", argv[0]);
+ }
+
+ command = find_command_name(cmdname);
+ if (!command)
+ abort();
+ translate_option = 0;
+ argv--;
+ argc++;
+ argv[0] = "lsattr";
+ return eclat_do_command(env, command, argc, argv);
+}

Return to:

Send suggestions and report system problems to the System administrator.