Initial commit.
This commit is contained in:
22
etckeeper/init.d/20restore-etckeeper
Executable file
22
etckeeper/init.d/20restore-etckeeper
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Used by .etckeeper to run a command if the file it acts on
|
||||
# (the last parameter) exists.
|
||||
maybe () {
|
||||
command="$1"
|
||||
shift 1
|
||||
|
||||
if eval [ -e "\"\$$#\"" ]; then
|
||||
"$command" "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# Yes, this runs code from the repository. As documented, etckeeper-init
|
||||
# should only be run on repositories you trust.
|
||||
if [ -e .etckeeper ]; then
|
||||
. ./.etckeeper
|
||||
else
|
||||
touch .etckeeper
|
||||
chmod 600 .etckeeper
|
||||
fi
|
||||
Reference in New Issue
Block a user