Bug with squashfs root overlayfs. Dont save changes

Hello. While i try to recover my router https://forum.openwrt.org/t/zyxel-nbg6817-armor-z2-recover-disk-partition
I found that it dont save changes and i get that preinit.sh have wrong configuration for overlayfs. Probably its not only my error and could you check it? I make small patch for preinit.sh to fix it. Here is it ZyXEL NBG6817 (Armor Z2) recover disk partition - #42 by user090909