Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > .pkg scripts

.pkg scripts
Thread Tools
Grizzled Veteran
Join Date: Sep 2000
Location: Netherlands
Status: Offline
Reply With Quote
Dec 14, 2000, 06:34 AM
 
I'm trying to create an installer package for my Samba port in OSX
It is sort of working, but I still have a few problems.

After I have installed all the binaries etc I need to run a script.
So I looked at some packages and it seemed pretty simple. I added a Samba.post_install script and started experimenting.
But whenever the installer reaches the script, it simply hangs. It stops and there is nothing I can change about it.
I simply do not understand why it is not working, should a add a line to info or something?

This is what my old non installer scripts did.

Code:
echo SAMBA=-YES- >>/etc/hostconfig PORT_NUM=901 PROT_NAME=swat INETD=/etc/inetd.conf SERVICES=/etc/services NIUTIL=/usr/bin/niutil change_inetd_and_services () { local [port_number] port_number=$1 echo "#" >> $INETD echo "# SWAT configtool (Part of Samba)" >> $INETD echo "#" >> $INETD echo "swat stream tcp nowait.400 root /usr/local/samba/bin/swa t /usr/local/bin/swat" >> $INETD change_services $port_number } change_services () { local [port_number] port_number=$1 echo "#" >>$SERVICES echo "# SWAT port (Part of Samba)" >>$SERVICES echo "#" >>$SERVICES echo "swat ${port_number}/tcp" >> $SERVICES $NIUTIL -create . /services/swat $NIUTIL -createprop . /services/swat protocol tcp $NIUTIL -createprop . /services/swat port ${port_number} kill -HUP `cat /var/run/inetd.pid` } grep $PORT_NUM $SERVICES > /dev/null 2>&1 if [ $? -eq 1 ] then change_inetd_and_services $PORT_NUM else fi And some permission changes. Not important ;-)
So for testing I let the script do something simple as:
Code:
#!/bin/sh ECHO=echo CP=/bin/cp MV=/bin/mv RM=/bin/rm TAR=/usr/bin/tar SED=/usr/bin/sed CHOWN=/usr/sbin/chown CHMOD=/bin/chmod $CHMOD -R 757 /usr2/local/samba
But it is not working. It simply freezes.
Tried some other operations too, and nothing worked.

If you want you can take a look at the package here: http://home.student.utwente.nl/d.har...staller.tar.gz
Whenever it installs it installs in /usr2 and /Library2, so you can easily remove it.


There must be some people out there who know how to do this.
Anything from solutions, todo's (Not scott anguish's one, i know it by heart ) and e-mail adresses of developers who have done this for there own product are welcome

Greets. DJ

---------------------------------------------------------------------------
Universiteit Twente
---------------------------------------------------------------------------
Derk-Jan 'The DJ' Hartman
ICQnr: 10111559
Mail: mailto:hartman@mac.com
WWW: http://home.student.utwente.nl/d.hartman/
Goto: http://www.student.utwente.nl/~macsatcampus

Derk-Jan Hartman, Student of the University Twente (NL), developer of VLC media player
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:20 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2