]> git.pld-linux.org Git - packages/rpm-build-macros.git/blame - disable-systemd.patch
- patch without previous (never commited) patch
[packages/rpm-build-macros.git] / disable-systemd.patch
CommitLineData
3db944cb
ER
1--- rpm-build-macros-1.647/rpm.macros~ 2012-03-13 18:09:42.876512532 +0200
2+++ rpm-build-macros-1.647/rpm.macros 2012-03-13 18:10:01.389010815 +0200
3@@ -2166,79 +2166,17 @@
b0a9798f
ER
4 # BuildRequires: rpmbuild(macros) >= 1.647
5 # Requires: systemd-units >= 38
b0a9798f 6
3db944cb
ER
7-%systemd_reload /bin/systemd_booted && SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog /bin/systemctl --quiet daemon-reload || :
8-
b0a9798f 9-%systemd_service_enable() \
b0a9798f
ER
10- export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
11- /bin/systemctl --quiet enable %{*} || : \
12- /bin/systemd_booted && echo 'Run "/bin/systemctl start %{*}" to start %{*}.' || : \
b0a9798f
ER
13-%{nil}
14-
15-%systemd_service_disable() \
b0a9798f
ER
16- export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
17- /bin/systemctl --quiet disable %{*} || : \
b0a9798f
ER
18-%{nil}
19-
20-%systemd_service() \
b0a9798f
ER
21- export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
22- /bin/systemd_booted && /bin/systemctl --quiet %{*} || : \
b0a9798f
ER
23-%{nil}
24-
25-%systemd_service_start() \
b0a9798f
ER
26- export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
27- /bin/systemd_booted && /bin/systemctl --quiet start %{*} || : \
b0a9798f
ER
28-%{nil}
29-
30-%systemd_service_stop() \
b0a9798f
ER
31- export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
32- /bin/systemd_booted && /bin/systemctl --quiet stop %{*} || : \
b0a9798f
ER
33-%{nil}
34-
35-%systemd_service_restart() \
b0a9798f
ER
36- export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
37- /bin/systemd_booted && /bin/systemctl --quiet try-restart %{*} || : \
b0a9798f
ER
38-%{nil}
39-
40-%systemd_service_reload() \
b0a9798f
ER
41- export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
42- /bin/systemd_booted && /bin/systemctl --quiet reload %{*} || : \
b0a9798f
ER
43-%{nil}
44-
45-%systemd_trigger() \
b0a9798f
ER
46-want_enable_service() { \
47- [ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm \
48- [ ${RPM_ENABLE_SYSTEMD_SERVICE:-yes} = no ] && return 1 \
49- /sbin/chkconfig --list ${1%.service} 2>/dev/null | grep -qsv "[0-6]:on" && return 1 \
50- return 0 \
51-}\
52- export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
53- for s in %{*}; do \
54- if want_enable_service $s; then \
55- /bin/systemctl --quiet enable $s || : \
56- fi \
57- done \
b0a9798f
ER
58-%{nil}
59-
60-%systemd_post() \
b0a9798f
ER
61- export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
62- /bin/systemd_booted && /bin/systemctl --quiet daemon-reload || : \
63- if [ $1 -eq 1 ]; then \
64- /bin/systemctl --quiet enable %{*} || : \
65- /bin/systemd_booted && echo 'Run "/bin/systemctl start %{*}" to start %{*}.' || : \
66- elif [ -z "$NORESTART" ]; then \
67- /bin/systemd_booted && /bin/systemctl --quiet try-restart %{*} || : \
68- else \
69- /bin/systemd_booted && echo 'Run "/bin/systemctl restart %{*}" to restart %{*}.' || : \
70- fi \
b0a9798f
ER
71-%{nil}
72-
73-%systemd_preun() \
b0a9798f
ER
74- if [ $1 -eq 0 ]; then \
75- export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
76- /bin/systemd_booted && /bin/systemctl --quiet stop %{*} || : \
77- /bin/systemctl --quiet disable %{*} || : \
78- fi \
b0a9798f
ER
79-%{nil}
80+%systemd_reload %{nil}
81+%systemd_service_enable() %{nil}
82+%systemd_service_disable() %{nil}
83+%systemd_service() %{nil}
84+%systemd_service_start() %{nil}
85+%systemd_service_stop() %{nil}
86+%systemd_service_restart() %{nil}
87+%systemd_service_reload() %{nil}
88+%systemd_trigger() %{nil}
89+%systemd_post() %{nil}
90+%systemd_preun() %{nil}
91
92 %systemdunitdir /lib/systemd/system
93 %systemdtmpfilesdir /usr/lib/tmpfiles.d
This page took 0.030994 seconds and 4 git commands to generate.