Page 1 of 1

Update of MetaRepository package

Posted: Sun 16. Aug 2026, 10:29
by shv
I try to update the default configuration of MetaRepository to the new server zyxel.ddnss.eu incl. the Mirror of the stock packages.

Code: Select all

# Official repository
# ftp://ftp2.zyxel.com/+ ZyXEL
# Mijzelf's mirror
https://zyxel.ddnss.eu/Users/Mijzelf/zypkg-repo/fw4_stock_packages/ Mirror
# German mirror
# ftp://ftp.zyxel-tech.de/2.new_mirror/+ Mirror
# German beta server
# ftp://ftp.zyxel-tech.de/+ Beta
# Medion server
# ftp://nas-download:sEhtalr@download.medion.de/ Medion
# Mijzelf's repository
http://zyxel.ddnss.eu/Users/Mijzelf/zypkg-repo/fw4/ Mijzelf
# Local repository
/i-data/sysvol/admin/MyRepo/ Local
The update of fw4 > fw5 works. For fw5 devices there are different sub directories for NAS326 and NAS5xx. Is there any environment variable to find out what device it is and modify the mirror path accordingly?
...
I will try to use the file /etc/modelname.

Re: Update of MetaRepository package

Posted: Sun 16. Aug 2026, 13:52
by Mijzelf
In the package Tweaks the startscript contains this snippet:

Code: Select all

       
        [ -f /firmware/mnt/info/modelid ] && TWEAKS_MODEL=$( cat /firmware/mnt/info/modelid )
        [ -f /zyxel/mnt/info/modelid ] && TWEAKS_MODEL=$( cat /zyxel/mnt/info/modelid )
The first line is for fw5 devices, and the 2nd one is for fw4, when I'm not mistaken. TWEAKS_MODEL is then used in the pkgs_on_stick plugin, where this database is used:

Code: Select all

D401)   # NSA210
D501)   # NSA220 
DC01)   # NSA221
A403)   
A803)   
AB03)   # Medion
B103)   # NAS540
B203)   # NAS520        
B403)   # NAS542        
B303)   # NAS326                
DA01)   # NSA_310_TDC
A203)   # NSA310_ZyXEL
DD01)   # NSA320
AA03)   # NSA325
AE03)   # NSA325v2
AD03)   # NSA310s
AF03)   # NSA320s
Cannot remember what the story behind A403 and A803 is. According to the source code in that plugin it must be rebranded devices older than the Medion. So if they ever show up it are fw4 devices.

AFAIK the /etc/modelname is not available on all devices. Maybe even alone on the 5xx, to make it easier to share the firmware. Have you tried to change it, and request a webinterface?

I don't know if if actually matters. The packages for the 5xx and the 326 are different, but there is also a difference between the 520 and the 540 packages. When ZyXEL without announcement revoked the NAS520 repository, I have recommended victims to use MR to use the 540 repo instead. AFAIK that never caused problems.
I have tried to install a few 326 packages on my 520, and that worked. But I didn't test them at depth, nor did I test them all. And I can imagine the 5xx packages won't work on a 326, as the CPU of the 5xx has a bit more features. Don't know if the packages were compiled to use these.

Re: Update of MetaRepository package

Posted: Sun 16. Aug 2026, 14:27
by shv
I added two lines in the control file to select the right fw5_stock_packages sub directory for NAS326:

Code: Select all

for file in "/etc/${PKG_NAME}.conf" "/etc/init.d/${PKG_NAME}" "/gui/MetaRepository/pkgcgi.cgi" "/zypkg_conf/info/${PKG_NAME}.postinst"
do
<------>path=${PKG_ROOT}/${file}
<------>sed -i "s|/usr/local/zy-pkgs|${PKG_ROOT}|g" ${path}
<------>sed -i "s|/i-data/md0/admin|/i-data/sysvol/admin|g" ${path}
<------>sed -i "s|/fw4/|/fw5/|" ${path}
<------>sed -i "s|/fw4_stock_packages/|/fw5_stock_packages/NAS5xx/|" ${path}
<------>[ "`awk '/NAS/ {print $1}' /etc/modelname`" = "NAS326" ] && sed -i "s|/NAS5xx/|/NAS326/|" ${path}
done
The updated MetaRepository package is available in my test repository: https://zyxel.ddnss.eu/Users/Mijzelf/zy ... /test/shv/