Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 22 Oct 2018, 04:05
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Questions About Puppy Pre- and Post- Install Scripts
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
s243a

Joined: 02 Sep 2014
Posts: 1225

PostPosted: Thu 20 Sep 2018, 23:17    Post subject:  Questions About Puppy Pre- and Post- Install Scripts  

According to the puppylinux wiki:

Quote:

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:
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:
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.
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 12839
Location: Gatineau (Qc), Canada

PostPosted: Thu 20 Sep 2018, 23:44    Post subject:  

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
~~~~~~~~~~
Fidèle elle commença, ainsi elle restera. (Prov. canadien) /
Faithful she began, so will she stay. (Canadian prov.)
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1663
Location: Japan

PostPosted: Fri 21 Sep 2018, 00:25    Post subject: Re: Puppy Pre and Post Install Scripts  

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
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 1225

PostPosted: Fri 21 Sep 2018, 00:34    Post subject: Re: Puppy Pre and Post Install Scripts  

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:

/root/.packages/<packagename>.

for temporary installation files.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1663
Location: Japan

PostPosted: Fri 21 Sep 2018, 01:05    Post subject: Re: Puppy Pre and Post Install Scripts  

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

/root/.packages/<packagename>.

for temporary installation files.
Just do it and see what happens.
Back to top
View user's profile Send private message 
ITSMERSH


Joined: 02 May 2018
Posts: 360

PostPosted: Fri 21 Sep 2018, 08:37    Post subject: Re: Puppy Pre and Post Install Scripts  

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

/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.

_________________
RSH
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0525s ][ Queries: 12 (0.0134s) ][ GZIP on ]