How to run a script on startup for Old Linux kernel (3.0.0)

I need to run a script on system startup, but the Linux version is very old, so:

  1. There is no rc.local. Even when I created it and gave it a command, it was never run.
  2. There is no crontab at all.
  3. Adding the script to init.d also didn’t produce any result.
  4. Obviously there is no Upstart app, and it’s not possible to install as I can only access the device through ssh.

I’m sure the script itself works, as it works when I manually run it of course. The device is an embedded Linux device (Ettus E100, link). My Linux version is 3.0.0, and here is the exact version:

  1. $ cat /proc/version returns:
    Linux version 3.0.0 (oe-classic@oebuild) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #1 Thu Mar 28 18:15:38 PDT 2013.

  2. $ dmesg | head -1 returns:
    [ 0.000000] Linux version 3.0.0 (oe-classic@oebuild) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #1 Thu Mar 28 18:15:38 PDT 2013.

  3. $ runlevel returns: N 5.

  4. $ cat /etc/issue returns nothing.

  5. $ cat /etc/*-release returns error ‘No such file or directory’.

  6. $ lsb_release -a returns error ‘command not found’.

  7. $ uname -a returns: Linux ettus-e1xx 3.0.0 #1 Thu Mar 28 18:15:38 PDT 2013 armv7l GNU/Linux.

Not sure how else to check my distribution.

Are there any alternative means to get the script to run at startup?

Answer

I found the solution.

The command: ln -s /etc/rc.local /etc/rc5.d/S99rclocal gets the script to run on startup for this embedded Linux version.

Attribution
Source : Link , Question Author : Vidak , Answer Author : Vidak

Leave a Comment