This commit is contained in:
parent
fdf5000b9a
commit
4590fb37eb
59
boot.dmraid
Normal file
59
boot.dmraid
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (c) 2007 SuSE GmbH Nuernberg, Germany. All rights reserved.
|
||||||
|
#
|
||||||
|
# /etc/init.d/boot.dmraid
|
||||||
|
#
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: boot.dmraid
|
||||||
|
# Required-Start: boot.device-mapper boot.udev boot.rootfsck
|
||||||
|
# Should-Start: boot.multipath boot.md boot.scsidev
|
||||||
|
# Default-Start: B
|
||||||
|
# Default-Stop:
|
||||||
|
# Description: start dmraid
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
. /etc/rc.status
|
||||||
|
. /etc/sysconfig/dmraid
|
||||||
|
|
||||||
|
DMRAID=/sbin/dmraid
|
||||||
|
test -x $DMRAID || { echo "dmraid not installed";
|
||||||
|
if [ "$1" = "stop" ]; then exit 0;
|
||||||
|
else exit 5; fi; }
|
||||||
|
|
||||||
|
# udev interaction
|
||||||
|
if [ -x /sbin/udevsettle ]; then
|
||||||
|
[ -z "$DMRAID_DEVICE_TIMEOUT" ] && DMRAID_DEVICE_TIMEOUT=60
|
||||||
|
else
|
||||||
|
DMRAID_DEVICE_TIMEOUT=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
rc_reset
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
# Waiting for udev to settle
|
||||||
|
if [ "$DMRAID_DEVICE_TIMEOUT" -gt 0 ] ; then
|
||||||
|
echo "Waiting for udev to settle..."
|
||||||
|
/sbin/udevsettle --timeout=$DMRAID_DEVICE_TIMEOUT
|
||||||
|
fi
|
||||||
|
echo "Activating dmraid..."
|
||||||
|
$DMRAID -ay $DMRAID_START_OPTIONS
|
||||||
|
|
||||||
|
rc_status -v -r
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
$DMRAID -an $DMRAID_STOP_OPTIONS
|
||||||
|
rc_status -v
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
rc_failed 4
|
||||||
|
rc_status -v
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|status}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
rc_exit
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 20 14:44:36 CET 2007 - mkoenig@suse.de
|
||||||
|
|
||||||
|
- provide boot script [#230708]
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Dec 11 10:48:21 CET 2006 - mkoenig@suse.de
|
Mon Dec 11 10:48:21 CET 2006 - mkoenig@suse.de
|
||||||
|
|
||||||
|
23
dmraid.spec
23
dmraid.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package dmraid (Version 1.0.0.rc13)
|
# spec file for package dmraid (Version 1.0.0.rc13)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
# This file and all modifications and additions to the pristine
|
# This file and all modifications and additions to the pristine
|
||||||
# package are under the same license as the package itself.
|
# package are under the same license as the package itself.
|
||||||
#
|
#
|
||||||
@ -18,8 +18,10 @@ Group: System/Base
|
|||||||
Autoreqprov: on
|
Autoreqprov: on
|
||||||
Summary: A Device-Mapper Software RAID Support Tool
|
Summary: A Device-Mapper Software RAID Support Tool
|
||||||
Version: 1.0.0.rc13
|
Version: 1.0.0.rc13
|
||||||
Release: 10
|
Release: 18
|
||||||
Source: ftp://people.redhat.com/heinzm/sw/dmraid/src/dmraid-%{version}.tar.bz2
|
Source: ftp://people.redhat.com/heinzm/sw/dmraid/src/dmraid-%{version}.tar.bz2
|
||||||
|
Source1: sysconfig.dmraid
|
||||||
|
Source2: boot.dmraid
|
||||||
Patch0: dmraid_fixup_paths3.diff
|
Patch0: dmraid_fixup_paths3.diff
|
||||||
Patch1: dmraid-add_uuid.patch
|
Patch1: dmraid-add_uuid.patch
|
||||||
Patch2: dmraid_fixup_nvidia.diff
|
Patch2: dmraid_fixup_nvidia.diff
|
||||||
@ -28,6 +30,7 @@ Patch4: dmraid-1.0.0.rc13-geometry.patch
|
|||||||
Patch5: dmraid-1.0.0.rc13-jm_termination.patch
|
Patch5: dmraid-1.0.0.rc13-jm_termination.patch
|
||||||
Patch6: dmraid-1.0.0.rc13-fix_macro.patch
|
Patch6: dmraid-1.0.0.rc13-fix_macro.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
PreReq: %fillup_prereq
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This software discovers, activates, deactivates, and displays
|
This software discovers, activates, deactivates, and displays
|
||||||
@ -86,6 +89,16 @@ export CFLAGS="$RPM_OPT_FLAGS"
|
|||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
rm -rf $RPM_BUILD_ROOT/usr/include/dmraid
|
rm -rf $RPM_BUILD_ROOT/usr/include/dmraid
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/libdmraid.a
|
rm $RPM_BUILD_ROOT%{_libdir}/libdmraid.a
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
|
||||||
|
install -m644 %{SOURCE1} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.dmraid
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||||
|
install -m744 %{SOURCE2} $RPM_BUILD_ROOT/etc/init.d/boot.dmraid
|
||||||
|
|
||||||
|
%post
|
||||||
|
%{fillup_only}
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%{insserv_cleanup}
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] \
|
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] \
|
||||||
@ -97,8 +110,12 @@ rm $RPM_BUILD_ROOT%{_libdir}/libdmraid.a
|
|||||||
/sbin/dmraid
|
/sbin/dmraid
|
||||||
%{_mandir}/man8/*
|
%{_mandir}/man8/*
|
||||||
%doc LICENSE LICENSE_GPL LICENSE_LGPL README TODO doc/*
|
%doc LICENSE LICENSE_GPL LICENSE_LGPL README TODO doc/*
|
||||||
|
/var/adm/fillup-templates/sysconfig.dmraid
|
||||||
|
/etc/init.d/boot.dmraid
|
||||||
|
|
||||||
%changelog -n dmraid
|
%changelog
|
||||||
|
* Tue Feb 20 2007 - mkoenig@suse.de
|
||||||
|
- provide boot script [#230708]
|
||||||
* Mon Dec 11 2006 - mkoenig@suse.de
|
* Mon Dec 11 2006 - mkoenig@suse.de
|
||||||
- fix jm name string termination problem [#223843]
|
- fix jm name string termination problem [#223843]
|
||||||
patch: dmraid-1.0.0.rc13-jm_termination.patch
|
patch: dmraid-1.0.0.rc13-jm_termination.patch
|
||||||
|
26
sysconfig.dmraid
Normal file
26
sysconfig.dmraid
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
## Path: System/File systems/dmraid
|
||||||
|
## Description: dmraid configuration
|
||||||
|
#
|
||||||
|
## Type: integer(0:)
|
||||||
|
## Default: 60
|
||||||
|
#
|
||||||
|
# Timeout for udev device detection. This is the upper limit which the
|
||||||
|
# boot script will wait for udev to finish hotplug event processing.
|
||||||
|
# If not all devices are detected during boot this value should be
|
||||||
|
# increased. Setting this to '0' disables waiting for udev.
|
||||||
|
#
|
||||||
|
DMRAID_DEVICE_TIMEOUT="60"
|
||||||
|
|
||||||
|
## Type: string
|
||||||
|
## Default: ""
|
||||||
|
#
|
||||||
|
# Commandline options for dmraid on start
|
||||||
|
#
|
||||||
|
DMRAID_START_OPTIONS=""
|
||||||
|
|
||||||
|
## Type: string
|
||||||
|
## Default: ""
|
||||||
|
#
|
||||||
|
# Commandline options for dmraid on stop
|
||||||
|
#
|
||||||
|
DMRAID_STOP_OPTIONS=""
|
Loading…
Reference in New Issue
Block a user