--- 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 @@ command=pre-install 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 @@ -132,19 +132,20 @@ if [ "$(which perl 2>/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" | egrep -q "/[-a-zA-Z0-9]+$" [ $? -eq 0 ] && "$script" "$@" --- etckeeper-1.18.4/debian/cron.daily~ 2016-06-20 08:06:01.000000000 +0300 +++ etckeeper-1.18.4/debian/cron.daily 2016-06-29 23:41:40.939927867 +0300 @@ -3,6 +3,6 @@ if [ -e /etc/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 --- 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