diff options
author | Joey Hess <joey@kitenet.net> | 2012-01-06 19:26:20 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-01-06 19:26:20 -0400 |
commit | 8560b99a4ae5b5749791609c341a7a0f22331f8a (patch) | |
tree | a23fc2c5843fa0104021e4bf6a4b412660cffb85 | |
parent | 5e63ee24c07abaddfb1d1b2bcd984a367dd35059 (diff) |
Improve yum hook to avoid running if etckeeper was just removed. Thanks, Mykola Marzhan
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | etckeeper.spec | 2 | ||||
-rw-r--r-- | yum-etckeeper.py | 7 |
3 files changed, 9 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog index 4cfc19b..61c3556 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,12 @@ -etckeeper (0.60) UNRELEASED; urgency=low +etckeeper (0.60) unstable; urgency=low * Updated Dutch translation of debconf templates. Closes: #654244 * Support -h and --help. Closes: #654188 * Fix typo in bugfix for #651168. + * Improve yum hook to avoid running if etckeeper was just removed. + Thanks, Mykola Marzhan - -- Joey Hess <joeyh@debian.org> Mon, 02 Jan 2012 11:40:20 -0400 + -- Joey Hess <joeyh@debian.org> Fri, 06 Jan 2012 19:23:42 -0400 etckeeper (0.59) unstable; urgency=low diff --git a/etckeeper.spec b/etckeeper.spec index 0e178f2..25b0666 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -1,5 +1,5 @@ Name: etckeeper -Version: 0.59 +Version: 0.60 Release: 4%{?dist} Summary: store /etc in git, mercurial, bzr or darcs diff --git a/yum-etckeeper.py b/yum-etckeeper.py index 2e966f8..b77a93b 100644 --- a/yum-etckeeper.py +++ b/yum-etckeeper.py @@ -33,6 +33,7 @@ def pretrans_hook(conduit): def posttrans_hook(conduit): conduit.info(2, 'etckeeper: post transaction commit') - servicecmd = conduit.confString('main', 'servicecmd', '/usr/bin/etckeeper') - command = '%s %s > /dev/null' % (servicecmd, "post-install") - os.system(command) + if os.path.exists('/usr/bin/etckeeper'): + servicecmd = conduit.confString('main', 'servicecmd', '/usr/bin/etckeeper') + command = '%s %s > /dev/null' % (servicecmd, "post-install") + os.system(command) |