summaryrefslogtreecommitdiff
path: root/drain
diff options
context:
space:
mode:
Diffstat (limited to 'drain')
-rwxr-xr-xdrain17
1 files 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