--- etckeeper-1.18.8/etckeeper~ 2018-08-22 15:47:48.000000000 +0300 +++ etckeeper-1.18.8/etckeeper 2018-08-22 15:49:36.932110437 +0300 @@ -1,6 +1,10 @@ #!/bin/sh set -e +if [ -z "$ETCKEEPER_LIB_DIR" ]; then + ETCKEEPER_LIB_DIR=/lib/etckeeper +fi + if [ -z "$ETCKEEPER_CONF_DIR" ]; then ETCKEEPER_CONF_DIR=/etc/etckeeper fi @@ -84,8 +88,8 @@ exit 1 fi -if [ ! -d "$ETCKEEPER_CONF_DIR/$command.d" ]; then - echo "etckeeper: $ETCKEEPER_CONF_DIR/$command.d does not exist" >&2 +if [ ! -d "$ETCKEEPER_LIB_DIR/$command.d" ] && [ ! -d "$ETCKEEPER_CONF_DIR/$command.d" ]; then + echo "etckeeper: "$ETCKEEPER_LIB_DIR/$command.d" nor $ETCKEEPER_CONF_DIR/$command.d does not exist" >&2 exit 1 fi @@ -128,19 +132,20 @@ if command -v perl >/dev/null; then lsscripts() { LANG=C perl -e ' - $dir=shift; + for $dir (@ARGV) { print join "\n", grep { ! -d $_ && -x $_ } grep /^\Q$dir\/\E[-a-zA-Z0-9]+$/, glob "$dir/*"; - ' "$1" + } + ' "$@" } - for script in $(lsscripts "$ETCKEEPER_CONF_DIR/$command.d"); do + for script in $(lsscripts "$ETCKEEPER_LIB_DIR/$command.d" "$ETCKEEPER_CONF_DIR/$command.d"); do "$script" "$@" done else # fallback if perl isn't present - for script in $ETCKEEPER_CONF_DIR/$command.d/*; do + for script in "$ETCKEEPER_LIB_DIR/$command.d/"* "$ETCKEEPER_CONF_DIR/$command.d/"*; do if [ ! -d "$script" -a -x "$script" ]; then echo "$script" | grep -E -q "/[-a-zA-Z0-9]+$" [ $? -eq 0 ] && "$script" "$@" --- etckeeper-1.18.4/systemd/etckeeper.service~ 2016-06-20 08:06:01.000000000 +0300 +++ etckeeper-1.18.4/systemd/etckeeper.service 2016-06-29 23:42:00.804296507 +0300 @@ -8,5 +8,5 @@ [Service] Type=oneshot -ExecStart=/etc/etckeeper/daily +ExecStart=/lib/etckeeper/daily IOSchedulingClass=idle --- etckeeper-1.18.16/debian/cron.daily~ 2021-05-31 13:29:39.000000000 +0200 +++ etckeeper-1.18.16/debian/cron.daily 2021-05-31 13:31:15.151417059 +0200 @@ -1,8 +1,8 @@ #!/bin/sh set -e -if [ -e /etc/etckeeper/daily ] && [ -e /etc/etckeeper/etckeeper.conf ]; then +if [ -e /lib/etckeeper/daily ] && [ -e /etc/etckeeper/etckeeper.conf ]; then . /etc/etckeeper/etckeeper.conf if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then - /etc/etckeeper/daily + /lib/etckeeper/daily fi fi