]> git.pld-linux.org Git - packages/etckeeper.git/blob - use-libdir.patch
Up to 1.18.20
[packages/etckeeper.git] / use-libdir.patch
1 --- etckeeper/etckeeper.orig    2015-03-14 18:24:26.000000000 +0100
2 +++ etckeeper/etckeeper 2015-04-07 00:54:26.014557154 +0200
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 @@ -84,8 +88,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 @@ -122,13 +126,14 @@
26  
27  lsscripts() {
28         LANG=C 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 +for script in $(lsscripts "$ETCKEEPER_LIB_DIR/$command.d" "$ETCKEEPER_CONF_DIR/$command.d"); do
41         "$script" "$@"
42  done
43 --- etckeeper-1.18.4/debian/cron.daily~ 2016-06-20 08:06:01.000000000 +0300
44 +++ etckeeper-1.18.4/debian/cron.daily  2016-06-29 23:41:40.939927867 +0300
45 @@ -3,6 +3,6 @@
46  if [ -e /etc/etckeeper/daily ] && [ -e /etc/etckeeper/etckeeper.conf ]; then
47         . /etc/etckeeper/etckeeper.conf
48         if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then
49 -               /etc/etckeeper/daily
50 +               /lib/etckeeper/daily
51         fi
52  fi
53 --- etckeeper-1.18.4/systemd/etckeeper.service~ 2016-06-20 08:06:01.000000000 +0300
54 +++ etckeeper-1.18.4/systemd/etckeeper.service  2016-06-29 23:42:00.804296507 +0300
55 @@ -8,5 +8,5 @@
56  
57  [Service]
58  Type=oneshot
59 -ExecStart=/etc/etckeeper/daily
60 +ExecStart=/lib/etckeeper/daily
61  IOSchedulingClass=idle
This page took 0.075088 seconds and 3 git commands to generate.