]> git.pld-linux.org Git - packages/etckeeper.git/blob - use-libdir.patch
ignore chef encrypted data bag secret
[packages/etckeeper.git] / use-libdir.patch
1 --- etckeeper-1.1/etckeeper     2012-12-28 18:09:51.000000000 +0200
2 +++ etckeeper-1.1/etckeeper     2013-05-07 13:05:25.000000000 +0300
3 @@ -1,6 +1,10 @@
4  #!/bin/sh
5  set -e
6  
7 +if [ -z "$ETCKEEPER_LIB_DIR" ]; then
8 +       ETCKEEPER_LIB_DIR=/lib/etckeeper
9 +fi
10 +
11  if [ -z "$ETCKEEPER_CONF_DIR" ]; then
12         ETCKEEPER_CONF_DIR=/etc/etckeeper
13  fi
14 @@ -71,8 +75,8 @@
15         command=pre-install
16  fi
17  
18 -if [ ! -d "$ETCKEEPER_CONF_DIR/$command.d" ]; then
19 -       echo "etckeeper: $ETCKEEPER_CONF_DIR/$command.d does not exist" >&2
20 +if [ ! -d "$ETCKEEPER_LIB_DIR/$command.d" ] && [ ! -d "$ETCKEEPER_CONF_DIR/$command.d" ]; then
21 +       echo "etckeeper: "$ETCKEEPER_LIB_DIR/$command.d" nor $ETCKEEPER_CONF_DIR/$command.d does not exist" >&2
22         exit 1
23  fi
24  
25 @@ -109,13 +113,14 @@
26  
27  lsscripts() {
28         perl -e '
29 -               $dir=shift;
30 +               for $dir (@ARGV) {
31                 print join "\n", grep { ! -d $_ && -x $_ }
32                         grep /^\Q$dir\/\E[-a-zA-Z0-9]+$/,
33                         glob "$dir/*";
34 -       ' "$1"
35 +               }
36 +       ' "$@"
37  }
38  
39 -for script in $(lsscripts "$ETCKEEPER_CONF_DIR/$command.d"); do
40 -       "$script" "$@"
41 +for script in $(lsscripts "$ETCKEEPER_LIB_DIR/$command.d" "$ETCKEEPER_CONF_DIR/$command.d"); do
42 +       "$script" "$@"
43  done
This page took 0.029825 seconds and 3 git commands to generate.