drop support for etckeeper-
authorJoey Hess <joey@kodama.kitenet.net>
Tue, 6 Nov 2007 00:22:01 +0000 (19:22 -0500)
committerJoey Hess <joey@kodama.kitenet.net>
Tue, 6 Nov 2007 00:22:01 +0000 (19:22 -0500)
Makefile
README
apt.conf
etckeeper
init.d/40git-pre-commit-hook

index 4497b0d5d9733310fef40eee90a6f900b7b39870..0f7007bec189c89cecf5bea4926eaff8551863a5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,12 +6,6 @@ install:
        install -m 0644 -D apt.conf $(PREFIX)/etc/apt/apt.conf.d/05etckeeper
        install -m 0644 -D etckeeper.1 $(PREFIX)/usr/share/man/man1/etckeeper.1
 
-       for dir in *.d; do \
-               command=$$(echo "$$dir" | sed -e 's/\.d$$//'); \
-               ln -sf etckeeper $(PREFIX)/usr/bin/etckeeper-$$command; \
-               ln -sf etckeeper.1 $(PREFIX)/usr/share/man/man1/etckeeper-$$command.1; \
-       done
-
        for dir in *.d; do \
                mkdir -p $(PREFIX)/etc/etckeeper/$$dir; \
                for file in $$dir/*; do \
diff --git a/README b/README
index 690b669d86cdd878d2f91495dbe40029f6bb8dbb..78e0334eadc78439c039f79e3d8a84469d7c3222 100644 (file)
--- a/README
+++ b/README
@@ -28,8 +28,8 @@ repository.
 
 etckeeper has special support to handle changes to /etc caused by
 installing and upgrading packages. Before apt installs packages,
-`etckeeper-pre-apt` will check that /etc contains no uncommitted changes.
-After apt installs packages, `etckeeper-post-apt` will add any new
+`etckeeper pre-apt` will check that /etc contains no uncommitted changes.
+After apt installs packages, `etckeeper post-apt` will add any new
 interesting files to the repository, and commit the changes.
 
 git is designed as a way to manage source code, not as a way to manage
@@ -39,14 +39,14 @@ empty directories, and special files.
 
 git has only limited tracking of file metadata, being able to track the
 executable bit, but not other permissions or owner info. So file metadata
-storage is handled by `metastore`. Amoung other chores, `etckeeper-init`
+storage is handled by `metastore`. Amoung other chores, `etckeeper init`
 sets up a git hook that use `metastore` to store metadata about file
 owners, permissions, and even extended attributes. This metadata is stored
 in git along with everything else, and can be applied if the repo should
 need to be checked back out.
 
-git cannot track empty directories. So `etckeeper-init` also sets up a git
-hook to run `etckeeper-pre-commit`, which checks for empty directories
+git cannot track empty directories. So `etckeeper init` also sets up a git
+hook to run `etckeeper pre-commit`, which checks for empty directories
 before committing, and warn about them. You can then either ignore the
 empty directory, if it's not significant, or put a file (such as
 `.gitignore`) in the directory to enable git to track it.
@@ -62,9 +62,9 @@ contains such untrackable special files.
 A quick walkthrough of using etckeeper.
 
        cd /etc
-       etckeeper-init
+       etckeeper init
 
-This `etckeeper-init` command initialises an /etc/.git/ repository. This
+This `etckeeper init` command initialises an /etc/.git/ repository. This
 command is careful to never overwrite existing files or directories in
 /etc. It will create a `.gitignore` if one doesn't already exist, sets up
 git hooks if they don't already exist, and so on. It does *not* commit any
@@ -86,7 +86,7 @@ further changes:
 Rinse, lather, repeat.
 
 etckeeper hooks into apt so changes to files in /etc caused by installing or
-upgrading packages will automatically be committed. (`etckeeper-post-apt`
+upgrading packages will automatically be committed. (`etckeeper post-apt`
 uses `git-add .`, so any new files in /etc that arn't gitignored will be
 added. If it auto-adds files you don't want added, put them in
 `.gitignore`.)
@@ -97,13 +97,13 @@ on your system's /etc. Often it's better to clone /etc to elsewhere and do
 potentially dangerous stuff in a staging directory. You can clone the 
 repository using git-clone, but be careful that the directory it's cloned
 into starts out mode 700, to prevent anyone else from seeing files like
-shadow, before `etckeeper-init` fixes their permissions:
+shadow, before `etckeeper init` fixes their permissions:
 
        mkdir /my/clone
        cd /my/clone
        chmod 700 .
        git clone /etc
-       etckeeper-init
+       etckeeper init
        chmod 755 .
 
 Another common reason to clone the repository is to make a backup to a
@@ -122,12 +122,12 @@ sky's the limit..
 
 ## configuration
 
-Each etckeeper-foo command uses `run-parts` to run the executable files in
-/etc/etckeeper/foo.d/. By default these directories contain a bunch of
+Each etckeeper command uses `run-parts` to run the executable files in
+/etc/etckeeper/$command.d/. By default these directories contain a bunch of
 symlinks to the actual files; you can remove or reorder the symlinks,
 or add your own custom files.
 
-Note that the etckeeper-foo commands are careful to not hardcode anything about
+Note that the etckeeper commands are careful to not hardcode anything about
 git. If you want to use some other revision control system, that's
 theoretically possible to accomplish by just changing the files in
 /etc/etckeeper/. If you do this, please let me know.
index 96b7e1404e60a657fe6f4f824eda839ba5b96c5e..28f35a4b1fd6ef32be20029a96b4412361ad2ce8 100644 (file)
--- a/apt.conf
+++ b/apt.conf
@@ -1,2 +1,2 @@
-DPkg::Pre-Install-Pkgs { "if [ -x /usr/bin/etckeeper-pre-apt ];  then etckeeper-pre-apt; fi"; };
-DPkg::Post-Invoke      { "if [ -x /usr/bin/etckeeper-post-apt ]; then etckeeper-post-apt; fi"; };
+DPkg::Pre-Install-Pkgs { "if [ -x /usr/bin/etckeeper ];  then etckeeper pre-apt; fi"; };
+DPkg::Post-Invoke      { "if [ -x /usr/bin/etckeeper ]; then etckeeper post-apt; fi"; };
index 0840e85e7305d989311d1ff835025819ed498a24..7ce695fe140811befc2de6189998abe9ac92e1ae 100755 (executable)
--- a/etckeeper
+++ b/etckeeper
@@ -1,16 +1,12 @@
 #!/bin/sh
 set -e
 
-if [ "$(basename $0)" != etckeeper ]; then
-       command="$(basename $0 | sed -e s/etckeeper-//)"
-else
-       if [ -z "$1" ]; then
-               echo "usage: etckeeper command" >&2
-               exit 1
-       fi
-       command="$1"
-       shift 1
+if [ -z "$1" ]; then
+       echo "usage: etckeeper command" >&2
+       exit 1
 fi
+command="$1"
+shift 1
 
 if [ ! -d "/etc/etckeeper/$command.d" ]; then
        echo "etckeeper: /etc/etckeeper/$command.d does not exist" >&2
index 88eb581424c1f4561e7d401ce4d7b37af7b15b77..0efd5e47998a6474fde32468f509d82a641aef69 100755 (executable)
@@ -1,16 +1,15 @@
 #!/bin/sh
 set -e
 if [ -x .git/hooks/pre-commit ]; then
-       if ! grep -q etckeeper-pre-commit .git/hooks/pre-commit; then
-               echo "etckeeper warning: .git/hooks/pre-commit needs to be manually modifed to run etckeeper-pre-commit" >&2
+       if ! grep -q "etckeeper pre-commit" .git/hooks/pre-commit; then
+               echo "etckeeper warning: .git/hooks/pre-commit needs to be manually modifed to run: etckeeper pre-commit `pwd`" >&2
        fi
 else
        cat >.git/hooks/pre-commit <<EOF
 #!/bin/sh
-# pre-commit hook for etckeeper. Calls etckeeper-pre-commit to store metadata
-# and do sanity checks.
+# pre-commit hook for etckeeper, to store metadata and do sanity checks
 set -e
-etckeeper-pre-commit `pwd`
+etckeeper pre-commit `pwd`
 EOF
        chmod +x .git/hooks/pre-commit
 fi