ports/irc/iip/files/wrapper.sh
Mario Sergio Fujikawa Ferreira d3a1a08557 o Switch from MASTER_SITE_SOURCEFORGE to MASTER_SITE_SOURCEFORGE_EXTENDED
o iip network servers have moved. Therefore, point source code
  defaults at the correct new locations. This can be tweaked at run
  time by a configuration file
o Flag DEPRECATED:  'IIP network has been resurrected but it is no
  longer stable. It should work but be warned. Use at your own
  risk!'
o Fetch updated node.ref file from MASTER_SITE_LOCAL under lioux.
  Currently, file date version 20050110
o FILESDIR/wrapper.sh
	- Better handle node.ref file first creation
	- Random re-seed at every startup if /dev/urandom is available
o Bump PORTREVISION
o UPDATING should be checked for installation instructions
2005-01-10 19:24:27 +00:00

30 lines
575 B
Bash

#!/bin/sh
PREFIX="%%PREFIX%%"
PROGRAM="${0}"
DATADIR="%%DATADIR%%"
HOME_DIR=${HOME}/.iip
NODE_REF=node.ref
RANDOM_DEVICE=/dev/urandom
SEED_FILE=seed.rnd
if [ ! -d ${HOME_DIR} ]
then
mkdir -p ${HOME_DIR}
fi
if [ ! -f ${HOME_DIR}/${NODE_REF} ]
then
rm -f ${HOME_DIR}/${NODE_REF}
cp -f ${PREFIX}/${DATADIR}/${NODE_REF} \
${HOME_DIR}
chmod u+w ${HOME_DIR}/${NODE_REF}
fi
# random seed
if [ -c "${RANDOM_DEVICE}" -o -L "${RANDOM_DEVICE}" ]; then
head -c 256 /dev/urandom > ${HOME_DIR}/${SEED_FILE}
fi
cd ${HOME_DIR} &&
exec ${PREFIX}/sbin/${PROGRAM##*/}-real "${@}"