This is an update of a previous post on this topic.
I noticed that since a recent update of DSM, my previous script was not working fine anymore, when trying to capture a spk during installation. So here is an improved version.
Click to Read More
Now the script will copy only the SPK file into the specified target folder. It's also possible to copy the expanded version by setting the variable COPYEXPAND=true
Also, now, I don't find anymore a folder name "pkglist.tmp" containing files synoserver.enu and otherserver.enu. Those files used to contain the URL's of all SPK available respectively on the official Synology website and on the various SPK servers that you configured in your Package Center > Settings > Package Sources.