summaryrefslogtreecommitdiffstats
path: root/meta-systemd/classes/systemd.bbclass
diff options
context:
space:
mode:
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>2012-11-16 16:21:33 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2013-01-18 10:49:43 +0100
commit38a5cf3fa06972992f473027658d5b0cffff3a33 (patch)
tree40398531b20d7abfbcb6c4167b92c2c667789aee /meta-systemd/classes/systemd.bbclass
parent5d7953c03fbbe8066f60cc8f788511870ad232cc (diff)
downloadmeta-openembedded-38a5cf3fa06972992f473027658d5b0cffff3a33.tar.gz
systemd.bbclass: move disable operation into prerm() script
The 'systemctl disable' operation should not be done in postrm() because the .service file does not exist anymore and the script will fail hence. After moving this command into prerm(), postrm() becomes empty and can be removed completely. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Acked-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-systemd/classes/systemd.bbclass')
-rw-r--r--meta-systemd/classes/systemd.bbclass8
1 files changed, 0 insertions, 8 deletions
diff --git a/meta-systemd/classes/systemd.bbclass b/meta-systemd/classes/systemd.bbclass
index 16ac1fbf1..f2a036336 100644
--- a/meta-systemd/classes/systemd.bbclass
+++ b/meta-systemd/classes/systemd.bbclass
@@ -22,9 +22,7 @@ systemd_prerm() {
22if [ -z "$D" ]; then 22if [ -z "$D" ]; then
23 systemctl stop ${SYSTEMD_SERVICE} 23 systemctl stop ${SYSTEMD_SERVICE}
24fi 24fi
25}
26 25
27systemd_postrm() {
28systemctl disable ${SYSTEMD_SERVICE} 26systemctl disable ${SYSTEMD_SERVICE}
29} 27}
30 28
@@ -120,12 +118,6 @@ python populate_packages_prepend () {
120 prerm += localdata.getVar('systemd_prerm', 1) 118 prerm += localdata.getVar('systemd_prerm', 1)
121 d.setVar('pkg_prerm_%s' % pkg, prerm) 119 d.setVar('pkg_prerm_%s' % pkg, prerm)
122 120
123 postrm = localdata.getVar('pkg_postrm', 1)
124 if not postrm:
125 postrm = '#!/bin/sh\n'
126 postrm += localdata.getVar('systemd_postrm', 1)
127 d.setVar('pkg_postrm_%s' % pkg, postrm)
128
129 # add files to FILES_*-systemd if existent and not already done 121 # add files to FILES_*-systemd if existent and not already done
130 def systemd_append_file(pkg_systemd, file_append): 122 def systemd_append_file(pkg_systemd, file_append):
131 appended = False 123 appended = False