60 lines
2.2 KiB
Diff
60 lines
2.2 KiB
Diff
|
From ee92ed5c996f95e1f14da3945cb8f92becbfdf2c Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Pavel=20=C5=A0imerda?= <psimerda@redhat.com>
|
||
|
Date: Fri, 13 Mar 2015 13:17:03 +0100
|
||
|
Subject: [PATCH 4/7] cbq: fix find syntax in example
|
||
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
|
||
|
Without modification, using the example resulted in the following error:
|
||
|
|
||
|
[root@localhost sbin]# cbq restart
|
||
|
find: warning: you have specified the -maxdepth option after a
|
||
|
non-option argument (, but options are not positional (-maxdepth affects
|
||
|
tests specified before it as well as those specified after it). Please
|
||
|
specify options before other arguments.
|
||
|
|
||
|
find: warning: you have specified the -maxdepth option after a
|
||
|
non-option argument (, but options are not positional (-maxdepth affects
|
||
|
tests specified before it as well as those specified after it). Please
|
||
|
specify options before other arguments.
|
||
|
|
||
|
**CBQ: failed to compile CBQ configuration!
|
||
|
|
||
|
See also:
|
||
|
|
||
|
* https://bugzilla.redhat.com/show_bug.cgi?id=539232
|
||
|
|
||
|
Reported-By: Mads Kiilerich <mads@kiilerich.com>
|
||
|
Signed-Off-By: Pavel Šimerda <psimerda@redhat.com>
|
||
|
---
|
||
|
examples/cbq.init-v0.7.3 | 8 ++++----
|
||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/examples/cbq.init-v0.7.3 b/examples/cbq.init-v0.7.3
|
||
|
index 35a0a05..1bc0d44 100644
|
||
|
--- a/examples/cbq.init-v0.7.3
|
||
|
+++ b/examples/cbq.init-v0.7.3
|
||
|
@@ -578,14 +578,14 @@ cbq_show () {
|
||
|
### Check configuration and load DEVICES, DEVFIELDS and CLASSLIST from $1
|
||
|
cbq_init () {
|
||
|
### Get a list of configured classes
|
||
|
- CLASSLIST=`find $1 \( -type f -or -type l \) -name 'cbq-*' \
|
||
|
- -not -name '*~' -maxdepth 1 -printf "%f\n"| sort`
|
||
|
+ CLASSLIST=`find $1 -maxdepth 1 \( -type f -or -type l \) -name 'cbq-*' \
|
||
|
+ -not -name '*~' -printf "%f\n"| sort`
|
||
|
[ -z "$CLASSLIST" ] &&
|
||
|
cbq_failure "no configuration files found in $1!"
|
||
|
|
||
|
### Gather all DEVICE fields from $1/cbq-*
|
||
|
- DEVFIELDS=`find $1 \( -type f -or -type l \) -name 'cbq-*' \
|
||
|
- -not -name '*~' -maxdepth 1| xargs sed -n 's/#.*//; \
|
||
|
+ DEVFIELDS=`find $1 -maxdepth 1 \( -type f -or -type l \) -name 'cbq-*' \
|
||
|
+ -not -name '*~' | xargs sed -n 's/#.*//; \
|
||
|
s/[[:space:]]//g; /^DEVICE=[^,]*,[^,]*\(,[^,]*\)\?/ \
|
||
|
{ s/.*=//; p; }'| sort -u`
|
||
|
[ -z "$DEVFIELDS" ] &&
|
||
|
--
|
||
|
2.0.5
|
||
|
|