blob: 200fcfbfb411b1596bdc8b2a5fb9df5ee77994f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
--- a/htb.init
+++ b/htb.init
@@ -473,8 +473,8 @@
### List of classes in $HTB_PATH
htb_class_list () {
for dev in `htb_device_list`; do
- find $HTB_PATH \( -type f -or -type l \) \
- -name "$dev-*" -not -name '*~' -maxdepth 1 \
+ find $HTB_PATH -maxdepth 1 \( -type f -or -type l \) \
+ -name "$dev-*" -not -name '*~' \
-printf "%f\n"| sort
done
} # htb_class_list
@@ -488,8 +488,8 @@
### Validate cache against config files
htb_valid_cache () {
for dev in `htb_device_list`; do
- [ `find $HTB_PATH \( -type f -or -type l \) \
- -name "$dev*" -maxdepth 1 -newer $HTB_CACHE| \
+ [ `find $HTB_PATH -maxdepth 1 \( -type f -or -type l \) \
+ -name "$dev*" -newer $HTB_CACHE| \
wc -l` -gt 0 ] && VALID=0
[ $VALID -ne 1 ] && break
done
@@ -498,7 +498,7 @@
### Find class config for device $1, which is newer than cache
htb_cache_older () {
- [ `find $HTB_PATH -type f -name "$1*" -maxdepth 1 \
+ [ `find $HTB_PATH -maxdepth 1 -type f -name "$1*" \
-newer $HTB_CACHE| wc -l` -gt 0 ] && return 0
return 1
} # htb_cache_older
|