summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--apt.conf8
-rw-r--r--debian/changelog2
-rw-r--r--debian/cron.daily2
-rw-r--r--debian/prerm4
-rw-r--r--etckeeper.spec4
-rw-r--r--pacman-g2.hook4
-rw-r--r--yum-etckeeper.py4
8 files changed, 17 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index 38cc49b..b139e19 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ include $(CONFFILE)
DESTDIR?=
prefix=/usr
-sbindir=${prefix}/sbin
+bindir=${prefix}/bin
etcdir=/etc
mandir=${prefix}/share/man
vardir=/var
@@ -21,7 +21,7 @@ install:
mkdir -p $(DESTDIR)$(etcdir)/etckeeper/ $(DESTDIR)$(vardir)/cache/etckeeper/
cp -dR *.d $(DESTDIR)$(etcdir)/etckeeper/
$(INSTALL_DATA) $(CONFFILE) $(DESTDIR)$(etcdir)/etckeeper/etckeeper.conf
- $(INSTALL_EXE) etckeeper $(DESTDIR)$(sbindir)/etckeeper
+ $(INSTALL_EXE) etckeeper $(DESTDIR)$(bindir)/etckeeper
$(INSTALL_DATA) etckeeper.8 $(DESTDIR)$(mandir)/man8/etckeeper.8
$(INSTALL_DATA) bash_completion $(DESTDIR)$(etcdir)/bash_completion.d/etckeeper
ifeq ($(HIGHLEVEL_PACKAGE_MANAGER),apt)
diff --git a/apt.conf b/apt.conf
index 30ac586..5e690a2 100644
--- a/apt.conf
+++ b/apt.conf
@@ -1,5 +1,5 @@
-DPkg::Pre-Invoke { "if [ -x /usr/sbin/etckeeper ]; then etckeeper pre-install; fi"; };
-DPkg::Post-Invoke { "if [ -x /usr/sbin/etckeeper ]; then etckeeper post-install; fi"; };
+DPkg::Pre-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper pre-install; fi"; };
+DPkg::Post-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper post-install; fi"; };
-RPM::Pre-Invoke { "if [ -x /usr/sbin/etckeeper ]; then etckeeper pre-install; fi"; };
-RPM::Post-Invoke { "if [ -x /usr/sbin/etckeeper ]; then etckeeper post-install; fi"; };
+RPM::Pre-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper pre-install; fi"; };
+RPM::Post-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper post-install; fi"; };
diff --git a/debian/changelog b/debian/changelog
index d27988e..432ad79 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ etckeeper (0.51) UNRELEASED; urgency=low
* Updated Vietnamese translation of debconf templates. Closes: #601921
* Improve rpm version change detection.
+ * Move etckeeper out of sbin, to avoid needing to work around broken
+ root PATH settings in eg, crontab. Closes: #602438
-- Joey Hess <joeyh@debian.org> Sat, 30 Oct 2010 23:53:51 -0400
diff --git a/debian/cron.daily b/debian/cron.daily
index e83b570..91e2ed4 100644
--- a/debian/cron.daily
+++ b/debian/cron.daily
@@ -1,6 +1,6 @@
#!/bin/sh
set -e
-if [ -x /usr/sbin/etckeeper ] && [ -e /etc/etckeeper/etckeeper.conf ]; then
+if [ -x /usr/bin/etckeeper ] && [ -e /etc/etckeeper/etckeeper.conf ]; then
. /etc/etckeeper/etckeeper.conf
if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then
# avoid autocommit if an install run is in progress
diff --git a/debian/prerm b/debian/prerm
index 806053a..e13f086 100644
--- a/debian/prerm
+++ b/debian/prerm
@@ -13,7 +13,7 @@ if [ "$1" = remove ]; then
if [ -d /etc/etckeeper/uninit.d ]; then
cp -a /etc/etckeeper/uninit.d /var/cache/etckeeper/stash
fi
- if [ -x /usr/sbin/etckeeper ]; then
- cp -a /usr/sbin/etckeeper /var/cache/etckeeper/stash
+ if [ -x /usr/bin/etckeeper ]; then
+ cp -a /usr/bin/etckeeper /var/cache/etckeeper/stash
fi
fi
diff --git a/etckeeper.spec b/etckeeper.spec
index 81b6842..35b7153 100644
--- a/etckeeper.spec
+++ b/etckeeper.spec
@@ -43,13 +43,13 @@ install -D debian/cron.daily $RPM_BUILD_ROOT/etc/cron.daily/etckeeper
rm -rf $RPM_BUILD_ROOT
%post
-%{_sbindir}/etckeeper init -d /etc/
+%{_bindir}/etckeeper init -d /etc/
mkdir -p %{_var}/cache/etckeeper
%files
%defattr(-,root,root,-)
%doc GPL INSTALL TODO README
-%{_sbindir}/*
+%{_bindir}/*
%{_mandir}/*
# this isn't very clever and its a manual process update.
# but it works
diff --git a/pacman-g2.hook b/pacman-g2.hook
index bd93d73..ac2e099 100644
--- a/pacman-g2.hook
+++ b/pacman-g2.hook
@@ -1,13 +1,13 @@
#!/bin/sh
pre_sysupgrade() {
- if [ -x /usr/sbin/etckeeper ]; then
+ if [ -x /usr/bin/etckeeper ]; then
etckeeper pre-install
fi
}
post_sysupgrade() {
- if [ -x /usr/sbin/etckeeper ]; then
+ if [ -x /usr/bin/etckeeper ]; then
etckeeper post-install
fi
}
diff --git a/yum-etckeeper.py b/yum-etckeeper.py
index 7a0394b..bdf9773 100644
--- a/yum-etckeeper.py
+++ b/yum-etckeeper.py
@@ -25,12 +25,12 @@ plugin_type = (TYPE_CORE,)
def pretrans_hook(conduit):
conduit.info(2, 'etckeeper: pre transaction commit')
- servicecmd = conduit.confString('main', 'servicecmd', '/usr/sbin/etckeeper')
+ servicecmd = conduit.confString('main', 'servicecmd', '/usr/bin/etckeeper')
command = '%s %s' % (servicecmd, " pre-install")
os.system(command)
def posttrans_hook(conduit):
conduit.info(2, 'etckeeper: post transaction commit')
- servicecmd = conduit.confString('main', 'servicecmd', '/usr/sbin/etckeeper')
+ servicecmd = conduit.confString('main', 'servicecmd', '/usr/bin/etckeeper')
command = '%s %s' % (servicecmd, "post-install")
os.system(command)