diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2007-11-05 16:00:32 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2007-11-05 16:00:32 -0500 |
commit | 34320131ce680fe03febc9f4d6b438f05e548cbc (patch) | |
tree | 41c91d7ad68331e1fa2525c43d43e6c04899b09b /README | |
parent | 3e6cf464cff47d22f4ac4b4313fda68f32ae1ea8 (diff) |
rename etc-* to etckeeper-*
Diffstat (limited to 'README')
-rw-r--r-- | README | 41 |
1 files changed, 20 insertions, 21 deletions
@@ -28,10 +28,10 @@ repository. etckeeper has special support to handle changes to /etc caused by installing and upgrading packages. Before apt installs packages, -`etc-pre-apt` will check that /etc is clean, and if it's not, prompt you -about whether or not to continue. (This check can be disabled.) After apt -installs packages, `etc-post-apt` will add any new interesting files to the -repository, and commit the changes. +`etckeeper-pre-apt` will check that /etc is clean, and if it's not, prompt +you about whether or not to continue. (This check can be disabled.) 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 arbitrary directories like /etc. This means it has a few limitations that @@ -40,17 +40,17 @@ 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, `etc-init` sets up -a git hook that use `metastore` to store metadata about file owners, -permissions, modification times, and even extended attributes. This +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, modification times, 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 `etc-init` also sets up a git hook -to run `etc-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. +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. git doesn't support several special files that you _probably_ won't have in /etc, such as unix sockets, named pipes, hardlinked files (but softlinks @@ -63,11 +63,10 @@ contains such untrackable special files. A quick walkthrough of using etckeeper. cd /etc - etc-init + etckeeper-init -This `etc-init` command, which is actually run for you when the Debian -package of etckeeper is installed, initialises an /etc/.git/ repository. -This command is careful to never overwrite existing file or directories in +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 files into to git, but does `git-add` all interesting files for an initial @@ -88,7 +87,7 @@ Rinse, lather, repeat. etckeeper hooks into apt so changed or new files caused by installing or upgrading packages will automatically be added and committed. -(`etc-post-apt` uses `git-add .`, so any new files in /etc that arn't +(`etckeeper-post-apt` uses `git-add .`, so any new files in /etc that arn't gitignored will be added.) If a package *removes* a file from /etc, etckeeper does not automatically @@ -104,13 +103,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 `etc-init` fixes their permissions: +shadow, before `etckeeper-init` fixes their permissions: mkdir /my/clone cd /my/clone chmod 700 . git clone /etc - etc-init + etckeeper-init chmod 755 . Another common reason to clone the repository is to make a backup to a @@ -129,12 +128,12 @@ sky's the limit.. ## configuration -Each etc-foo command uses `run-parts` to run the executable files in +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 symlinks to the actual files; you can remove or reorder the symlinks, or add your own custom files. -Note that the etc-foo commands are careful to not hardcode anything about +Note that the etckeeper-foo 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. |