fbec3716e37bd219fadd682e388750a3d955d81d
[NetworkManager.git] / man / nm-online.1.in
1 .\" nm-online (1) manual page
2 .\"
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
7 .\"
8 .\" The GNU General Public License's references to "object code"
9 .\" and "executables" are to be interpreted as the output of any
10 .\" document formatting or typesetting system, including
11 .\" intermediate and printed output.
12 .\"
13 .\" This manual is distributed in the hope that it will be useful,
14 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
15 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 .\" GNU General Public License for more details.
17 .\"
18 .\" You should have received a copy of the GNU General Public Licence along
19 .\" with this manual; if not, write to the Free Software Foundation, Inc.,
20 .\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 .\"
22 .\" Copyright (C) 2010 - 2014 Red Hat, Inc.
23 .\"
24 .TH NM-ONLINE "1" "2014-03-25" "NetworkManager 1.2"
25
26 .SH NAME
27 nm-online \- ask NetworkManager whether the network is connected
28 .SH SYNOPSIS
29 .B nm-online
30 .RI " [ " OPTIONS " ]
31
32 .SH DESCRIPTION
33 .B nm-online
34 is a utility to find out whether we are online. It is done by asking
35 NetworkManager about its status. When run, \fInm\-online\fP waits until
36 NetworkManager reports an active connection, or specified timeout expires. On
37 exit, the returned status code should be checked (see the return codes bellow).
38 .P
39 By default NetworkManager waits for IPv4 dynamic addressing to complete but does
40 not wait for the "auto" IPv6 dynamic addressing.  To wait for IPv6 addressing to
41 complete, either (1) change the network connection's IPv6 "may-fail" setting to "no",
42 and/or (2) change the IPv6 addressing method to "manual" or "dhcp", to indicate that
43 IPv6 connectivity is expected.
44 .SH OPTIONS
45 .TP
46 .B \-t, \-\-timeout <timeout_value>
47 Time to wait for a connection, in seconds.  If the option is not provided,
48 the default timeout is 30 seconds.
49 .TP
50 .B \-x, \-\-exit
51 Exit immediately if NetworkManager is not running or connecting.
52 .TP
53 .B \-q, \-\-quiet
54 Don't print anything.
55 .TP
56 .B \-s, \-\-wait-for-startup
57 Wait for NetworkManager startup to complete, rather than waiting for
58 network connectivity specifically. Startup is considered complete once
59 NetworkManager has activated (or attempted to activate) every
60 auto-activate connection which is available given the current network
61 state. (This is generally only useful at boot time; after startup has
62 completed, \fInm-online -s\fP will just return immediately, regardless
63 of the current network state.)
64
65 .SH EXIT STATUS
66
67 .IP "0" 4
68 Success - already online or connection established within given timeout
69 .IP "1" 4
70 Offline or not online within given timeout
71 .IP "2" 4
72 Unspecified error
73
74 .SH SEE ALSO
75 .BR nmcli (1),
76 .BR NetworkManager(8).