Merge lp:~mvo/click/no-error-no-missing-systemctl into lp:click/devel

Proposed by Michael Vogt
Status: Merged
Merged at revision: 547
Proposed branch: lp:~mvo/click/no-error-no-missing-systemctl
Merge into: lp:click/devel
Diff against target: 14 lines (+3/-1)
1 file modified
debian/click.postinst (+3/-1)
To merge this branch: bzr merge lp:~mvo/click/no-error-no-missing-systemctl
Reviewer Review Type Date Requested Status
Colin Watson Approve
Jamie Strandboge (community) Approve
Review via email: mp+244154@code.launchpad.net

Description of the change

This fixes a spurious error message on systems without systemctl (like
trusty)

To post a comment you must log in.
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

ACK

review: Approve
Revision history for this message
Colin Watson (cjwatson) wrote :

This is OK but overcomplicated; you could just use which's exit code.

  if which systemctl >/dev/null 2>&1; then
    ...
  fi

review: Approve
548. By Michael Vogt

debian/click.postinst: simplify, thanks to Colin Watson

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/click.postinst'
2--- debian/click.postinst 2014-10-14 09:47:48 +0000
3+++ debian/click.postinst 2014-12-10 14:36:01 +0000
4@@ -13,7 +13,9 @@
5
6 # dh-systemd has no support yet for user systemd units
7 # so we need to do this manually here
8- systemctl --global enable click-user-hooks.service || true
9+ if which systemctl >/dev/null 2>&1; then
10+ systemctl --global enable click-user-hooks.service || true
11+ fi
12 fi
13
14 #DEBHELPER#

Subscribers

People subscribed via source and target branches

to all changes: