Author Topic: Where I Can Put Commands  (Read 2501 times)

kkazakov13

  • Sr. Member
  • ****
  • Posts: 408
    • View Profile
Where I Can Put Commands
« on: January 24, 2007, 10:19:21 am »
I want some place where I can execute commands, _after_ all scripts have finished, and after ipkg-link finishes too. Anyone knows where I can put a command?
SL-C3200 ** FOR SALE :( **
https://www.oesf.org/forum/index.php?showtopic=25969

Canon K30225 CF wireless card
Taxan iTax-LAN10 wired card
My packages for customized pdaXrom beta 3

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Where I Can Put Commands
« Reply #1 on: January 24, 2007, 10:44:55 am »
There are several ways:

You can put a new script with your comands into /etc/rc.d/init.d/ and link it to the runlevel directories /etc/rc.d/rc.?
with a number (as the other linked scripts).
This number determines the porder in which the scripts are called during system start. So choose a high number in order to let it execcute after all the other scripts.

Second way:
If you want to let the programs execute after login, put them into ~/.bash_profile

Thrid way:
If you want them to be executed durint X startup, put them into ~/.xinitrc or /usr/X11R6/bin/startx

daniel
« Last Edit: January 24, 2007, 10:46:03 am by daniel3000 »
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

kkazakov13

  • Sr. Member
  • ****
  • Posts: 408
    • View Profile
Where I Can Put Commands
« Reply #2 on: January 24, 2007, 10:52:53 am »
I thought already about script in rc.d/ runlevel dirs, but what I wanted is sth like rc.local script on my slackware ... something simple as this

about second and third way - I don't want these cases. I know them, but what I want is really execute after ipkg-link and all other commands completes.

If no other way, will create a script S99something ... but I wanted simpler everyday solution
SL-C3200 ** FOR SALE :( **
https://www.oesf.org/forum/index.php?showtopic=25969

Canon K30225 CF wireless card
Taxan iTax-LAN10 wired card
My packages for customized pdaXrom beta 3

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Where I Can Put Commands
« Reply #3 on: January 24, 2007, 05:22:16 pm »
Quote
I thought already about script in rc.d/ runlevel dirs, but what I wanted is sth like rc.local script on my slackware ... something simple as this

about second and third way - I don't want these cases. I know them, but what I want is really execute after ipkg-link and all other commands completes.

If no other way, will create a script S99something ... but I wanted simpler everyday solution
[div align=\"right\"][a href=\"index.php?act=findpost&pid=152259\"][{POST_SNAPBACK}][/a][/div]

rc.local would be the place. just uncomment the section in rc.sysinit or rc.rofilesys which executes rc.local.
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

kkazakov13

  • Sr. Member
  • ****
  • Posts: 408
    • View Profile
Where I Can Put Commands
« Reply #4 on: January 25, 2007, 05:34:23 am »
Thanks, that's all i needed
SL-C3200 ** FOR SALE :( **
https://www.oesf.org/forum/index.php?showtopic=25969

Canon K30225 CF wireless card
Taxan iTax-LAN10 wired card
My packages for customized pdaXrom beta 3

kkazakov13

  • Sr. Member
  • ****
  • Posts: 408
    • View Profile
Where I Can Put Commands
« Reply #5 on: January 26, 2007, 03:24:08 am »
Actually it's not the correct one  It tries to execute commands before all startup scripts, therefore mine

swapon /dev/hda2 did not succeeded, because pcmcia hasn't enabled hdd yet
SL-C3200 ** FOR SALE :( **
https://www.oesf.org/forum/index.php?showtopic=25969

Canon K30225 CF wireless card
Taxan iTax-LAN10 wired card
My packages for customized pdaXrom beta 3

louigi600

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
Where I Can Put Commands
« Reply #6 on: January 26, 2007, 07:35:54 am »
Quote
Actually it's not the correct one  It tries to execute commands before all startup scripts, therefore mine

swapon /dev/hda2 did not succeeded, because pcmcia hasn't enabled hdd yet
Yep ... I had a look at the init scripts:
rc.local is executed from rc.sysinit ....
and that is executed before the rc script ... which is the one that executes the runlevel specific stuff.

You might like to comment the rc.local stuff in rc.sysinit and add something at the end of the rc script to execute rc.local.

I'm concidering writing bsd like init scripts for my Z (I also like slackware) .... if I ever do that do you want me to drop you a line ?
Regards
David

SL-c760*  pdaXrom latest
SL-c860    pdaXrom latest ;-)
SL-c1000  pdaXrom Latest
Acer Aspire One running slackware and Clash
Toshiba AC100 running ARMedslack and Clash

*with some hardware problems but good for testing

kkazakov13

  • Sr. Member
  • ****
  • Posts: 408
    • View Profile
Where I Can Put Commands
« Reply #7 on: January 26, 2007, 07:40:35 am »
Quote
Quote
Actually it's not the correct one  It tries to execute commands before all startup scripts, therefore mine

swapon /dev/hda2 did not succeeded, because pcmcia hasn't enabled hdd yet
Yep ... I had a look at the init scripts:
rc.local is executed from rc.sysinit ....
and that is executed before the rc script ... which is the one that executes the runlevel specific stuff.

You might like to comment the rc.local stuff in rc.sysinit and add something at the end of the rc script to execute rc.local.

I'm concidering writing bsd like init scripts for my Z (I also like slackware) .... if I ever do that do you want me to drop you a line ?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=152523\"][{POST_SNAPBACK}][/a][/div]

Sure, thanks
SL-C3200 ** FOR SALE :( **
https://www.oesf.org/forum/index.php?showtopic=25969

Canon K30225 CF wireless card
Taxan iTax-LAN10 wired card
My packages for customized pdaXrom beta 3