Permalink
Browse files

Move etckeeper out of sbin, to avoid needing to work around broken ro…

…ot PATH settings in eg, crontab. Closes: #602438
  • Loading branch information...
1 parent 619e220 commit d65203b1bf9c1889a47090113a98833f849ae94e @joeyh joeyh committed Nov 16, 2010
Showing with 17 additions and 15 deletions.
  1. +2 −2 Makefile
  2. +4 −4 apt.conf
  3. +2 −0 debian/changelog
  4. +1 −1 debian/cron.daily
  5. +2 −2 debian/prerm
  6. +2 −2 etckeeper.spec
  7. +2 −2 pacman-g2.hook
  8. +2 −2 yum-etckeeper.py
View
@@ -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)
View
@@ -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"; };
View
@@ -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
View
@@ -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
View
@@ -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
View
@@ -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
View
@@ -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
}
View
@@ -25,12 +25,12 @@
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)

0 comments on commit d65203b

Please sign in to comment.