aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrc.d/init.d/functions4
-rwxr-xr-xrc.d/rc.sysinit2
2 files changed, 3 insertions, 3 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 59dca79a..808d77ee 100755
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -483,7 +483,7 @@ get_numeric_dev() {
if [ "$1" == "hex" ]; then
fmt="%x:%x"
fi
- eval printf "$fmt" $(stat -c "0x%t 0x%T" $2)
+ ls -l "$1" | awk '{ print $5 $6 }' | awk -F ',' "{ printf \"$fmt\", \$1, \$2 }"
) 2>/dev/null
}
@@ -493,7 +493,7 @@ resolve_dm_name() {
(
name="$1"
- line=$(/sbin/dmraid -ay -t --ignorelocking | grep "^$name:" | cut -d\ -f2-)
+ line=$(/sbin/dmraid -ay -t --ignorelocking | awk -F ':' "{ if (\$1 =~ /^$name$/) { print \$2; }}")
newline=$line
for x in $line ; do
if [[ "$x" =~ "^/dev/" ]] ; then
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index f7d849e1..2b09988b 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -249,7 +249,7 @@ if [ -c /dev/mapper/control ]; then
if [ -x /sbin/dmraid ]; then
modprobe dm-mirror >/dev/null 2>&1
- for x in $(dmraid -ay -t --ignorelocking | cut -d: -f1) ; do
+ for x in $(dmraid -ay -t --ignorelocking | awk -F ':' '{ print $1 }') ; do
dmname=$(resolve_dm_name $x)
if [ -z "$dmname" ]; then
/sbin/dmraid -a y --ignorelocking "$dmname"