How to unpack a .ipk file

I needed to unpack an ipk file in order to do a slim installation of it in my Seagate Satellite NAS disk. 

A good concise instruction set is found here… I summarized it to include it below just in case the link goes dead.

1) Become root
$ su -

2) Download the package. E.g.
$ mkdir /tmp/inst
$ cd /tmp/inst
$ wget http://url-of-package/package.ipk

3) Unpack the ipk outer wrapper
$ tar xvfz package.ipk

4) Unpack the control file
$ tar xvfz control.tar.gz

5) Look for scripts such as preinst and postinst. Run the preinst script, if any
$ ./preinst

6) Unpack the main tarball under /
$ cd /
$ tar xvfz /tmp/inst/data.tar.gz

7) Run the postinst script, if any
$ cd /tmp/inst
$ ./postinst

8) Cleanup
$ cd /tmp
$ rm -rf inst