]> git.pld-linux.org Git - packages/etckeeper.git/blame - use-libdir.patch
Up to 1.18.20
[packages/etckeeper.git] / use-libdir.patch
CommitLineData
620379ec
ER
1--- etckeeper-1.18.8/etckeeper~ 2018-08-22 15:47:48.000000000 +0300
2+++ etckeeper-1.18.8/etckeeper 2018-08-22 15:49:36.932110437 +0300
7150bf21
ER
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
d9348a1f 14@@ -84,8 +88,8 @@
4dda4953 15 exit 1
7150bf21
ER
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
4dda4953
AM
25@@ -128,19 +132,20 @@
26 if command -v perl >/dev/null; then
620379ec
ER
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 }
7150bf21 38
620379ec
ER
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 else
44 # fallback if perl isn't present
45- for script in $ETCKEEPER_CONF_DIR/$command.d/*; do
46+ for script in "$ETCKEEPER_LIB_DIR/$command.d/"* "$ETCKEEPER_CONF_DIR/$command.d/"*; do
47 if [ ! -d "$script" -a -x "$script" ]; then
94a700dd 48 echo "$script" | grep -E -q "/[-a-zA-Z0-9]+$"
620379ec 49 [ $? -eq 0 ] && "$script" "$@"
a5c88264
ER
50--- etckeeper-1.18.4/systemd/etckeeper.service~ 2016-06-20 08:06:01.000000000 +0300
51+++ etckeeper-1.18.4/systemd/etckeeper.service 2016-06-29 23:42:00.804296507 +0300
52@@ -8,5 +8,5 @@
53
54 [Service]
55 Type=oneshot
56-ExecStart=/etc/etckeeper/daily
57+ExecStart=/lib/etckeeper/daily
58 IOSchedulingClass=idle
4dda4953
AM
59--- etckeeper-1.18.16/debian/cron.daily~ 2021-05-31 13:29:39.000000000 +0200
60+++ etckeeper-1.18.16/debian/cron.daily 2021-05-31 13:31:15.151417059 +0200
61@@ -1,8 +1,8 @@
62 #!/bin/sh
63 set -e
64-if [ -e /etc/etckeeper/daily ] && [ -e /etc/etckeeper/etckeeper.conf ]; then
65+if [ -e /lib/etckeeper/daily ] && [ -e /etc/etckeeper/etckeeper.conf ]; then
66 . /etc/etckeeper/etckeeper.conf
67 if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then
68- /etc/etckeeper/daily
69+ /lib/etckeeper/daily
70 fi
71 fi
72
This page took 0.059767 seconds and 4 git commands to generate.