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