#! /bin/bash # # ps3-vram-swap Use vram for swap # # chkconfig: 345 99 99 # description: makes and enables vram swap on the PS3 platform # # Source function library. . /etc/init.d/functions #Check if we are a PS3 if `grep -q PS3 /proc/cpuinfo `; then ISPS3=true fi ###Check if swap is already made # See how we were called. case "$1" in start) if ${ISPS3}; then mkswap /dev/mtdblock0 swapon -p1 /dev/mtdblock0 else echo "This is only for PS3's and you do not appear to be running on a PS2" fi ;; stop) swapoff /dev/mtdblock0 ;; status) if `grep -q /dev/mtdblock0 /proc/swaps`; then echo "vram swap is running" else echo "vram swap is stopped" fi ;; *) echo $"Usage: $0 {start|stop|status}" exit 1 esac exit 0