diff --git a/mdadm-2.6.2-file-leak.patch b/mdadm-2.6.2-file-leak.patch index 7ada947..27fb15d 100644 --- a/mdadm-2.6.2-file-leak.patch +++ b/mdadm-2.6.2-file-leak.patch @@ -1,5 +1,15 @@ ---- mdadm-2.6.2/mdstat.c.fileleak 2007-07-02 12:25:01.000000000 -0400 -+++ mdadm-2.6.2/mdstat.c 2007-07-02 12:25:04.000000000 -0400 +--- mdadm-2.6.2/Monitor.c.leak 2007-07-06 12:20:05.000000000 -0400 ++++ mdadm-2.6.2/Monitor.c 2007-07-06 12:21:44.000000000 -0400 +@@ -234,6 +234,7 @@ int Monitor(mddev_dev_t devlist, + */ st->err=1; + continue; + } ++ fcntl(fd, F_SETFD, FD_CLOEXEC); + if (ioctl(fd, GET_ARRAY_INFO, &array)<0) { + if (!st->err) + alert("DeviceDisappeared", dev, NULL, +--- mdadm-2.6.2/mdstat.c.leak 2006-12-18 21:35:17.000000000 -0500 ++++ mdadm-2.6.2/mdstat.c 2007-07-06 12:19:55.000000000 -0400 @@ -114,6 +114,8 @@ struct mdstat_ent *mdstat_read(int hold, f = fopen("/proc/mdstat", "r"); if (f == NULL) diff --git a/mdadm.spec b/mdadm.spec index 26a7941..41d747a 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -1,7 +1,7 @@ Summary: The mdadm program controls Linux md devices (software RAID arrays) Name: mdadm Version: 2.6.2 -Release: 2%{?dist} +Release: 3%{?dist} Source: http://www.cse.unsw.edu.au/~neilb/source/mdadm/mdadm-%{version}.tgz Source1: mdmonitor.init Patch1: mdadm-2.5.2-s390-build.patch @@ -89,6 +89,11 @@ fi %attr(0700,root,root) %dir /var/run/mdadm %changelog +* Fri Jul 06 2007 Doug Ledford - 2.6.2-3 +- Oops, had to update the file leak patch, missed one thing +- Minor tweak to return codes in init script and add LSB header +- Resolves: bz244582, bz246980 + * Mon Jul 02 2007 Doug Ledford - 2.6.2-2 - Fix a file leak issue when mdadm is in monitor mode - Update mdadm init script so that status will always run and so diff --git a/mdmonitor.init b/mdmonitor.init index 7b35798..c9aa941 100755 --- a/mdmonitor.init +++ b/mdmonitor.init @@ -7,8 +7,18 @@ # description: software RAID monitoring and management # config: /etc/mdadm.conf # - # Copyright 2002 Red Hat, Inc. +# +### BEGIN INIT INFO +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start and stop the MD software RAID monitor +# Description: The mdmonitor service checks the status of all software +# RAID arrays on the system. In the event that any of the arrays +# transition into a degraded state, it notifies the system +# administrator. Other options are available, see the mdadm.conf +# and mdadm man pages for possible ways to configure this service. +### END INIT INFO PIDFILE=/var/run/mdadm/mdadm.pid PATH=/sbin:/usr/sbin:$PATH @@ -23,7 +33,7 @@ prog=mdmonitor usage () { - echo "Usage: service $prog {start|stop|status|restart|condrestart}" + echo "Usage: service $prog {start|stop|status|restart|try-restart|force-reload}" RETVAL=1 } @@ -47,7 +57,7 @@ start () stop () { - [ -f /var/lock/subsys/$prog ] || return 7 + [ -f /var/lock/subsys/$prog ] || return 0 echo -n "Killing $prog: " killproc mdadm echo @@ -73,6 +83,8 @@ case "$1" in restart) restart; RETVAL=$? ;; reload) RETVAL=3 ;; condrestart) condrestart; RETVAL=$? ;; + try-restart) condrestart; RETVAL=$? ;; + force-reload) condrestart; RETVAL=$? ;; *) usage ; RETVAL=2 ;; esac