OESF Portables Forum
Everything Else => General Support and Discussion => Zaurus General Forums => Archived Forums => Software => Topic started by: jason123 on June 06, 2004, 08:27:25 pm
-
I\'d really like to have a script that launches from qpe.sh that does the following:
1. determines whether or not there is a swapfile on /mnt/card/
if there is not, creates an 8mb swapfile and
2. activates the swapfile.
But I\'m not really a scriptwriter, I have been using setswap.sh, the one that you find online .. but it just creates the swapfile each time, I\'d also like it to echo what it is doing ie \"Writing 8mb swapfile to /mnt/card/\"
but so far I haven\'t been able to get any output from echoing that in qpe.sh -- or in setswap.sh.
Does anyone want to assist me in this venture? I wouldn\'t think its that hard, I\'m just lame.
-
test -e /mnt/card/swapfile || (echo Creating swapfile... &&
dd if=/dev/zero of=/mnt/card/swapfile bs=1024k count=8 &&
mkswap /mnt/card/swapfile)
swapon /mnt/card/swapfile
You can make it more verbose if you like to.
-
when i try that it also seems to generate the swapfile each time, if one already exists (which in my case it should) I\'d really like it to skip the mkswap step.
-
when i try that it also seems to generate the swapfile each time, if one already exists (which in my case it should)
Are you sure you copied the lines correctly?
What is the output of
test -e /mnt/card/swapfile && echo Swapfile exists || echo Swapfile does not exist
for existing or non-existing swapfile?
You could also try different test commands, the bash builtin one and the external one if it exists though it should really not make a difference.
-
ok -- I screwed up -- it works! thanks! still no output when I\'m starting up though -- i just get a little white blinking cursor
-
Get rc.local running at startup
Then put this in it:
dmesg | grep \"Adding Swap\"