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 16 Jul 2018, 01:10
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
My pinstall script won't work [solved]
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [7 Posts]  
Author Message
scsijon

Joined: 23 May 2007
Posts: 1332
Location: the australian mallee

PostPosted: Fri 09 Dec 2011, 21:28    Post subject:  My pinstall script won't work [solved]  

This is the first time I have attempted to put a post install (pinstall) script in a pet and seem to be having problems. Hopefully someone can put me straight at this stage why a number of the steps are not working properly, as I have a dozen or so of these to create and add in pets I am building / packaging for QtPuppy.

Code:

#!/bin/sh

exec /qt-creator-linux-x86-opensource-2.3.0.bin

cd /opt/qtcreator-2.3.0/bin/

exec /opt/qtcreator-2.3.0/bin/xdg-desktop-install.sh -i

rm /qt-creator-linux-x86-opensource-2.3.0.bin


- The pet installs (copies) the bin file to / and it has the correct rights.

- the pinstall has correct rights and is where I expected it (/)

- I was sure that the exec command was suppose to bring up it's internal install gui when started?

- if binary has installed to correct dirs, it now needs to run a second script for the directory entry to be in the right place, now at correct dir, rights seem correct, but it won't run shell!

- I thought running the shell script would work (permissions are right)

- and the rm step works OK, must add rm pinstall also.

The problem is that if I step it manually it all works.

thanks
scsijon

Last edited by scsijon on Sat 10 Dec 2011, 18:02; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
seaside

Joined: 11 Apr 2007
Posts: 918

PostPosted: Fri 09 Dec 2011, 21:41    Post subject:  

scsijon,

One item that jumps out is the use of "exec" -exec starts another process - BUT - it exits the current process when you do this kind of thing in a script.

In effect no lines run after any line with "exec somecommand".

Regards,
s
Back to top
View user's profile Send private message 
scsijon

Joined: 23 May 2007
Posts: 1332
Location: the australian mallee

PostPosted: Sat 10 Dec 2011, 02:26    Post subject:  

thank you seaside, I was under the impression it started a child process which when completed, returned you to this process! I shall see what happens if I remove them.
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2641

PostPosted: Sat 10 Dec 2011, 04:34    Post subject:  

Actually, exec doesn't start a *new* process. It replaces the current process with the new command -keeping the original process number. You can only use exec as the last command in your script.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4822
Location: Kingwood, TX

PostPosted: Sat 10 Dec 2011, 11:01    Post subject:  

you do mean pinstall.sh ? right?
_________________
Check out my github repositories. I may eventually get around to updating my blogspot.
Back to top
View user's profile Send private message Visit poster's website 
scsijon

Joined: 23 May 2007
Posts: 1332
Location: the australian mallee

PostPosted: Sat 10 Dec 2011, 17:53    Post subject:  

thank you amigo, that was not what I had understood, you have cleared that one up.

Technosaurus, don't tell me it needs to be pinstall.sh, now that would explain why it didn't run, the old ref of barry's I found on building with pinstall and puninstall in it didn't mention that. It might also explain why a small number of others (not mine) that i've tried in the past seemed to fail at that last step, leaving the pinstall script there to be manually run. I'd just taken it was because I had tried to use them across too wide a base difference.

ok, so to fix and test

thanks for now
Back to top
View user's profile Send private message Visit poster's website 
scsijon

Joined: 23 May 2007
Posts: 1332
Location: the australian mallee

PostPosted: Sat 10 Dec 2011, 18:05    Post subject:  

yep, that was it, all fixed and working.

now to find that webpage again and see if either it has changed online or that I need to let barry know about the missing .sh


thank you all
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [7 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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.0333s ][ Queries: 11 (0.0038s) ][ GZIP on ]