- r = unit_add_two_dependencies_by_name(UNIT(t), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_SYSINIT_TARGET, NULL, true);
+ return unit_add_two_dependencies_by_name(UNIT(t), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, NULL, true);
+}
+
+static void update_stampfile(Timer *t, usec_t timestamp) {
+ _cleanup_close_ int fd = -1;
+
+ mkdir_parents_label(t->stamp_path, 0755);
+
+ /* Update the file atime + mtime, if we can */
+ fd = open(t->stamp_path, O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0644);
+ if (fd >= 0) {
+ struct timespec ts[2];
+
+ timespec_store(&ts[0], timestamp);
+ ts[1] = ts[0];
+
+ futimens(fd, ts);
+ }
+}
+
+static int timer_setup_persistent(Timer *t) {
+ int r;
+
+ assert(t);
+
+ if (!t->persistent)
+ return 0;
+
+ if (UNIT(t)->manager->running_as == SYSTEMD_SYSTEM) {
+
+ r = unit_require_mounts_for(UNIT(t), "/var/lib/systemd/timers");