I am installing a package in Solaris server, my postinstallation and postremove file are kept in below path:


I have added this path in prototype file like below

f none /opt/NCRlu/bin/postinstall=/export/home/username/ABC/root/opt/ABC/bin/postinstall 0755 root other

f none/opt/NCRlu/bin/postremove=/export/home/username/ABC/root/opt/ABC/bin/ postremove 0755 root other

and made changes in pkginfo and pkgmap, I am using make command to create package. when I install the package it says installation successful. But the script which is kept in postinstall and postremove, that is not working. What changes shall I do, so that my package work properly.Shall I change the path of postinstall and postremove?

  • No, postinstall and postremove are not getting called, that is what I am asking where shall I put those files so that they get called. I am not getting any kind of error because the script which is kept in postinstall and postremove that works perfectly if it is executed individually. Sorry for "postremove" .I wrote here that by mistake, I have corrected that
    – tani joshi
    Jan 3 '19 at 13:44

To have the postinstall & postremove scripts run and not just installed as normal files, they need to have a type of "i" not "f", and no path:

i postinstall=/export/home/username/ABC/root/opt/ABC/bin/postinstall
i postremove=/export/home/username/ABC/root/opt/ABC/bin/postremove

See examples in https://docs.oracle.com/cd/E26505_01/html/E28550/ch5pkgcasestudies-79.html

  • in which path these files(postinstall and postremove) needs to be kept? in the same directory where 'pkginfo', 'pkgmap' and 'prototype' exists?
    – tani joshi
    Jan 4 '19 at 10:49
  • If you put them in that directory, you won't need to specify a path to them as shown above.
    – alanc
    Jan 5 '19 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.