Permalink
Browse files

6578 - Rename /usr/sbin/mc to /usr/bin/mco

Rename, change rake tasks, RedHat spec, Debian files and docs
  • Loading branch information...
1 parent 209539f commit 7691358edd94a8334f00237bad7df29a9c56b792 @ripienaar ripienaar committed Mar 4, 2011
View
@@ -10,7 +10,7 @@ PROJ_VERSION = "1.1.2"
PROJ_RELEASE = "4"
PROJ_NAME = "mcollective"
PROJ_RPM_NAMES = [PROJ_NAME]
-PROJ_FILES = ["#{PROJ_NAME}.spec", "#{PROJ_NAME}.init", "#{PROJ_NAME}.init-rh", "mcollectived.rb", "COPYING", "doc", "etc", "lib", "plugins", "ext", "mc"]
+PROJ_FILES = ["#{PROJ_NAME}.spec", "#{PROJ_NAME}.init", "#{PROJ_NAME}.init-rh", "mcollectived.rb", "COPYING", "doc", "etc", "lib", "plugins", "ext", "mco"]
PROJ_FILES.concat(Dir.glob("mc-*"))
ENV["RPM_VERSION"] ? CURRENT_VERSION = ENV["RPM_VERSION"] : CURRENT_VERSION = PROJ_VERSION
View
@@ -10,8 +10,9 @@ install: install-bin install-lib install-conf install-plugins install-doc
install-bin:
install -d $(DESTDIR)/usr/sbin
+ install -d $(DESTDIR)/usr/bin
cp mc-* $(DESTDIR)/usr/sbin
- cp mc $(DESTDIR)/usr/sbin
+ cp mco $(DESTDIR)/usr/bin
cp mcollectived.rb $(DESTDIR)/usr/sbin/mcollectived
install-lib:
@@ -1,3 +1,3 @@
-usr/sbin/mc usr/sbin/
+usr/bin/mco usr/bin/
usr/sbin/mc-* usr/sbin/
etc/mcollective/client.cfg etc/mcollective
View
File renamed without changes.
View
@@ -55,6 +55,7 @@ Server for the mcollective Application Server
%install
rm -rf %{buildroot}
%{__install} -d -m0755 %{buildroot}/%{ruby_sitelib}/mcollective
+%{__install} -d -m0755 %{buildroot}/usr/bin
%{__install} -d -m0755 %{buildroot}/usr/sbin
%{__install} -d -m0755 %{buildroot}/etc/init.d
%{__install} -d -m0755 %{buildroot}/usr/libexec/mcollective/
@@ -76,7 +77,7 @@ rm -rf %{buildroot}
cp -R lib/* %{buildroot}/%{ruby_sitelib}/
cp -R plugins/* %{buildroot}/usr/libexec/mcollective/
cp mc-* %{buildroot}/usr/sbin/
-cp mc %{buildroot}/usr/sbin/
+cp mco %{buildroot}/usr/bin/
chmod 0755 %{buildroot}/usr/sbin/*
%clean
@@ -106,6 +107,7 @@ fi
%files client
%attr(0755, root, root)/usr/sbin/mc*
+%attr(0755, root, root)/usr/bin/mco
%doc COPYING
%config(noreplace)/etc/mcollective/client.cfg
%config/etc/mcollective/rpc-help.erb
View
@@ -11,6 +11,7 @@ title: Changelog
|Date|Description|Ticket|
|----|-----------|------|
+|2011/03/04|Rename /usr/sbin/mc to /usr/bin/mco|6578|
|2011/03/01|Wrap rpcclient in applications ensuring that options is always set|6308|
|2011/02/28|Make communicating with the middleware more robust by including send calls in timeouts|6505|
|2011/02/28|Create a wrapper to safely run shell commands avoiding zombies|6392|
@@ -12,7 +12,7 @@ disqus: true
## Overview
The Marionette Collective 1.1.1 and newer supports a single executable - called
-mc - and have a plugin type called application that lets you create
+mco - and have a plugin type called application that lets you create
applications for this single executable.
In the past we tended to write small standalone scripts to interact with
@@ -24,22 +24,22 @@ MCollective, this had a number of issues:
* Installation and packaging of plugins is complex
We've attempted to address these concerns by creating a single point of access
-for all applications - the _mc_ script - with unified help, error reporting and
+for all applications - the _mco_ script - with unified help, error reporting and
option parsing.
Below you can see the single executable system in use:
{% highlight console %}
-$ mc
+$ mco
The Marionette Collective version 1.1.1
-/usr/sbin/mc: command (options)
+/usr/bin/mco: command (options)
Known commands: rpc filemgr inventory facts ping find help
{% endhighlight %}
{% highlight console %}
-$ mc help
+$ mco help
The Marionette Collection version 1.1.1
facts Reports on usage for a specific fact
@@ -52,7 +52,7 @@ The Marionette Collection version 1.1.1
{% endhighlight %}
{% highlight console %}
-$ mc rpc package status package=zsh
+$ mco rpc package status package=zsh
Determining the amount of hosts matching filter for 2 seconds .... 51
* [ ============================================================> ] 51 / 51
@@ -99,14 +99,14 @@ end
Here's the application we wrote in action:
{% highlight console %}
-$ mc echo
+$ mco echo
The message option is mandatory
Please run with --help for detailed help
{% endhighlight %}
{% highlight console %}
-$ mc echo -m test
+$ mco echo -m test
* [ ============================================================> ] 1 / 1
@@ -131,7 +131,7 @@ To add custom usage messages to your application we can add lines like this:
class MCollective::Application::Echo<MCollective::Application
description "Reports on usage for a specific fact"
- usage "mc echo [options] --message message"
+ usage "mco echo [options] --message message"
end
{% endhighlight %}

0 comments on commit 7691358

Please sign in to comment.