first-run-wizard: don't enable zram
[openpandora.oe.git] / recipes / pandora-system / pandora-state / rc.pandora-state
index 3e785e7..cbdfb36 100644 (file)
@@ -121,10 +121,12 @@ d_start() {
        sed -n '13p' /etc/pandora/conf/nubs.state > /proc/pandora/nub0/mbutton_delay
        sed -n '14p' /etc/pandora/conf/nubs.state > /proc/pandora/nub1/mbutton_delay
        
        sed -n '13p' /etc/pandora/conf/nubs.state > /proc/pandora/nub0/mbutton_delay
        sed -n '14p' /etc/pandora/conf/nubs.state > /proc/pandora/nub1/mbutton_delay
        
-       # Enable ZRAM Swap
-       echo "Enabling ZRAM Swap"
-       mkswap /dev/zram0
-       swapon -p 5 /dev/zram0
+       # Enable ZRAM Swap if user has enabled the module in /etc/modules
+       if [ -e /dev/zram0 ]; then
+               echo "Enabling ZRAM Swap"
+               mkswap /dev/zram0
+               swapon -p 5 /dev/zram0
+       fi
 
        # set audio powerdown delay (ms)
        if [ -e /sys/devices/platform/soc-audio/PCM1773/pmdown_time ]; then
 
        # set audio powerdown delay (ms)
        if [ -e /sys/devices/platform/soc-audio/PCM1773/pmdown_time ]; then