SHA256
1
0
forked from pool/dmraid
OBS User unknown 2008-07-24 20:19:53 +00:00 committed by Git OBS Bridge
parent 65f28fd8b3
commit 4f0e5b971c
4 changed files with 66 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Jul 23 15:27:07 CEST 2008 - hare@suse.de
- Include mkinitrd scriptlets.
-------------------------------------------------------------------
Wed Mar 12 16:24:06 CET 2008 - mkoenig@suse.de

View File

@ -20,11 +20,13 @@ Group: System/Base
AutoReqProv: on
Summary: A Device-Mapper Software RAID Support Tool
Version: 1.0.0.rc14
Release: 48
Release: 69
Source: ftp://people.redhat.com/heinzm/sw/dmraid/src/dmraid-%{version}.tar.bz2
Source1: sysconfig.dmraid
Source2: boot.dmraid
Source3: README.SuSE
Source4: mkinitrd-setup.sh
Source5: mkinitrd-boot.sh
Patch0: dmraid_fixup_paths3.diff
Patch1: dmraid-add_uuid.patch
Patch2: dmraid_fixup_nvidia.diff
@ -101,6 +103,9 @@ 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
install -d $RPM_BUILD_ROOT/lib/mkinitrd/scripts
install -m 755 %{S:4} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/setup-dmraid.sh
install -m 755 %{S:5} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-dmraid.sh
%post
%{fillup_only}
@ -120,8 +125,14 @@ install -m744 %{SOURCE2} $RPM_BUILD_ROOT/etc/init.d/boot.dmraid
%doc LICENSE LICENSE_GPL LICENSE_LGPL README README.SuSE TODO doc/*
/var/adm/fillup-templates/sysconfig.dmraid
/etc/init.d/boot.dmraid
%dir /lib/mkinitrd
%dir /lib/mkinitrd/scripts
/lib/mkinitrd/scripts/setup-dmraid.sh
/lib/mkinitrd/scripts/boot-dmraid.sh
%changelog
* Wed Jul 23 2008 hare@suse.de
- Include mkinitrd scriptlets.
* Wed Mar 12 2008 mkoenig@suse.de
- add hack to avoid segfault with DDF1 metadata and explicit
indication of the raid set [#367686]

21
mkinitrd-boot.sh Normal file
View File

@ -0,0 +1,21 @@
#!/bin/bash
#%stage: block
#%depends: dm
#%provides: dmroot
#%programs: /sbin/dmraid
#%if: -n "$root_dmraid"
#
##### Device Mapper Raid
##
## If the root device uses a software raid based on device mapper,
## this initializes and waits for the device to appear.
##
## Command line parameters
## -----------------------
##
## root_dmraid=1 use device mapper raid
##
/sbin/dmraid -a y -p
wait_for_events

28
mkinitrd-setup.sh Normal file
View File

@ -0,0 +1,28 @@
#!/bin/bash
#
#%stage: devicemapper
#%provides: dmroot
#
if [ -x /sbin/dmraid -a -x /sbin/dmsetup ] ; then
newbd=
for bd in $blockdev ; do
update_blockdev $bd
if [ $blockdriver = device-mapper ]; then
dm_uuid=$(dmsetup info -c --noheadings -o uuid -j $blockmajor -m $blockminor)
dm_creator=${dm_uuid%-*}
if [ "$dm_creator" = "dmraid" ]; then
tmp_root_dm=1 # dmraid needs dm
root_dmraid=1
newbd="$newbd $(echo $bd | sed 's/\([a-z]\)[0-9]*$/\1/')"
else
newbd="$newbd $bd"
fi
else
newbd="$newbd $bd"
fi
done
blockdev="$newbd"
fi
save_var root_dmraid