summaryrefslogtreecommitdiffstats
path: root/misc-utils/lastlog2-import.service.in
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:32 +0000
commit8bb05ac73a5b448b339ce0bc8d396c82c459b47f (patch)
tree1fdda006866bca20d41cb206767ea5241e36852f /misc-utils/lastlog2-import.service.in
parentAdding debian version 2.39.3-11. (diff)
downloadutil-linux-8bb05ac73a5b448b339ce0bc8d396c82c459b47f.tar.xz
util-linux-8bb05ac73a5b448b339ce0bc8d396c82c459b47f.zip
Merging upstream version 2.40.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'misc-utils/lastlog2-import.service.in')
-rw-r--r--misc-utils/lastlog2-import.service.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/misc-utils/lastlog2-import.service.in b/misc-utils/lastlog2-import.service.in
new file mode 100644
index 0000000..c57a897
--- /dev/null
+++ b/misc-utils/lastlog2-import.service.in
@@ -0,0 +1,15 @@
+[Unit]
+Description=Import lastlog data into lastlog2 database
+Documentation=man:lastlog2(8)
+After=local-fs.target
+ConditionPathExists=/var/log/lastlog
+ConditionPathExists=!/var/lib/lastlog/lastlog2.db
+
+[Service]
+Type=oneshot
+ExecStart=@usrbin_execdir@/lastlog2 --import /var/log/lastlog
+ExecStartPost=/usr/bin/mv /var/log/lastlog /var/log/lastlog.migrated
+RemainAfterExit=true
+
+[Install]
+WantedBy=default.target