rpms/smartmontools/F-11 smartd.initd, 1.7, 1.8 smartmontools-5.38-lowcap.patch, 1.2, 1.3 smartmontools.spec, 1.57, 1.58
Michal Hlavinka
mhlavink at fedoraproject.org
Fri Oct 9 09:11:47 UTC 2009
Author: mhlavink
Update of /cvs/extras/rpms/smartmontools/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv24032
Modified Files:
smartd.initd smartmontools-5.38-lowcap.patch
smartmontools.spec
Log Message:
make init script lsb compliant (#528016)
Index: smartd.initd
===================================================================
RCS file: /cvs/extras/rpms/smartmontools/F-11/smartd.initd,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- smartd.initd 12 May 2008 10:17:58 -0000 1.7
+++ smartd.initd 9 Oct 2009 09:11:47 -0000 1.8
@@ -46,9 +46,13 @@ SMARTD_BIN=/usr/sbin/smartd
RETVAL=0
prog=smartd
pidfile=/var/lock/subsys/smartd
+config=/etc/smartd.conf
start()
{
+ [ $UID -eq 0 ] || exit 4
+ [ -x $SMARTD_BIN ] || exit 5
+ [ -f $config ] || exit 6
echo -n $"Starting $prog: "
daemon $SMARTD_BIN $smartd_opts
RETVAL=$?
@@ -59,6 +63,7 @@ start()
stop()
{
+ [ $UID -eq 0 ] || exit 4
echo -n $"Shutting down $prog: "
killproc $SMARTD_BIN
RETVAL=$?
@@ -102,7 +107,7 @@ case "$1" in
stop
start
;;
- try-restart)
+ condrestart|try-restart)
if [ -f $pidfile ]; then
stop
start
@@ -116,8 +121,9 @@ case "$1" in
RETVAL=$?
;;
*)
- echo $"Usage: $0 {start|stop|reload|force-reload|report|restart|try-restart|status}"
- RETVAL=3
+ echo $"Usage: $0 {start|stop|restart|status|condrestart|try-restart|reload|force-reload|report}"
+ RETVAL=2
+ [ $1 = 'usage' ] && RETVAL=0
esac
exit $RETVAL
smartmontools-5.38-lowcap.patch:
Makefile.am | 2 +-
configure.in | 34 ++++++++++++++++++++++++++++++++++
smartd.8.in | 6 ++++++
smartd.cpp | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
4 files changed, 96 insertions(+), 3 deletions(-)
Index: smartmontools-5.38-lowcap.patch
===================================================================
RCS file: /cvs/extras/rpms/smartmontools/F-11/smartmontools-5.38-lowcap.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- smartmontools-5.38-lowcap.patch 5 Oct 2009 14:02:21 -0000 1.2
+++ smartmontools-5.38-lowcap.patch 9 Oct 2009 09:11:47 -0000 1.3
@@ -1,6 +1,6 @@
diff -up smartmontools-5.38/configure.in.lowcap smartmontools-5.38/configure.in
---- smartmontools-5.38/configure.in.lowcap 2009-10-05 15:45:16.419171091 +0200
-+++ smartmontools-5.38/configure.in 2009-10-05 15:45:16.425170899 +0200
+--- smartmontools-5.38/configure.in.lowcap 2009-10-09 10:19:22.395700024 +0200
++++ smartmontools-5.38/configure.in 2009-10-09 10:19:22.431698988 +0200
@@ -143,6 +143,40 @@ if test "$with_selinux" = "yes"; then
AC_DEFINE(WITH_SELINUX, [1], [Define to 1 if SELinux support is enabled])
fi
@@ -44,7 +44,7 @@ diff -up smartmontools-5.38/configure.in
if test "$mandir" = '${prefix}/man'; then
diff -up smartmontools-5.38/Makefile.am.lowcap smartmontools-5.38/Makefile.am
--- smartmontools-5.38/Makefile.am.lowcap 2007-04-01 18:49:44.000000000 +0200
-+++ smartmontools-5.38/Makefile.am 2009-10-05 15:45:16.426170991 +0200
++++ smartmontools-5.38/Makefile.am 2009-10-09 10:19:22.434699065 +0200
@@ -35,7 +35,7 @@ smartd_SOURCES = smartd.cpp \
utility.cpp \
utility.h
@@ -56,7 +56,7 @@ diff -up smartmontools-5.38/Makefile.am.
EXTRA_smartd_SOURCES = os_darwin.cpp \
diff -up smartmontools-5.38/smartd.8.in.lowcap smartmontools-5.38/smartd.8.in
--- smartmontools-5.38/smartd.8.in.lowcap 2008-03-04 23:09:47.000000000 +0100
-+++ smartmontools-5.38/smartd.8.in 2009-10-05 15:46:16.711483245 +0200
++++ smartmontools-5.38/smartd.8.in 2009-10-09 10:19:22.439699030 +0200
@@ -145,6 +145,12 @@ input. This is useful for commands like:
to perform quick and simple checks without a configuration file.
@@ -71,8 +71,8 @@ diff -up smartmontools-5.38/smartd.8.in.
Runs \fBsmartd\fP in "debug" mode. In this mode, it displays status
information to STDOUT rather than logging it to SYSLOG and does not
diff -up smartmontools-5.38/smartd.cpp.lowcap smartmontools-5.38/smartd.cpp
---- smartmontools-5.38/smartd.cpp.lowcap 2009-10-05 15:45:16.412170973 +0200
-+++ smartmontools-5.38/smartd.cpp 2009-10-05 15:45:16.434170827 +0200
+--- smartmontools-5.38/smartd.cpp.lowcap 2009-10-09 10:19:22.312699527 +0200
++++ smartmontools-5.38/smartd.cpp 2009-10-09 10:43:45.294698988 +0200
@@ -74,6 +74,10 @@ extern "C" int __stdcall FreeConsole(voi
#include <io.h> // setmode()
#endif // __CYGWIN__
@@ -134,15 +134,26 @@ diff -up smartmontools-5.38/smartd.cpp.l
PrintOut(LOG_INFO," -V Print License, Copyright, and version information\n");
#endif
}
-@@ -3890,6 +3916,7 @@ void ParseOpts(int argc, char **argv){
+@@ -3866,7 +3892,7 @@ void ParseOpts(int argc, char **argv){
+ char *tailptr;
+ long lchecktime;
+ // Please update GetValidArgList() if you edit shortopts
+- const char *shortopts = "c:l:q:dDni:p:r:Vh?";
++ const char *shortopts = "c:l:q:dDni:p:r:VCh?";
+ #ifdef HAVE_GETOPT_LONG
+ char *arg;
+ // Please update GetValidArgList() if you edit longopts
+@@ -3890,6 +3916,9 @@ void ParseOpts(int argc, char **argv){
{ "copyright", no_argument, 0, 'V' },
{ "help", no_argument, 0, 'h' },
{ "usage", no_argument, 0, 'h' },
++#ifdef HAVE_LIBCAP_NG
+ { "usecapabilities",no_argument, 0, 'C' },
++#endif
{ 0, 0, 0, 0 }
};
#endif
-@@ -4030,6 +4057,12 @@ void ParseOpts(int argc, char **argv){
+@@ -4030,6 +4059,12 @@ void ParseOpts(int argc, char **argv){
PrintCopyleft();
EXIT(0);
break;
@@ -155,7 +166,7 @@ diff -up smartmontools-5.38/smartd.cpp.l
case 'h':
// help: print summary of command-line options
debugmode=1;
-@@ -4408,6 +4441,16 @@ static int smartd_main(int argc, char **
+@@ -4408,6 +4443,16 @@ static int smartd_main(int argc, char **
// don't exit on bad checksums
con->checksumfail=0;
@@ -172,7 +183,7 @@ diff -up smartmontools-5.38/smartd.cpp.l
// the main loop of the code
while (1){
-@@ -4482,7 +4525,15 @@ static int smartd_main(int argc, char **
+@@ -4482,7 +4527,15 @@ static int smartd_main(int argc, char **
PrintTestSchedule(ATAandSCSIdevlist);
EXIT(0);
}
Index: smartmontools.spec
===================================================================
RCS file: /cvs/extras/rpms/smartmontools/F-11/smartmontools.spec,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -p -r1.57 -r1.58
--- smartmontools.spec 5 Oct 2009 14:02:21 -0000 1.57
+++ smartmontools.spec 9 Oct 2009 09:11:47 -0000 1.58
@@ -1,6 +1,6 @@
Name: smartmontools
Version: 5.38
-Release: 14%{?dist}
+Release: 15%{?dist}
Epoch: 1
Summary: Tools for monitoring SMART capable hard disks
Group: System Environment/Base
@@ -79,7 +79,10 @@ fi
%config(noreplace) %{_sysconfdir}/sysconfig/smartmontools
%changelog
-* Mon Oct 05 2009 Michal Hlaivnka <mhlavink at redhat.com> - 1:5.38-14
+* Fri Oct 09 2009 Michal Hlavinka <mhlavink at redhat.com> - 1:5.38-15
+- make init script lsb compliant (#528016)
+
+* Mon Oct 05 2009 Michal Hlavinka <mhlavink at redhat.com> - 1:5.38-14
- make capabilities optional
- fix capabilities for 3ware contollers (#526626)
More information about the fedora-extras-commits
mailing list