I take it that you have /path/to/sets set to /INSTALL
echo “mget *gz” | ftp -Va ftp://ftp.dk.netbsd.org/pub/NetBSD/NetBSD-5.1.2/i386/binary/setsprogress -z -f /INSTALL/modules.tgz pax -rpeprogress -z -f /INSTALL/kern-GENERIC.tgz pax -rpefor file in INSTALL/{b,c,g,ma,mi,t,x}*tgz ; do progress -zf $file pax -rpe ; donepostinstall -s /INSTALL/etc.tgz checkpostinstall -s /INSTALL/etc.tgz fix