Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

I want to automate the installation of etckeeper on OpenSuse 12.3.

My first issue is that etckeeper doesn't seem to be available in the standard OpenSuse repos.

zypper search etckeeper
Loading repository data...
Reading installed packages...
No packages found.

The second issue I anticipate is that when I use etckeeper manually I sometimes have to configure it (init) before it starts working. Here's the info about that from the readme:

The etckeeper init command initialises an /etc/.git/ repository. If you installed etckeeper from a package, this was probably automatically performed during the package installation. If not, your first step is to run it by hand:

etckeeper init

I would like a script that will install it and have it init'd automatically with no end-user intervention required.

share|improve this question
One reason for etckeeper init not to be performed automatically is to give you a chance to select your favorite VCS first (should it call git init, or hg init, or bzr init, or darcs init?). – Gilles Jul 11 '13 at 13:45
@Gilles - that's a good point. – MountainX Jul 11 '13 at 15:20
up vote 3 down vote accepted

OK, here's an answer, but it is not ideal. I was hoping to find an official OpenSuse package from one of the repos. But until someone suggests a better alternative, here's what I came up with:

  1. find the package: http://software.opensuse.org/package/etckeeper

  2. download it: wget http://download.opensuse.org/repositories/home:/Peuserik:/OSSFAC/openSUSE_12.3/noarch/etckeeper-1.3-2.1.noarch.rpm

  3. install it: sudo zypper in etckeeper-1.3-2.1.noarch.rpm

  4. initialize it: sudo etckeeper init

So the script would be:

wget http://download.opensuse.org/repositories/home:/Peuserik:/OSSFAC/openSUSE_12.3/noarch/etckeeper-1.3-2.1.noarch.rpm
sudo zypper in etckeeper-1.3-2.1.noarch.rpm
sudo mv /etc/etckeeper/etckeeper.conf /etc/etckeeper/etckeeper.conf.original
sudo tee /etc/etckeeper/etckeeper.conf > /dev/null << ENDDOC
ENDDOC #no space before this line
cd etc
sudo etckeeper init
sudo git commit -m "initial checkin"
sudo git gc # pack git repo to save a lot of space
cd -
exit 0
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.