I got an update.
I've been able to add my start script to the swapsvc file in init.d:
#!/bin/sh
#
KIND="Swap"
start() {
/usb/USBHDD/TwonkyVision/twonkymedia.sh start
USE_SWAP=$(grep "use_swap=" /etc/default/config | cut -d = -f 2)
if [ $USE_SWAP -eq 1 ] ; then
SWAP_FILE=$(grep "swapfile=" /etc/default/config | cut -d = -f
2)
if [ ${SWAP_FILE:-empty} = "empty" ] ; then
echo "Swapfile was not set. Please set it first."
else
if [ -f $SWAP_FILE ] ; then
SWAPSTATE=$(dd if=$SWAP_FILE ibs=1 skip=4086 count=10
2>/dev/nul
if [ $SWAPSTATE = "SWAPSPACE2" ]
then
echo "Starting $KIND service..."
swapon $SWAP_FILE &
else
echo "Swapfile not recognized. Delete it or change
config."
fi
else
echo "Creating swapfile... it may take a while."
SWAP_MOUNTED=$(echo ${SWAP_FILE} | cut -d '/' -f 3)
for MOUNT in $(mount | grep "/usb/" | cut -d ' ' -f 3
| cut -d '
if [ $MOUNT = $SWAP_MOUNTED ] ; then
FOUND=1
dd if=/dev/zero of=$SWAP_FILE bs=1024
count=262144 2>/de
mkswap $SWAP_FILE
echo "Starting $KIND service..."
swapon $SWAP_FILE &
fi
done
if [ ${FOUND:-0} -eq 0 ] ; then
echo "Swap disk not mounted. Mount it or change
config."
fi
fi
fi
fi
}
....and this does actually stay in the swapsvc file even after a
restart. Unfortunately this still doesn't start up Twonky though.
Am I doing anything wrong?
BTW I'm able to start up Twonky fine by telnet: /usb/USBHDD/
TwonkyVision/twonkymedia.sh start
thanks,
Mike
> > >>>
http://groups.google.com/group/dealextreme-nas-?hl=en-Hidequoted text -
> > - Show quoted text -- Hide quoted text -