1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
diff -Nur a/src/modules/liveservices/liveservices.conf b/src/modules/liveservices/liveservices.conf
--- a/src/modules/liveservices/liveservices.conf 1970-01-01 01:00:00.000000000 +0100
+++ b/src/modules/liveservices/liveservices.conf 2015-07-26 14:31:44.353557382 +0100
@@ -0,0 +1,21 @@
+---
+#systemd kogaion live services are disabled in this precise order
+
+services:
+ - name: "x-setup" #name of the service file
+ mandatory: false #true=> if disabling fails the installer errors out and quits
+ #false=>if disabling fails print warning to console and continue
+ - name: "cdeject"
+ mandatory: false
+
+ - name: "installer-text"
+ mandatory: false
+
+ - name: "installer-gui"
+ mandatory: false
+
+ - name: "graphical_start"
+ mandatory: false
+
+ - name: "kogaionlive"
+ mandatory: false
diff -Nur a/src/modules/liveservices/main.py b/src/modules/liveservices/main.py
--- a/src/modules/liveservices/main.py 1970-01-01 01:00:00.000000000 +0100
+++ b/src/modules/liveservices/main.py 2015-07-26 14:24:57.722530083 +0100
@@ -0,0 +1,42 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+#
+# === This file is part of Calamares - <http://github.com/calamares> ===
+#
+# Copyright 2014, Philip Müller <philm@manjaro.org>
+# Copyright 2014, Teo Mrnjavac <teo@kde.org>
+# Copyright 2015, V3n3RiX <venerix@rogentos.ro>
+#
+# Calamares is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Calamares is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Calamares. If not, see <http://www.gnu.org/licenses/>.
+
+import libcalamares
+
+
+def run():
+ """ Setup systemd services """
+ services = libcalamares.job.configuration['services']
+
+ # disable kogaion live services
+ for svc in services:
+ ec = libcalamares.utils.chroot_call(['systemctl', 'disable', '{}.service'.format(svc['name'])])
+
+ if ec != 0:
+ if svc['mandatory']:
+ return "Cannot disable systemd service {}".format(svc['name']), \
+ "systemctl disable call in chroot returned error code {}".format(ec)
+ else:
+ libcalamares.utils.debug("Cannot disable systemd service {}".format(svc['name']))
+ libcalamares.utils.debug("systemctl disable call in chroot returned error code {}".format(ec))
+
+ return None
diff -Nur a/src/modules/liveservices/module.desc b/src/modules/liveservices/module.desc
--- a/src/modules/liveservices/module.desc 1970-01-01 01:00:00.000000000 +0100
+++ b/src/modules/liveservices/module.desc 2015-07-26 14:32:23.925560039 +0100
@@ -0,0 +1,6 @@
+---
+type: "job"
+name: "liveservices"
+interface: "python"
+requires: []
+script: "main.py"
|