1.0.21 bump

This commit is contained in:
Petr Šabata 2011-11-24 15:13:00 +01:00
parent 0c4457cd82
commit 9e6f8f8e09
4 changed files with 8 additions and 116 deletions

1
.gitignore vendored
View File

@ -33,3 +33,4 @@ fcoe-utils-*.rpm
/fcoe-utils-1.0.18.tar.bz2 /fcoe-utils-1.0.18.tar.bz2
/fcoe-utils-1.0.19.tar.bz2 /fcoe-utils-1.0.19.tar.bz2
/fcoe-utils-1.0.20.tar.bz2 /fcoe-utils-1.0.20.tar.bz2
/fcoe-utils-1.0.21.tar.bz2

View File

@ -1,111 +0,0 @@
diff --git a/etc/initd/initd.fedora b/etc/initd/initd.fedora
index 5c84e25..f3f3d91 100755
--- a/etc/initd/initd.fedora
+++ b/etc/initd/initd.fedora
@@ -15,7 +15,7 @@
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
#
-# chkconfig: - 21 80
+# chkconfig: 2345 21 80
#
# Maintained at www.Open-FCoE.org
@@ -23,7 +23,7 @@
# Provides: fcoe
# Required-Start: network
# Required-Stop:
-# Default-Start:
+# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Open-FCoE Initiator
# Description: Open-FCoE Initiator
@@ -63,6 +63,16 @@ test -x $FCOEMON || {
fi
}
+have_fcoe_root() {
+ # This simply checks if root is on a net device
+ local rootopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $4; }}' /etc/mtab)
+ if [[ "$rootopts" =~ "_netdev" ]]; then
+ return 0
+ else
+ return 1
+ fi
+}
+
start()
{
echo -n $"Starting FCoE initiator service: "
@@ -75,26 +85,59 @@ start()
echo
touch /var/lock/subsys/fcoe
+ # Wait for the _netdev devices
+ if [ "$WAIT_TIMEOUT" = "" ]; then
+ WAIT_TIMEOUT=65
+ fi
+ local donewait=1
+ local devs=($(egrep 'by-path\/fc-.*_netdev' /etc/fstab | cut -d ' ' -f1))
+ if [ "$devs" != "" ]; then
+ echo -n "Waiting for FCoE devices . "
+ while [ $WAIT_TIMEOUT -gt 0 ]; do
+ for disk in ${devs[*]}; do
+ if ! test -b $disk; then
+ donewait=0
+ break
+ fi
+ done
+ test $donewait -eq 1 && break;
+ sleep 1
+ echo -n ". "
+ donewait=1
+ WAIT_TIMEOUT=$(($WAIT_TIMEOUT-1))
+ done
+ if [ "$WAIT_TIMEOUT" -eq 0 ]; then
+ echo "timed out!"
+ else
+ echo "done!"
+ fi
+ fi
+
echo
}
stop()
{
- local force=$1
-
- pid=$(pidof "$FCOEMON")
- if [ "$force" == "force" ]
- then
- action "Destroying any active fcoe interface/s"
- [ "$pid" ] && kill -HUP $pid
+ if have_fcoe_root; then
+ echo $"Possible FCoE root detected, not stopping FCoE."
+ exit 1
else
- [ "$pid" ] && kill -TERM $pid
- fi
+ local force=$1
+
+ pid=$(pidof "$FCOEMON")
+ if [ "$force" == "force" ]
+ then
+ action "Destroying any active fcoe interface/s"
+ [ "$pid" ] && kill -HUP $pid
+ else
+ [ "$pid" ] && kill -TERM $pid
+ fi
- action $"Stopping FCoE initiator service: "
+ action $"Stopping FCoE initiator service: "
- rm -f ${PID_FILE}
- rm -f /var/lock/subsys/fcoe
+ rm -f ${PID_FILE}
+ rm -f /var/lock/subsys/fcoe
+ fi
}
status()

View File

@ -2,8 +2,8 @@
%define _hardened_build 1 %define _hardened_build 1
Name: fcoe-utils Name: fcoe-utils
Version: 1.0.20 Version: 1.0.21
Release: 5%{?dist} Release: 1%{?dist}
Summary: Fibre Channel over Ethernet utilities Summary: Fibre Channel over Ethernet utilities
Group: Applications/System Group: Applications/System
License: GPLv2 License: GPLv2
@ -14,13 +14,13 @@ Source1: quickstart.txt
Source2: fcoe.service Source2: fcoe.service
Source3: fcoe.config Source3: fcoe.config
# Generic Fedora patches # Generic Fedora patches
Patch0: fcoe-utils-1.0.20-init.patch
Patch1: fcoe-utils-1.0.19-make.patch Patch1: fcoe-utils-1.0.19-make.patch
Patch2: fcoe-utils-1.0.18-help.patch Patch2: fcoe-utils-1.0.18-help.patch
Patch3: fcoe-utils-1.0.18-config.patch Patch3: fcoe-utils-1.0.18-config.patch
BuildRequires: libtool automake autoconf BuildRequires: libtool automake autoconf
BuildRequires: lldpad-devel >= 0.9.43 BuildRequires: lldpad-devel >= 0.9.43
BuildRequires: libhbaapi-devel >= 2.2-12 BuildRequires: libhbaapi-devel >= 2.2-12
BuildRequires: libhbalinux-devel >= 1.0.13
BuildRequires: libnl-devel BuildRequires: libnl-devel
BuildRequires: systemd-units BuildRequires: systemd-units
Requires: lldpad >= 0.9.43 Requires: lldpad >= 0.9.43
@ -39,7 +39,6 @@ or lldpad
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .init
%patch1 -p1 -b .make %patch1 -p1 -b .make
%patch2 -p1 -b .help %patch2 -p1 -b .help
%patch3 -p1 -b .config %patch3 -p1 -b .config
@ -97,6 +96,9 @@ fi
%changelog %changelog
* Thu Nov 24 2011 Petr Šabata <contyk@redhat.com> - 1.0.21-1
- 1.0.21 bump
* Mon Oct 31 2011 Petr Sabata <contyk@redhat.com> - 1.0.20-5 * Mon Oct 31 2011 Petr Sabata <contyk@redhat.com> - 1.0.20-5
- Remove useless PIDFile from fcoe.service unit file - Remove useless PIDFile from fcoe.service unit file

View File

@ -1 +1 @@
d23061aa7e353c5df14cc2429314117b fcoe-utils-1.0.20.tar.bz2 f24599efe32c49bc9357620405e57064 fcoe-utils-1.0.21.tar.bz2