|
|
2010-08-20
, 11:55
|
|
Posts: 1,101 |
Thanked: 1,184 times |
Joined on Aug 2008
@ Spain
|
#102
|
BTW, that's fixable, and I'm thinking of adding it to the community SSU. Here's a ramzez-init modification to handle both cases (as well as getting rid of a (harmless) "sh: : unknown operand" error when disksize isn't set in GConf, and simplifying the insmod logic a bit):
--- ramzez-init 2009-10-02 12:45:40.000000000 +0200
+++ /etc/init.d/ramzez-init 2010-07-24 15:22:01.000000000 +0200
@@ -19,17 +19,21 @@
echo "Inserting kernel modules!"
DISKSIZE_KB=$(gconftool-2 -g /apps/ramzez/disksize)
insmod /usr/share/ramzez/xvmalloc.ko
- if [[ $DISKSIZE_KB != '' ]]; then
+ if [[ "$DISKSIZE_KB" != "" ]]; then
insmod /usr/share/ramzez/ramzswap.ko disksize_kb=$DISKSIZE_KB else
insmod /usr/share/ramzez/ramzswap.ko disksize_kb=$DISKSIZE_DEFAULT
fi
sleep 1
- swapon /dev/ramzswap0
+ /sbin/swapon /dev/ramzswap0
+ for i in $(grep -v ramzswap /proc/swaps|grep -v Filename|cut -d " " -f 1); do
+ /sbin/swapoff "$i"
+ /sbin/swapon "$i"
+ done
;;
stop)
echo "Removing kernel modules!"
- swapoff /dev/ramzswap0
+ /sbin/swapoff /dev/ramzswap0
rmmod ramzswap
rmmod xvmalloc
;;
|
|
2010-08-21
, 11:24
|
|
Posts: 2,802 |
Thanked: 4,490 times |
Joined on Nov 2007
|
#103
|
This works, it's already included in the diablo-tweaks package, in the "diabloturbo" thread.
Code:+ for i in $(grep -v ramzswap /proc/swaps|grep -v Filename|cut -d " " -f 1); do + /sbin/swapoff "$i" + /sbin/swapon "$i" + done
|
|
2010-08-31
, 13:36
|
|
Posts: 2,802 |
Thanked: 4,490 times |
Joined on Nov 2007
|
#104
|
Nokia-N810-43-7:~# cat /proc/swaps Filename Type Size Used Priority /dev/ramzswap0 partition 131068 96608 10 /media/mmc2/.swap file 131064 0 -4
Nokia-N810-43-7:~# free
total used free shared buffers
Mem: 126796 124500 2296 0 8
Swap: 262132 96608 165524
Total: 388928 221108 167820
Nokia-N810-43-7:~# cat /proc/ramzswap DiskSize: 131072 kB NumReads: 15263 NumWrites: 25807 FailedReads: 0 FailedWrites: 0 InvalidIO: 0 PagesDiscard: 0 ZeroPages: 2980 GoodCompress: 75 % NoCompress: 5 % PagesStored: 21465 PagesUsed: 6976 OrigDataSize: 85860 kB ComprDataSize: 27692 kB MemUsedTotal: 27904 kB
| The Following 3 Users Say Thank You to lma For This Useful Post: | ||
|
|
2010-08-31
, 15:25
|
|
Posts: 138 |
Thanked: 8 times |
Joined on Dec 2009
|
#105
|
and i dont think the latest version is on the garage page either. Anyone know where i can find it?
|
|
2010-08-31
, 15:38
|
|
Posts: 2,802 |
Thanked: 4,490 times |
Joined on Nov 2007
|
#106
|
|
|
2010-08-31
, 17:18
|
|
|
Posts: 4,783 |
Thanked: 1,253 times |
Joined on Aug 2007
@ norway
|
#107
|
|
|
2010-08-31
, 18:02
|
|
Posts: 2,802 |
Thanked: 4,490 times |
Joined on Nov 2007
|
#108
|
| The Following User Says Thank You to lma For This Useful Post: | ||
|
|
2010-08-31
, 18:35
|
|
|
Posts: 4,783 |
Thanked: 1,253 times |
Joined on Aug 2007
@ norway
|
#109
|
|
|
2010-11-20
, 23:11
|
|
Posts: 42 |
Thanked: 27 times |
Joined on Jun 2010
|
#110
|
--- ramzez-init.orig 2010-08-19 17:06:20.000000000 +0100 +++ ramzez-init 2010-08-19 17:34:59.000000000 +0100 @@ -18,14 +18,12 @@ start) echo "Inserting kernel modules!" DISKSIZE_KB=$(gconftool-2 -g /apps/ramzez/disksize) + DISKSIZE_KB=${DISKSIZE_KB:-$DISKSIZE_DEFAULT} insmod /usr/share/ramzez/xvmalloc.ko - if [[ $DISKSIZE_KB != '' ]]; then - insmod /usr/share/ramzez/ramzswap.ko disksize_kb=$DISKSIZE_KB - else - insmod /usr/share/ramzez/ramzswap.ko disksize_kb=$DISKSIZE_DEFAULT - fi + insmod /usr/share/ramzez/ramzswap.ko disksize_kb=$DISKSIZE_KB sleep 1 - swapon /dev/ramzswap0 + swapon -h 2>&1 | grep -qe "-p" && PRI="-p 1" + swapon $PRI /dev/ramzswap0 ;; stop) echo "Removing kernel modules!"Also: package ramzez_0.3_diablo_armel.deb seems to be missing /usr/bin/ramzez :-(
Last edited by lma; 2010-08-19 at 16:50.