From ecc95534d52ac51a52b7938abd1192e47581061f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 29 Jan 2018 15:05:10 -0500 Subject: first attempt at supporting new things from holo and systemd --- drain | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drain b/drain index 71afb43..d4a6ac9 100755 --- a/drain +++ b/drain @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2016-2017 Luke Shumaker +# Copyright 2016-2018 Luke Shumaker # This work is free. You can redistribute it and/or modify it under the # terms of the Do What The Fuck You Want To Public License, Version 2, # as published by Sam Hocevar. See the COPYING file for more details. @@ -10,7 +10,8 @@ declare -r workdir=/var/lib/pristine-etc watchdirs=( /etc - /usr/share/holo/files + /usr/share/holo + /usr/lib/sysusers.d ) readonly watchdirs @@ -70,6 +71,12 @@ commit() ( ln -srT ../etc.git etc/.git + # The holo libalpm hook runs before the systemd-sysusers + # libalpm hook; but ignore that and run systemd-sysusers + # first, because I said so. + if type systemd-sysusers &>/dev/null; then + systemd-sysusers --root=. + fi if type holo &>/dev/null; then mkdir -p -- run usr/lib ln -sT /usr/lib/holo usr/lib/holo @@ -80,6 +87,12 @@ commit() ( fi HOLO_ROOT_DIR=. holo apply fi + if type pwck &>/dev/null; then + pwck --root "$PWD" --sort + fi + if type grpck &>/dev/null; then + grpck --root "$PWD" --sort + fi cd etc/ etckeeper update-ignore -d "$PWD" if etckeeper unclean -d "$PWD"; then -- cgit v1.2.2