Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We're quite fond of the style of the ebegin, eend, eerror, eindent etc commands used by Portage and other tools on Gentoo. The green-yellow-red bullets and standard layout make for very quick spotting of errors, on what would otherwise be very grey command line output.

source /etc/init.d/
ebegin "Copying data"
rsync ....
eend $?

Producing output similar to:

 * Copying data...                                                       [ OK ]

As a result we're using these commands in some of our common shell scripts, which is a problem for the people using Ubuntu and other linuxes. (linuces? linuxen? linucae? other distros)

On Gentoo these functions are provided by OpenRC, and imported with file (whose exact position seems to vary slightly). But is there a simple way of getting these commands on Ubuntu?

In theory we could replace them all with dull echos, but we'd rather not?

share|improve this question
I'd roll my own package with just and its dependencies, if any. – sendmoreinfo Feb 3 '12 at 15:35
From my poking around, the actual implementations of ebegin etc are all symlinked from /lib64/rc/bin/* into the /sbin/rc binary. The does nothing but add that folder of symlinks to the PATH. – Marcus Downing Feb 3 '12 at 16:14

With sysvinit jobs, you can probably just copy those functions from gentoo into a package which you install into your machines and then source in the same way. However, this won't solve the issue for upstart jobs.

There is a plymouth<->upstart bridge that uses dbus to show starting/started/stopped/etc. for upstart jobs in plymouth in a structured way (necessary for plymouth to do so since jobs start in parallel). To color code these would probably mean patching the plymouth details plugin with ncurses and using ncurses calls to change the color.

share|improve this answer

I ended up writing my own imitation of it:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.