Merge lp:~mvo/core-snap/detect-core-support into lp:core-snap

Proposed by Michael Vogt
Status: Needs review
Proposed branch: lp:~mvo/core-snap/detect-core-support
Merge into: lp:core-snap
Diff against target: 18 lines (+6/-1)
1 file modified
hooks/configure (+6/-1)
To merge this branch: bzr merge lp:~mvo/core-snap/detect-core-support
Reviewer Review Type Date Requested Status
Zygmunt Krynicki Disapprove
Review via email: mp+317773@code.launchpad.net

Description of the change

This branch adds support to detect if we have the "core-support" interface available. If the interface is not available the hook will simply do nothing.

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Looks good to me, just one question.

(and yes, I'd love if we could petsit)

review: Approve
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

LGTM

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Looks good but let's please land it to github.com/snapcore/core now as that's where we pick up core builds into the store.

review: Disapprove

Unmerged revisions

55. By Michael Vogt

hooks/configure: ignore systems that have no core-support activated

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/configure'
2--- hooks/configure 2017-02-09 18:52:38 +0000
3+++ hooks/configure 2017-02-20 14:58:01 +0000
4@@ -14,8 +14,13 @@
5 # You should have received a copy of the GNU General Public License
6 # along with this program. If not, see <http://www.gnu.org/licenses/>.
7
8+if ! systemctl --version >/dev/null 2>&1; then
9+ echo "Cannot run systemctl - is core-support available?"
10+ exit 0
11+fi
12+
13 # list of services we can disable and enable
14-SERVICES="ssh rsyslog systemd-journald systemd-timesyncd"
15+SERVICES="ssh"
16
17 switch_handle_power_key() {
18 dir="/etc/systemd/logind.conf.d"

Subscribers

People subscribed via source and target branches