mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 19:30:07 +01:00
This fixes a behaviour change made by 44ac1020da.
That commit make nm-online to wait for NM finishing startup instead of waiting
for a real connection. So for NetworkManager fully initialized, but
disconnected nm-online would return 0.
$ nmcli -f RUNNING,STATE,STARTUP,CONNECTIVITY gen status
RUNNING STATE STARTUP CONNECTIVITY
running disconnected started none
Revert back to the original behaviour of waiting for a connection. And
introduce a new option '--wait-for-startup' waiting for NetworkManager
finishing its startup, which is useful in some cases, like
NetworkManager-wait-online.service.
https://bugzilla.redhat.com/show_bug.cgi?id=1054364
65 lines
2.1 KiB
Groff
65 lines
2.1 KiB
Groff
.\" nm-online (1) manual page
|
|
.\"
|
|
.\" This is free documentation; you can redistribute it and/or
|
|
.\" modify it under the terms of the GNU General Public License as
|
|
.\" published by the Free Software Foundation; either version 2 of
|
|
.\" the License, or (at your option) any later version.
|
|
.\"
|
|
.\" The GNU General Public License's references to "object code"
|
|
.\" and "executables" are to be interpreted as the output of any
|
|
.\" document formatting or typesetting system, including
|
|
.\" intermediate and printed output.
|
|
.\"
|
|
.\" This manual is distributed in the hope that it will be useful,
|
|
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
.\" GNU General Public License for more details.
|
|
.\"
|
|
.\" You should have received a copy of the GNU General Public Licence along
|
|
.\" with this manual; if not, write to the Free Software Foundation, Inc.,
|
|
.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
.\"
|
|
.\" Copyright (C) 2010 - 2014 Red Hat, Inc.
|
|
.\"
|
|
.TH NM-ONLINE "1" "25 March 2014"
|
|
|
|
.SH NAME
|
|
nm-online \- ask NetworkManager whether the network is connected
|
|
.SH SYNOPSIS
|
|
.B nm-online
|
|
.RI " [ " OPTIONS " ]
|
|
|
|
.SH DESCRIPTION
|
|
.B nm-online
|
|
is a utility to find out whether we are online. It is done by asking
|
|
NetworkManager about its status. When run, \fInm\-online\fP waits until
|
|
NetworkManager reports an active connection, or specified timeout expires. On
|
|
exit, the returned status code should be checked (see the return codes bellow).
|
|
|
|
.SH OPTIONS
|
|
.TP
|
|
.B \-t, \-\-timeout <timeout_value>
|
|
Time to wait for a connection, in seconds. If the option is not provided,
|
|
the default timeout is 30 seconds.
|
|
.TP
|
|
.B \-x, \-\-exit
|
|
Exit immediately if NetworkManager is not running or connecting.
|
|
.TP
|
|
.B \-q, \-\-quiet
|
|
Don't print anything.
|
|
.TP
|
|
.B \-s, \-\-wait-for-startup
|
|
Wait for NetworkManager finishing its startup instead of establishing a connection.
|
|
|
|
.SH EXIT STATUS
|
|
|
|
.IP "0" 4
|
|
Success - already online or connection established within given timeout
|
|
.IP "1" 4
|
|
Offline or not online within given timeout
|
|
.IP "2" 4
|
|
Unspecified error
|
|
|
|
.SH SEE ALSO
|
|
.BR nmcli (1),
|
|
.BR NetworkManager(8).
|