No /tmp/kresd/tty in 5.0.0 (clear kresd cache)


after upgrading my Omnia to 5.0.0 I had to clean the kresd cache. As usual, I tried to use the trick with socat and cache.clear() but the directory /tmp/kresd/tty does not exist.

# socat - /tmp/kresd/tty/*
2020/04/28 16:03:23 socat[15513] E open("/tmp/kresd/tty/*", 0102, 0666): No such file or directory

A restart of the service kresd and resolver does not solve the problem. While restarting kresd I noticed an error.

# /etc/init.d/kresd start
sh: out of range
job 15 at Tue Apr 28 19:11:00 2020

Enabling debugging and verbose output of the /etc/init.d/kresd (set -x, set -v) reveals, that edns_buffer_size is not set and leads to an error.

# /etc/init.d/kresd restart 2>&1 | grep -B 5 'sh: out of range'
+ '[' 0 -ge 1 ]
+ config_get edns_buffer_size common edns_buffer_size
+ eval export -n -- 'edns_buffer_size=${CONFIG_common_edns_buffer_size:-${4}}'
+ export -n -- 'edns_buffer_size='
+ '['  -ge 512 ]
sh: out of range

My actual question is, how can I clear the cache of kresd?

Router: Omnia Turris, no hardware alterations
Turris OS: 5.0.0 (HBT)

Try /tmp/kresd/control/* instead of tty.


@HomerSp thank you, that works!

That leaves only open the error on the kresd-init file. Which has apparently nothing to do with the changed folder name.

1 Like

That was fixed already, but I think that commit hasn’t made it to HBT yet. I added a note to the wiki article now.