Author Topic: Busybox Commands In Rc.local  (Read 3098 times)

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Busybox Commands In Rc.local
« on: June 21, 2006, 01:01:26 pm »
Hello,

I try to activate my swap file from rc.local.

I have created a file /etc/rc.d/rc.local (renaming the old one of Cacko 1.23 to another name) and filled it with the commands:

Code: [Select]
#!/bin/sh
irattach /dev/ttyS1
swapon /hdd3/.swapfile

the irattach command is executed well.
however, the swapon command just returns

Code: [Select]
swapon: swapon: No such file or directory
/sbin/swapon is a link to /bin/busybox.
irattach is a binary in /usr/sbin/irattach.

I tried copying the link for swapon into /usr/sbin, to no avail.
I tried the command
/bin/busybox swapon /hdd3/.swapfile
in rc.local, to no avail.

Does anyone know what I have to do to make rc.local activate my swap file?

Thank you!
daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
Busybox Commands In Rc.local
« Reply #1 on: June 21, 2006, 01:49:27 pm »
its because your hdd's are not mounted yet. try adding it to hddmount script in /sbin
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Busybox Commands In Rc.local
« Reply #2 on: June 22, 2006, 03:38:38 am »
Quote
its because your hdd's are not mounted yet. try adding it to hddmount script in /sbin
[div align=\"right\"][a href=\"index.php?act=findpost&pid=132226\"][{POST_SNAPBACK}][/a][/div]

Thanks bam!
adding the swapon command to the end of hddmount indeed works.

On the C3000, rc.local worked for this. too, so I thought it would work on the 3100 too. But not so, probably because the hard disk of the C3000 holds parts of the ROM so all the file systems are mounted earlier on the C3000 thn on the C3100.

daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
Busybox Commands In Rc.local
« Reply #3 on: June 22, 2006, 03:52:21 am »
this is one of the reasons I moved back to the stock rom. I prefer to handle stuff in rc.d rather than any other places, and the hddmount dealie just bugged me. also I had to install ssl onto the cacko rom, seems it didnt have it preinstalled...odd.
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder