diff options
author | Peter Jones <pjones@redhat.com> | 2006-01-31 20:50:51 +0000 |
---|---|---|
committer | Peter Jones <pjones@redhat.com> | 2006-01-31 20:50:51 +0000 |
commit | a68c02c7cf2b6b12d6707154c3b62beba7310413 (patch) | |
tree | 4f802bccc3ea7b8cca50d6b4d6c04d5cdaeef64a /rc.d/init.d | |
parent | f4879ffdbc135f6a31d6db955e672cee5fbb57a0 (diff) | |
download | initscripts-a68c02c7cf2b6b12d6707154c3b62beba7310413.tar initscripts-a68c02c7cf2b6b12d6707154c3b62beba7310413.tar.gz initscripts-a68c02c7cf2b6b12d6707154c3b62beba7310413.tar.bz2 initscripts-a68c02c7cf2b6b12d6707154c3b62beba7310413.tar.xz initscripts-a68c02c7cf2b6b12d6707154c3b62beba7310413.zip |
- don't use cut
Diffstat (limited to 'rc.d/init.d')
-rwxr-xr-x | rc.d/init.d/functions | 4 |
1 files changed, 2 insertions, 2 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 |