backport fixes from changeset:2408 to trunk
drwxr-xr-x - openwrt