projects
/
feed
/
routing.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
olsrd: init-script: fix new plugin-lazymode
[feed/routing.git]
/
olsrd
/
files
/
olsrd.init
diff --git
a/olsrd/files/olsrd.init
b/olsrd/files/olsrd.init
index b21d8ea469b48b2ddedf6483d3eaea05b9039963..bbb4e07307fc9d16025a7fcf6e65a3873e8ce58c 100644
(file)
--- a/
olsrd/files/olsrd.init
+++ b/
olsrd/files/olsrd.init
@@
-472,13
+472,18
@@
olsrd_write_hna6() {
find_most_recent_plugin_libary()
{
find_most_recent_plugin_libary()
{
- local library="$1"
+ local library="$1"
# e.g. 'olsrd_dyn_gw' or 'olsrd_txtinfo.so.1.1'
local file unixtime
for file in "/lib/$library"* "/usr/lib/$library"* "/usr/local/lib/$library"*; do {
[ -f "$file" ] && {
local file unixtime
for file in "/lib/$library"* "/usr/lib/$library"* "/usr/local/lib/$library"*; do {
[ -f "$file" ] && {
- unixtime="$( date +%s -r "$file" )"
- echo "$unixtime $file"
+ # make sure that we do not select
+ # 'olsrd_dyn_gw_plain.so.0.4' if user wants
+ # 'olsrd_dyn_gw.so.0.5' -> compare part before 1st dot
+ [ "${library%%.*}" = "${file%%.*}" ] && {
+ unixtime="$( date +%s -r "$file" )"
+ echo "$unixtime $file"
+ }
}
} done | sort -n | tail -n1 | cut -d' ' -f2
}
}
} done | sort -n | tail -n1 | cut -d' ' -f2
}