Question

My buddy wrote a custom patch about a year ago for my iPad that allows me to use certain apps despite being jail broken. Unfortunately it no longer works but I figured out that it can be fixed by creating a few directories manually before installing the deb package.

Is it possible to bundle this preinst code with my existing deb file so that the directories are created automatically before the install fails? Please note that I do not have the original source code of the deb package.

Was it helpful?

Solution

Sure. Extract the contents of the Debian package (using dpkg -x), then create a file named preinst in the DEBIAN directory. This has to be an executable (or a shell script) with proper permissions; usualluy 0755 is good enough. The contents may be as follows:

#!/bin/bash

mkdir -p /path/to/folder

Then re-create the package using dpkg-deb --build, and it should be fine now.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top