summaryrefslogtreecommitdiff
path: root/init.d
diff options
context:
space:
mode:
authorMathieu Clabaut <mathieu.clabaut@gmail.com>2007-12-21 15:47:30 -0600
committerJoey Hess <joey@kodama.kitenet.net>2008-01-03 19:53:46 -0500
commitf82235032f162aae0bb08828d45c6306e60dcd29 (patch)
treea4479471b8b8c91903e1ceaf54dfea42e3457a4a /init.d
parent631af60701ca747861d67a19d431005c7d45d6be (diff)
hg and git subrepo creation (hg is for now a copy of git)
Diffstat (limited to 'init.d')
-rwxr-xr-xinit.d/10restore-etckeeper8
-rwxr-xr-xinit.d/20restore-metadata10
-rwxr-xr-xinit.d/40git-init6
-rwxr-xr-xinit.d/50git-ignore22
-rwxr-xr-xinit.d/50git-perm3
-rwxr-xr-xinit.d/50git-pre-commit-hook15
-rwxr-xr-xinit.d/70git-add5
-rw-r--r--init.d/README13
8 files changed, 0 insertions, 82 deletions
diff --git a/init.d/10restore-etckeeper b/init.d/10restore-etckeeper
deleted file mode 100755
index 376524c..0000000
--- a/init.d/10restore-etckeeper
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-set -e
-
-# Yes, this runs code from the repository. As documented, etckeeper-init
-# should only be run on repositories you trust.
-if [ -e .etckeeper ]; then
- . ./.etckeeper
-fi
diff --git a/init.d/20restore-metadata b/init.d/20restore-metadata
deleted file mode 100755
index 01c45e4..0000000
--- a/init.d/20restore-metadata
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-set -e
-
-# Note that metastore doesn't check that the .metastore file only changes
-# perms of files in the current directory. It's ok to trust the .metastore
-# file won't do anything shady, because, as documented, etckeeper-init
-# should only be run on repositories you trust.
-if [ -e .metadata ]; then
- metastore --apply --mtime
-fi
diff --git a/init.d/40git-init b/init.d/40git-init
deleted file mode 100755
index 69867c4..0000000
--- a/init.d/40git-init
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-set -e
-if [ ! -e .git ]; then
- git-init
- echo "$(hostname) /etc repository" > .git/description
-fi
diff --git a/init.d/50git-ignore b/init.d/50git-ignore
deleted file mode 100755
index f931592..0000000
--- a/init.d/50git-ignore
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-set -e
-if [ ! -e .gitignore ]; then
- cat >.gitignore <<EOF
-*~
-
-# new and old versions of conffiles, stored by dpkg
-*.dpkg-*
-
-# mount(8) records system state here, no need to keep these in git
-blkid.tab
-blkid.tab.old
-
-# some other files in /etc that typically do not need to be tracked
-ld.so.cache
-mtab
-.pwd.lock
-network/run
-adjtime
-
-EOF
-fi
diff --git a/init.d/50git-perm b/init.d/50git-perm
deleted file mode 100755
index 564e489..0000000
--- a/init.d/50git-perm
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-set -e
-chmod 700 .git
diff --git a/init.d/50git-pre-commit-hook b/init.d/50git-pre-commit-hook
deleted file mode 100755
index 0efd5e4..0000000
--- a/init.d/50git-pre-commit-hook
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/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 `pwd`" >&2
- fi
-else
- cat >.git/hooks/pre-commit <<EOF
-#!/bin/sh
-# pre-commit hook for etckeeper, to store metadata and do sanity checks
-set -e
-etckeeper pre-commit `pwd`
-EOF
- chmod +x .git/hooks/pre-commit
-fi
diff --git a/init.d/70git-add b/init.d/70git-add
deleted file mode 100755
index 06504b4..0000000
--- a/init.d/70git-add
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-set -e
-if ! git-add .; then
- echo "etckeeper warning: git-add failed" >&2
-fi
diff --git a/init.d/README b/init.d/README
deleted file mode 100644
index 90aec67..0000000
--- a/init.d/README
+++ /dev/null
@@ -1,13 +0,0 @@
-Executable files in this directory are run to initialise the working directory
-for use by etckeeper. If the working directory is not already in version
-control, that includes setting up the version control, but not actually
-committing anything. If the working directory is in version control,
-it includes applying stored metadata to the checked out files in the
-working directory.
-
-Please be careful to *never* overwrite existing files/directories
-in the working directory (or use absolute care when doing so). If a file
-you need to write already exists, check if its contents are sane, and
-if not, emit a warning on stderr.
-
-If initialisation fails, exit nonzero and no later files will be run.