diff options
author | David Kaspar [Dee'Kej] <dkaspar@redhat.com> | 2018-06-12 17:24:57 +0200 |
---|---|---|
committer | Dee'Kej <deekej@linuxmail.org> | 2018-06-14 16:11:54 +0200 |
commit | f5e4588e0e73046ed0995c148e8a4619b9ba69fb (patch) | |
tree | ed8f8edffc2a723e7775b2c2d01f73e7bc15eaec | |
parent | ead5bff2561eae45007c8d9e949379c3454c0183 (diff) | |
download | initscripts-f5e4588e0e73046ed0995c148e8a4619b9ba69fb.tar initscripts-f5e4588e0e73046ed0995c148e8a4619b9ba69fb.tar.gz initscripts-f5e4588e0e73046ed0995c148e8a4619b9ba69fb.tar.bz2 initscripts-f5e4588e0e73046ed0995c148e8a4619b9ba69fb.tar.xz initscripts-f5e4588e0e73046ed0995c148e8a4619b9ba69fb.zip |
specfile: netconsole service moved to /usr/libexec
-rw-r--r-- | initscripts.spec | 13 | ||||
-rw-r--r-- | usr/lib/systemd/system/netconsole.service | 14 | ||||
-rwxr-xr-x | usr/libexec/netconsole (renamed from etc/rc.d/init.d/netconsole) | 0 |
3 files changed, 22 insertions, 5 deletions
diff --git a/initscripts.spec b/initscripts.spec index 0435b990..dbfe14bd 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -238,12 +238,13 @@ fi # --------------- %post -n netconsole-service -chkconfig --add netconsole > /dev/null 2>&1 || : +%systemd_post netconsole.service %preun -n netconsole-service -if [ $1 -eq 0 ]; then - chkconfig --del netconsole > /dev/null 2>&1 || : -fi +%systemd_preun netconsole.service + +%postun -n netconsole-service +%systemd_postun netconsole.service # --------------- @@ -323,9 +324,11 @@ fi # --------------- %files -n netconsole-service -%{_sysconfdir}/rc.d/init.d/netconsole %config(noreplace) %{_sysconfdir}/sysconfig/netconsole +%{_libexecdir}/netconsole +%{_prefix}/lib/systemd/system/netconsole.service + # --------------- %files -n readonly-root diff --git a/usr/lib/systemd/system/netconsole.service b/usr/lib/systemd/system/netconsole.service new file mode 100644 index 00000000..29248a4f --- /dev/null +++ b/usr/lib/systemd/system/netconsole.service @@ -0,0 +1,14 @@ +[Unit] +Description=Initializes network console logging of kernel messages +ConditionPathExists=/etc/sysconfig/netconsole +After=network-online.target +Wants=network-online.target + +[Service] +ExecStart=/usr/libexec/netconsole start +ExecStop=/usr/libexec/netconsole stop +Type=oneshot +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/etc/rc.d/init.d/netconsole b/usr/libexec/netconsole index 3f2872dd..3f2872dd 100755 --- a/etc/rc.d/init.d/netconsole +++ b/usr/libexec/netconsole |