Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 1
    If your init is systemd, write a service file that waits for network-online.target... Commented Jul 28, 2014 at 17:20
  • no need to redirect grep output to /dev/null. Use -q option instead. And also I don't thing grepping ifconfig is a good idea. Why not to use ping instead? Commented Jul 28, 2014 at 17:32
  • ping can fail depending on the network in question. It's better to just check the system's running configuration. Commented Jul 28, 2014 at 18:00