From 8edaf251ffe8b9ec13fc7a8c3be97ccc005f3108 Mon Sep 17 00:00:00 2001 From: eulerstorage Date: Fri, 17 Jan 2020 16:16:18 +0800 Subject: [PATCH] add the -q never option while executing smartd command in smartd.service --- smartmontools.spec | 13 +++++++++++-- smartmontools.sysconf | 3 +++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 smartmontools.sysconf diff --git a/smartmontools.spec b/smartmontools.spec index bd00378..0edc290 100644 --- a/smartmontools.spec +++ b/smartmontools.spec @@ -1,12 +1,13 @@ Name: smartmontools Version: 6.6 -Release: 7 +Release: 8 Epoch: 1 Summary: S.M.A.R.T. utility toolset License: GPLv2+ URL: http://smartmontools.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +Source1: smartmontools.sysconf Patch6000: 6000-os_linux.cpp-os_netbsd.cpp-fix-crash-on-scan-if-WITH.patch Patch6001: 6001-ataprint.cpp-Fix-detection-of-Device-Statistics-log-.patch @@ -56,11 +57,12 @@ autoreconf -i %configure --with-selinux --with-libcap-ng=yes --with-systemdsystemunitdir=%{_unitdir} --sysconfdir=%{_sysconfdir}/%{name}/ make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS -fpie" LDFLAGS="-pie -Wl,-z,relro,-z,now" +sed -i 's|/etc/smartmontools/sysconfig|/etc/sysconfig|g' smartd.service %install %make_install - +install -D -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/smartmontools mkdir -p %{buildroot}%{_sysconfdir}/%{name}/smartd_warning.d mkdir -p %{buildroot}%{_sharedstatedir}/%{name} @@ -79,6 +81,7 @@ mkdir -p %{buildroot}%{_sharedstatedir}/%{name} %dir %{_sysconfdir}/%{name}/smartd_warning.d %config(noreplace) %{_sysconfdir}/%{name}/smartd.conf %config(noreplace) %{_sysconfdir}/%{name}/smartd_warning.sh +%config(noreplace) %{_sysconfdir}/sysconfig/smartmontools %{_unitdir}/smartd.service %{_sbindir}/{smartd,update-smart-drivedb,smartctl} %{_datadir}/%{name} @@ -90,6 +93,12 @@ mkdir -p %{buildroot}%{_sharedstatedir}/%{name} %changelog +* Fri Jan 17 2020 openEuler Buildteam - 1:6.6-8 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add the "-q never" option while executing smartd command in smartd.service + * Sat Jan 11 2020 openEuler Buildteam - 1:6.6-7 - Type:enhancemnet - ID:NA diff --git a/smartmontools.sysconf b/smartmontools.sysconf new file mode 100644 index 0000000..2b2364c --- /dev/null +++ b/smartmontools.sysconf @@ -0,0 +1,3 @@ +# options for smartd +# Add -q never for never quit otherwise the smartd.service may failed while no devices to scan +smartd_opts="-q never" -- Gitee