SHA256
1
0
forked from pool/mdadm

Accepting request 29763 from home:michal-m:branches:Base:System

Copy from home:michal-m:branches:Base:System/mdadm via accept of submit request 29763 revision 2.
Request was accepted with message:
Reviewed ok

OBS-URL: https://build.opensuse.org/request/show/29763
OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=12
This commit is contained in:
Michal Marek
2010-01-15 16:44:42 +00:00
committed by Git OBS Bridge
parent b9f2c8ae10
commit b593e3099a
5 changed files with 81 additions and 45 deletions

View File

@@ -70,13 +70,25 @@ install -m 755 %{S:5} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/setup-md.sh
install -m 755 %{S:6} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-md.sh
install -m 644 %{S:2} $RPM_BUILD_ROOT%{_var}/adm/fillup-templates/
ln -sf ../../etc/init.d/mdadmd $RPM_BUILD_ROOT/%{_sbindir}/rcmdadmd
install -d $RPM_BUILD_ROOT/var/run/mdadm
rm -rf $RPM_BUILD_ROOT/var/run/mdadm
mkdir -p $RPM_BUILD_ROOT/var/run
ln -s mdadm $RPM_BUILD_ROOT/var/run/mdadm
# remove here, using the one in the udev package
rm -f $RPM_BUILD_ROOT/lib/udev/rules.d/64-md-raid.rules
%post
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
%{fillup_and_insserv -y boot.md}
mkdir -p /dev/.mdadm
# replace the /var/run/mdadm directory (installed by sle11/11.1) with
# a symlink pointing to /dev/.mdadm. Do not do this when /var/run/mdadm is
# not empty, let /etc/init.d/boot.md do it at the next reboot.
if test -e /var/run/mdadm -a ! /var/run/mdadm -ef /dev/.mdadm; then
if ! rmdir /var/run/mdadm 2>/dev/null; then
exit 0
fi
ln -s /dev/.mdadm /var/run/mdadm
fi
%postun
%restart_on_update mdadmd
@@ -100,7 +112,7 @@ rm -rf $RPM_BUILD_ROOT
%dir /lib/udev/devices
%{_sbindir}/*
%{_var}/adm/fillup-templates/sysconfig.mdadm
%dir /var/run/mdadm
%ghost /var/run/mdadm
%dir /lib/mkinitrd
%dir /lib/mkinitrd/scripts
/lib/mkinitrd/scripts/setup-md.sh