From f2f4d7a7eef3271592381b9383708a8a4633053a Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sun, 30 Sep 2012 14:18:41 +0000 Subject: Mark a fresh install of a systemd service as 'migrated' to avoid subsequent checks on upgrade. --- NEWS | 2 ++ add-service | 3 +++ 2 files changed, 5 insertions(+) diff --git a/NEWS b/NEWS index 85ef28a..baa19d8 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ 2012-04-30 Colin Guthrie 0.24.10 * fix leaking of exit status failure. * prefer native systemd install rules over manual symlinking + * mark a systemd-only service as "migrated" on install to avoid checking for + sysvinit migration when next upgraded. 2012-04-29 Colin Guthrie 0.24.9 * fix handling of masked and symlinked unit names diff --git a/add-service b/add-service index 0c0a887..dc09cb7 100755 --- a/add-service +++ b/add-service @@ -135,6 +135,9 @@ add_service() { # Actually do enable/disable foo if [ -n "$units_to_enable" ]; then /bin/systemctl --quiet enable $units_to_enable >/dev/null + if [ -n "$srv" -a ! -f "${systemd_migration_dir}/$srv" ]; then + touch "${systemd_migration_dir}/$srv" + fi fi # When no native systemd unit exists, the above command will actually -- cgit v1.2.1