This commit is contained in:
parent
e3d86c8b5f
commit
0e7d8d6162
44
boot.md
44
boot.md
@ -75,8 +75,6 @@ rc_reset
|
|||||||
# considered a success.
|
# considered a success.
|
||||||
|
|
||||||
mdadm_BIN=/sbin/mdadm
|
mdadm_BIN=/sbin/mdadm
|
||||||
mdrun_BIN=/sbin/mdrun
|
|
||||||
raidautorun_BIN=/sbin/raidautorun
|
|
||||||
mdadm_CONFIG="/etc/mdadm.conf"
|
mdadm_CONFIG="/etc/mdadm.conf"
|
||||||
mdadm_SYSCONFIG="/etc/sysconfig/mdadm"
|
mdadm_SYSCONFIG="/etc/sysconfig/mdadm"
|
||||||
|
|
||||||
@ -108,7 +106,6 @@ case "$1" in
|
|||||||
|
|
||||||
# Check for missing binaries (stale symlinks should not happen)
|
# Check for missing binaries (stale symlinks should not happen)
|
||||||
[ -x $mdadm_BIN ] || _rc_exit 5 "... $mdadm_BIN not installed "
|
[ -x $mdadm_BIN ] || _rc_exit 5 "... $mdadm_BIN not installed "
|
||||||
[ -x $mdrun_BIN ] || _rc_exit 5 "... $mdrun_BIN not installed "
|
|
||||||
|
|
||||||
# Try to load md_mod
|
# Try to load md_mod
|
||||||
[ ! -f /proc/mdstat -a -x /sbin/modprobe ] && /sbin/modprobe -k md_mod 2>&1 | :
|
[ ! -f /proc/mdstat -a -x /sbin/modprobe ] && /sbin/modprobe -k md_mod 2>&1 | :
|
||||||
@ -119,20 +116,35 @@ case "$1" in
|
|||||||
/sbin/udevsettle --timeout="$MDADM_DEVICE_TIMEOUT"
|
/sbin/udevsettle --timeout="$MDADM_DEVICE_TIMEOUT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fallback to raidautorun / mdrun when $mdadm_CONFIG missing
|
if test "$BOOT_MD_USE_MDADM_CONFIG" = "yes" -a -s "$mdadm_CONFIG"; then
|
||||||
# or mdadm exits with an error
|
if ! grep -q '[^[:blank:]]' $mdadm_CONFIG; then
|
||||||
[ "$BOOT_MD_USE_MDADM_CONFIG" = "yes" -a -s "$mdadm_CONFIG" ]
|
# empty /etc/mdadm.conf, "unused"
|
||||||
[ $? = 0 ] && { $mdadm_BIN -A -s -c $mdadm_CONFIG || rc_failed 1; }
|
rc_status -u
|
||||||
if [ $? != 0 ]; then
|
fi
|
||||||
if test -b /dev/md0; then
|
if ! $mdadm_BIN -A -s -c $mdadm_CONFIG; then
|
||||||
$raidautorun_BIN
|
rc_failed 1
|
||||||
else
|
rc_status -v
|
||||||
$mdrun_BIN
|
fi
|
||||||
|
else
|
||||||
|
# do auto-assemly only if /etc/mdadm.conf is missing
|
||||||
|
rm -f /tmp/mdadm.conf
|
||||||
|
if ! mdadm --examine --scan --config=partitions >/tmp/mdadm.conf
|
||||||
|
then
|
||||||
|
rc_failed 1
|
||||||
|
rc_status -v
|
||||||
|
fi
|
||||||
|
if test -s /tmp/mdadm.conf; then
|
||||||
|
if ! mdadm --assemble --scan --config=/tmp/mdadm.conf
|
||||||
|
then
|
||||||
|
rc_failed 1
|
||||||
|
rc_status -v
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# partitions found, "unused"
|
||||||
|
rc_status -u
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
# Remember status and be verbose
|
fi
|
||||||
rc_status -v
|
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
echo -n "Shutting down MD Raid "
|
echo -n "Shutting down MD Raid "
|
||||||
@ -150,3 +162,5 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
rc_exit
|
rc_exit
|
||||||
|
|
||||||
|
# vim:ft=sh
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jul 27 13:01:01 CEST 2007 - mmarek@suse.cz
|
||||||
|
|
||||||
|
- changes to the init script [#288454]
|
||||||
|
* don't try to autoassemble if /etc/mdadm.conf exists (even an
|
||||||
|
empty one)
|
||||||
|
* ony autoassemble partitions found in /proc/partitions
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jul 13 15:02:21 CEST 2007 - mmarek@suse.cz
|
Fri Jul 13 15:02:21 CEST 2007 - mmarek@suse.cz
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
Name: mdadm
|
Name: mdadm
|
||||||
Version: 2.6.2
|
Version: 2.6.2
|
||||||
Release: 1
|
Release: 4
|
||||||
BuildRequires: opensp sgmltool
|
BuildRequires: opensp sgmltool
|
||||||
PreReq: %fillup_prereq %insserv_prereq
|
PreReq: %fillup_prereq %insserv_prereq
|
||||||
Obsoletes: raidtools
|
Obsoletes: raidtools
|
||||||
@ -121,6 +121,11 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_var}/adm/fillup-templates/sysconfig.mdadm
|
%{_var}/adm/fillup-templates/sysconfig.mdadm
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 27 2007 - mmarek@suse.cz
|
||||||
|
- changes to the init script [#288454]
|
||||||
|
* don't try to autoassemble if /etc/mdadm.conf exists (even an
|
||||||
|
empty one)
|
||||||
|
* ony autoassemble partitions found in /proc/partitions
|
||||||
* Fri Jul 13 2007 - mmarek@suse.cz
|
* Fri Jul 13 2007 - mmarek@suse.cz
|
||||||
- updated to 2.6.2
|
- updated to 2.6.2
|
||||||
* --fail detached and --remove faulty can be used to fail and
|
* --fail detached and --remove faulty can be used to fail and
|
||||||
|
Loading…
Reference in New Issue
Block a user