This is the incriminate script ... the author is convitc to have developed this script in 'hush hush' vay !!!
))
This script provide the vm swap on any volume named '.swap' regardless for its /dev/disk filesystem. Infact this script don't use any mount command or fstab file ... but let autodiskmount mount all available volumes and then if the script find a mount point named /Volumes/.swap then dynamic_pager will create its file on that disk. If the mount-point doesn't exist swapfiles will be placed in the Apple default directory (/var/vm/).
---------------------- SCRIPT -------------------
#!/bin/sh
. /etc/rc.common
ConsoleMessage "Starting Virtual Memory"
swapdisk=/Volumes/.swap
swappath=${swapdisk}/vm
swapfile=${swappath}/swap_file_
##
# Make sure swap disk exist and has been mounted
##
if [ -d ${swapdisk} ]; then
##
# Cleaning swap disk from eventual Mac OS 9 Destop Database Files
##
if [ -f ${swapdisk}/Desktop\ DB ]; then rm -f ${swapdisk}/Desktop\ DB; fi
if [ -f ${swapdisk}/Desktop\ DF ]; then rm -f ${swapdisk}/Desktop\ DF; fi
##
# Preparing disk for hosting swapfiles
##
rm -rf ${swappath} > /dev/null
mkdir -m 740 ${swappath}
chown root:wheel ${swappath}
##
# Swap in swap partition
##
dynamic_pager -H 40000000 -L 160000000 -S 52428800 -P 2 -F ${swapfile}
else
##
# Swap disk not mounted !! Swapping on the Mac OS X defallt position
##
rm -rf /var/vm > /dev/null
mkdir /var/vm
dynamic_pager -H 40000000 -L 160000000 -S 52428800 -F /var/vm/swapfile
echo "ATTENTION: Please note: during boot the swap disk was not found. Check your swap
partition \n ATTENZIONE Durante l'avvio del sistema non e' stato possibile
utilizzare il
volume di swap. Controllarne lo stato!" > /VM_Problems!!.txt
ConsoleMessage "PROBLEM: Can't find swap disk!"
sleep 60
fi
----------------- StartupParameters.plist ------------------
{
Description = "VirtualMemorySystem";
Provides = ("Swap");
Uses = ("Disks");
OrderPreferece = "Early";
Messages =
{
start = "Starting Virtual Memory";
stop = "Stopping Virtual Memory";
restart = "Restarting Virtual Memory";
};
}
---------------------------------------------------
Question:
Now, how to set the script in way that if the else condition is processed the mac os X BootPanel will show somethig to make me able to understand that the swap is in the / disk and not /Volumes/.swap as i like ???