Questions About Puppy Pre- and Post- Install Scripts

Using applications, configuring, problems
Post Reply
Message
Author
s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

Questions About Puppy Pre- and Post- Install Scripts

#1 Post by s243a »

According to the puppylinux wiki:
pinstall.sh that executes immediately after the package files are installed
puninstall.sh that executes immediately after the files are uninstalled.
https://puppylinux.org/wikka/Pets

but where do these files reside. Do they reside at the top of the pet directory structure or in a specific sub folder? As a side note, I don't see these two files referenced in the ltgz2pet source, which may or may not be a good idea.

Currently I'm looking at the doinst.sh from the tor slackbuild and all it does is checks to see if the existing file at:

Code: Select all

etc/rc.d/rc.tor
is identical to the new one and if it is identical then it removes the redundant version. This falls in line with the philosophy of other package managers where configurations changes should be preserved. I don't know all the risks though of copying over configuration files into pets. Perhaps there could be some command line options where one could extract the configuration files, insert new ones or use the existing one. I will note that in Slitaz, the package manger copies the slackware configuration files over when it converts the package. I know this because in the tor package I made for TazPup, it created the startup script

Code: Select all

etc/rc.d/rc.tor
P.S. If puppy doesn't have a sub folder for the pre or post install scripts, I could use the /tmp folder for any additional files that I want to use in the pre-post install process that shouldn't be added to the system.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#2 Post by musher0 »

Hi, s243a.

IIRC -- someone please correct me if I'm wrong -- , the pinstall.sh scripts
and similar are put in / during the install and then are erased by petget.

IHTH.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

Re: Puppy Pre and Post Install Scripts

#3 Post by MochiMoppel »

s243a wrote: where do these files reside
pinstall.sh doesn't reside aywhere. Installed in / , then executeded and removed by /usr/local/petget/installpkg.sh
puninstall.sh is renamed to /root/.packages/<packagename>.remove and executed after uninstallation by /usr/local/petget/removepreview.sh

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

Re: Puppy Pre and Post Install Scripts

#4 Post by s243a »

MochiMoppel wrote:
s243a wrote: where do these files reside
pinstall.sh doesn't reside aywhere. Installed in / , then executeded and removed by /usr/local/petget/installpkg.sh
puninstall.sh is renamed to /root/.packages/<packagename>.remove and executed after uninstallation by /usr/local/petget/removepreview.sh
I wonder then if you could create a folder in the pet called:

Code: Select all

/root/.packages/<packagename>.
for temporary installation files.

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

Re: Puppy Pre and Post Install Scripts

#5 Post by MochiMoppel »

s243a wrote:I wonder then if you could create a folder in the pet called:

Code: Select all

/root/.packages/<packagename>.
for temporary installation files.
Just do it and see what happens.

ITSMERSH

Re: Puppy Pre and Post Install Scripts

#6 Post by ITSMERSH »

s243a wrote:I wonder then if you could create a folder in the pet called:

Code: Select all

/root/.packages/<packagename>.
for temporary installation files.
Inside the PET building directory one can create all folders needed/wanted, e.g. /root/.packages/MyNewProg for temp install files.

Though, it's up to the user/developer to call the script/s inside such directories and to remove the files/directories after installation.

I would recommend to use your own created directories for temp install files (in /tmp), as none of the petget scripts will access such directories.

Post Reply