0

I have functional 3G connection on my Pi but I have to turn it on manually after each reboot in Sakis3g.

Does anybody know how can that be done automatically?

Bex
  • 2,929
  • 3
  • 25
  • 34

1 Answers1

1

The easiest way to start a background process, or something that just needs to run quickly and set something up (such as networking), at boot time, is still to add it to /etc/rc.local. I say "still" because it is was originally an aspect of the older init system on Raspbian (SysV) which has now been replaced by systemd. However, it is still supported for backward compatibility and almost certainly will be for perpetuity.

Note that it is not always as easy as it may seem; there is a collection of questions here already about it -- you may want to refine that search if you run into problems.

Beware that if this is something that doesn't go quickly to the background (say 5-10 seconds), you need to fork it (&) so that it does, or you will screw things up.

Finally, this is a fairly comprehensive means of debugging problems.

goldilocks
  • 58,859
  • 17
  • 112
  • 227
  • 2
    Adding a cron @reboot is another option – Milliways Feb 26 '16 at 11:18
  • Thanks, I'll get it through as I get in touch with my computer. – Stanislav Jirák Feb 26 '16 at 13:14
  • @Milliways: what is "cron @reboot"? – Stanislav Jirák Feb 26 '16 at 13:14
  • I used to love LMGTFY but have mostly given it up as a little too acerbic :/ Anyway, cron is installed and active on Raspbian by default, has existed for at least 4* decades*, and therefore probably has more online tutorials and other documentation than anyone will ever want to read. Neither Milliways nor anyone else needs to regurgitate it again. Also note that our larger sibling site Unix & Linux is usually a better source of general linux know-how. – goldilocks Feb 26 '16 at 14:35