- boot.md: improve 'status' and add 'reload'

function.  Also change 'Raid' to 'RAID'
  for consistency (bnc#709474)

OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=41
This commit is contained in:
Neil Brown 2011-08-18 06:32:28 +00:00 committed by Git OBS Bridge
parent 45d16aa6bb
commit 6534d1a09a
2 changed files with 28 additions and 6 deletions

27
boot.md
View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# SUSE system startup script for MD Raid autostart
# SUSE system startup script for MD RAID autostart
# Copyright (C) 1995--2005 Kurt Garloff, SUSE / Novell Inc.
# Copyright (C) 2006 Marian Jancar, SUSE / Novell Inc.
#
@ -96,7 +96,7 @@ function _rc_exit {
case "$1" in
start)
echo -n "Starting MD Raid "
echo -n "Starting MD RAID "
# create the /var/run/mdadm symlink if needed
mkdir -p /dev/.mdadm
@ -137,17 +137,32 @@ case "$1" in
fi
;;
stop)
echo -n "Shutting down MD Raid "
echo -n "Not shutting down MD RAID - reboot/halt scripts do this."
rc_failed 3
# Remember status and be verbose
rc_status -v
;;
status)
rc_failed 4
echo -n "MD RAID arrays:"
count=`grep -c ' active ' /proc/mdstat 2> /dev/null`
case $count in
0 ) echo -n " No arrays active"; rc_failed 3;;
1 ) echo -n " 1 array active";;
* ) echo -n " $count arrays active";;
esac
rc_status -v
;;
reload)
# We cannot really reload the kernel module, or reassemble the
# arrays, but we can restart mdmon. It will replace existing
# mdmon, or exit quietly if there is nothing to do.
echo -n "MD RAID: restarting mdmon if it is needed."
/sbin/mdmon --all --takeover
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status}"
echo "Usage: $0 {start|stop|status|reload}"
exit 1
;;
esac

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Aug 18 06:30:45 UTC 2011 - nfbrown@novell.com
- boot.md: improve 'status' and add 'reload'
function. Also change 'Raid' to 'RAID'
for consistency (bnc#709474)
-------------------------------------------------------------------
Thu Aug 18 06:01:39 UTC 2011 - nfbrown@novell.com