cbq: fix find syntax in example
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>
This commit is contained in:
parent
11a3e5c4b3
commit
a51842dcd7
|
|
@ -578,14 +578,14 @@ cbq_show () {
|
||||||
### Check configuration and load DEVICES, DEVFIELDS and CLASSLIST from $1
|
### Check configuration and load DEVICES, DEVFIELDS and CLASSLIST from $1
|
||||||
cbq_init () {
|
cbq_init () {
|
||||||
### Get a list of configured classes
|
### Get a list of configured classes
|
||||||
CLASSLIST=`find $1 \( -type f -or -type l \) -name 'cbq-*' \
|
CLASSLIST=`find $1 -maxdepth 1 \( -type f -or -type l \) -name 'cbq-*' \
|
||||||
-not -name '*~' -maxdepth 1 -printf "%f\n"| sort`
|
-not -name '*~' -printf "%f\n"| sort`
|
||||||
[ -z "$CLASSLIST" ] &&
|
[ -z "$CLASSLIST" ] &&
|
||||||
cbq_failure "no configuration files found in $1!"
|
cbq_failure "no configuration files found in $1!"
|
||||||
|
|
||||||
### Gather all DEVICE fields from $1/cbq-*
|
### Gather all DEVICE fields from $1/cbq-*
|
||||||
DEVFIELDS=`find $1 \( -type f -or -type l \) -name 'cbq-*' \
|
DEVFIELDS=`find $1 -maxdepth 1 \( -type f -or -type l \) -name 'cbq-*' \
|
||||||
-not -name '*~' -maxdepth 1| xargs sed -n 's/#.*//; \
|
-not -name '*~' | xargs sed -n 's/#.*//; \
|
||||||
s/[[:space:]]//g; /^DEVICE=[^,]*,[^,]*\(,[^,]*\)\?/ \
|
s/[[:space:]]//g; /^DEVICE=[^,]*,[^,]*\(,[^,]*\)\?/ \
|
||||||
{ s/.*=//; p; }'| sort -u`
|
{ s/.*=//; p; }'| sort -u`
|
||||||
[ -z "$DEVFIELDS" ] &&
|
[ -z "$DEVFIELDS" ] &&
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue