dynconfig: rework the logic to support --enable-fhs