Closed Ekristoffe closed 4 years ago
Hi, this is quite simple: You can create a postinst script by creating a "executable" file named $PTXDIST_WORKSPACE/rules/mypackage.postinst.
A short example content of this file could be:
echo "running postinst script of mypackage" /sbin/create_a_cool_user.sh /sbin/call_some_fancy_binaries.sh exit 0
It is important, that your script always succeed (return 0).
It is called when your rootfs is assembled also this script is called by opkg when upgrading or installing this package via opkg/ipkg to your already running target.
Hello I would like to add a postinst file inside an ipk in order to have some automatism when installing an ipk. for example in order to run a command should I use: /path/script.sh or $DESTDIR/path/script.sh The first one make the compilation failed (since ptxdist can't find the file) The second one work with ptxdist but the $DESTDIR is still inside the ipk. Is this a problem ? Thanks.