WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Problem with run script at startup  (Read 3880 times)

Offline Scooby

  • Newbie
  • *
  • Posts: 27
Problem with run script at startup
« on: February 12, 2013, 01:05:38 PM »
Similar to http://forum.tinycorelinux.net/index.php?topic=6277.0

I want to run a script at startup
It is ash-script who calls a perl-script

the scripts runs fine when I test from the commandline

I put it in /opt/bootlocal.sh

the output from the perl-script is seen but ash user interaction does not work

what is different about perl and ash? can you set stdout stdin somehow?

In the above thread the solution is to put script in /etc/init.d/tc-config
That doesnt seem to be a  clean solution

when searching tc-config for bootlocal.sh i cannot find it, from where does it start

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Problem with run script at startup
« Reply #1 on: February 12, 2013, 01:27:28 PM »
from /opt/bootsync.sh
Code: [Select]
# Use bootlocal.sh for system startup commands that can run in the background
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Scooby

  • Newbie
  • *
  • Posts: 27
Re: Problem with run script at startup
« Reply #2 on: February 12, 2013, 03:11:34 PM »
Hey man such an easy beautiful solution

I must say this in wiki is a little misleading =bootlocal]http://wiki.tinycorelinux.net/wiki:bootlocal.sh_and_shutdown.sh?s[]=bootlocal
Quote
/opt/bootsync.sh is run early in the boot process.

/opt/bootlocal.sh is run later in the boot process.

Most commands should go in /opt/bootlocal.sh, except commands you want executed early in the boot process.

bootlocal is run from within bootsync. I think someone should update.
And I love for that help text to go in bootlocal.sh as well

Thanks again for the easiest solution ever
« Last Edit: February 12, 2013, 03:14:27 PM by Scooby »