about summary refs log tree commit diff
path: root/examples
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2019-01-25 11:24:41 +0100
committerSebastien Bacher <seb128@ubuntu.com>2019-01-25 11:24:41 +0100
commitbbae86d3d2997a853ca0365e8eb7a3ca7489ee09 (patch)
tree1f7fa49b47ab13aea3effbe839559d221f6323b4 /examples
parent404ebe62622150e77e311777dff8617eb974e834 (diff)
New upstream version 1.15.2
Diffstat (limited to 'examples')
-rw-r--r--examples/C/glib/meson.build2
-rw-r--r--examples/C/qt/meson.build10
-rwxr-xr-xexamples/dispatcher/70-wifi-wired-exclusive.sh6
-rwxr-xr-xexamples/lua/lgi/add-connection.lua2
-rwxr-xr-xexamples/lua/lgi/deactivate-all.lua2
-rw-r--r--examples/nm-conf.d/30-anon.conf2
-rw-r--r--examples/nm-conf.d/31-mac-addr-change.conf7
-rwxr-xr-xexamples/python/dbus/create-bond.py2
-rwxr-xr-xexamples/python/dbus/show-bssids.py2
-rwxr-xr-xexamples/python/dbus/vpn.py2
-rwxr-xr-xexamples/python/gi/add_connection.py2
-rwxr-xr-xexamples/python/gi/deactivate-all.py2
-rwxr-xr-xexamples/shell/nm-logging.sh2
13 files changed, 24 insertions, 19 deletions
diff --git a/examples/C/glib/meson.build b/examples/C/glib/meson.build
index edc4dbb1..1c817163 100644
--- a/examples/C/glib/meson.build
+++ b/examples/C/glib/meson.build
@@ -6,7 +6,7 @@ examples = [
   ['list-connections-gdbus', [], [], []],
   ['list-connections-libnm', [], [], [libnm_dep]],
   ['monitor-nm-running-gdbus', [], [], []],
-  ['monitor-nm-state-gdbus', [], [], []]
+  ['monitor-nm-state-gdbus', [], [], []],
 ]
 
 foreach example: examples
diff --git a/examples/C/qt/meson.build b/examples/C/qt/meson.build
index 5349faa7..c3487af4 100644
--- a/examples/C/qt/meson.build
+++ b/examples/C/qt/meson.build
@@ -1,12 +1,12 @@
 examples = [
   ['add-connection-wired', []],
   ['list-connections', []],
-  ['change-ipv4-addresses', []]
+  ['change-ipv4-addresses', []],
 ]
 
 incs = [
   top_inc,
-  libnm_core_inc
+  libnm_core_inc,
 ]
 
 qt_core_dep = dependency('QtCore', version: '>= 4')
@@ -15,7 +15,7 @@ deps = [
   dbus_dep,
   qt_core_dep,
   dependency('QtDBus'),
-  dependency('QtNetwork')
+  dependency('QtNetwork'),
 ]
 
 moc = find_program('moc-qt4', required: false)
@@ -30,7 +30,7 @@ example_moc = custom_target(
   output,
   input: example + '.cpp',
   output: output,
-  command: [moc, '-i', '@INPUT@', '-o', '@OUTPUT@']
+  command: [moc, '-i', '@INPUT@', '-o', '@OUTPUT@'],
 )
 
 examples += [[example, [example_moc]]]
@@ -41,6 +41,6 @@ foreach example: examples
     example[0] + '.cpp',
     include_directories: incs,
     dependencies: deps,
-    link_depends: example[1]
+    link_depends: example[1],
   )
 endforeach
diff --git a/examples/dispatcher/70-wifi-wired-exclusive.sh b/examples/dispatcher/70-wifi-wired-exclusive.sh
index 676695f4..fac18b59 100755
--- a/examples/dispatcher/70-wifi-wired-exclusive.sh
+++ b/examples/dispatcher/70-wifi-wired-exclusive.sh
@@ -1,8 +1,8 @@
 #!/bin/bash
-# This dispatcher script makes WiFi mutually exclusive with
+# This dispatcher script makes Wi-Fi mutually exclusive with
 # wired networking.  When a wired interface is connected,
-# WiFi will be set to airplane mode (rfkilled).  When the wired
-# interface is disconnected, WiFi will be turned back on.
+# Wi-Fi will be set to airplane mode (rfkilled).  When the wired
+# interface is disconnected, Wi-Fi will be turned back on.
 #
 # Copyright 2012 Johannes Buchner <buchner.johannes@gmx.at>
 # Copyright 2012 - 2014 Red Hat, Inc.
diff --git a/examples/lua/lgi/add-connection.lua b/examples/lua/lgi/add-connection.lua
index 3daf5f32..69bc8cb2 100755
--- a/examples/lua/lgi/add-connection.lua
+++ b/examples/lua/lgi/add-connection.lua
@@ -62,7 +62,7 @@ end
 function added_cb(client, result, data)
   local con,err,code = client:add_connection_finish(result)
   if con then
-    print("The connection profile has been succesfully added to NetworkManager:")
+    print("The connection profile has been successfully added to NetworkManager:")
     print(con:get_id(), con:get_uuid())
   else
     print(string.format("Error: (%d) %s", code, err))
diff --git a/examples/lua/lgi/deactivate-all.lua b/examples/lua/lgi/deactivate-all.lua
index fb8e0ed5..2e8d8935 100755
--- a/examples/lua/lgi/deactivate-all.lua
+++ b/examples/lua/lgi/deactivate-all.lua
@@ -29,7 +29,7 @@
 local lgi = require 'lgi'
 local NM = lgi.NM
 
--- suported connection types
+-- supported connection types
 connection_types = {
   NM.SETTING_VPN_SETTING_NAME,
   NM.SETTING_WIRELESS_SETTING_NAME,
diff --git a/examples/nm-conf.d/30-anon.conf b/examples/nm-conf.d/30-anon.conf
index 3e879fc2..c523063b 100644
--- a/examples/nm-conf.d/30-anon.conf
+++ b/examples/nm-conf.d/30-anon.conf
@@ -38,7 +38,7 @@
 #
 #   $ nmcli connection modify "$CON_NAME" connection.stable-id '${CONNECTION}/${BOOT}'
 #
-# ... or keep it stable accross reboots, but still distinct per profile:
+# ... or keep it stable across reboots, but still distinct per profile:
 #
 #   $ nmcli connection modify "$CON_NAME" connection.stable-id '${CONNECTION}'
 #
diff --git a/examples/nm-conf.d/31-mac-addr-change.conf b/examples/nm-conf.d/31-mac-addr-change.conf
index 1ae2e0dc..554b698f 100644
--- a/examples/nm-conf.d/31-mac-addr-change.conf
+++ b/examples/nm-conf.d/31-mac-addr-change.conf
@@ -4,8 +4,13 @@
 # See man NetworkManager.conf
 #
 # https://bugzilla.gnome.org/show_bug.cgi?id=777523
-[device-mac-addr-change-wifi]
+[device-31-mac-addr-change]
 match-device=driver:rtl8723bs,driver:rtl8189es,driver:r8188eu,driver:eagle_sdio
 wifi.scan-rand-mac-address=no
+
+[connection-31-mac-addr-change]
+match-device=driver:rtl8723bs,driver:rtl8189es,driver:r8188eu,driver:eagle_sdio
+# these are per-profile properties. Here we overwrite the default
+# value, but explicitly configuring it in the profile takes precedence.
 wifi.cloned-mac-address=preserve
 ethernet.cloned-mac-address=preserve
diff --git a/examples/python/dbus/create-bond.py b/examples/python/dbus/create-bond.py
index 4600b9c2..4347b2a0 100755
--- a/examples/python/dbus/create-bond.py
+++ b/examples/python/dbus/create-bond.py
@@ -101,7 +101,7 @@ loop = GObject.MainLoop()
 def properties_changed(props):
     if 'State' in props:
         if props['State'] == 2:
-            print("Succesfully connected")
+            print("Successfully connected")
             loop.quit()
         if props['State'] == 3 or props['State'] == 4:
             print("Bond activation failed")
diff --git a/examples/python/dbus/show-bssids.py b/examples/python/dbus/show-bssids.py
index 9776864f..b364ed03 100755
--- a/examples/python/dbus/show-bssids.py
+++ b/examples/python/dbus/show-bssids.py
@@ -18,7 +18,7 @@
 #
 
 
-# This example prints out all the AP BSSIDs that all WiFi devices on the
+# This example prints out all the AP BSSIDs that all Wi-Fi devices on the
 # machine can see.  Useful for location-based services like Skyhook that
 # can geolocate you based on the APs you can see.
 
diff --git a/examples/python/dbus/vpn.py b/examples/python/dbus/vpn.py
index a21b82ff..0c4b2bb6 100755
--- a/examples/python/dbus/vpn.py
+++ b/examples/python/dbus/vpn.py
@@ -137,7 +137,7 @@ if not connection_path:
 
 device_path = get_wifi_device_path()
 if not device_path:
-    print("no wifi device found")
+    print("no Wi-Fi device found")
     sys.exit(1)
 
 # Is it already activated?
diff --git a/examples/python/gi/add_connection.py b/examples/python/gi/add_connection.py
index f5b5e63c..25a59235 100755
--- a/examples/python/gi/add_connection.py
+++ b/examples/python/gi/add_connection.py
@@ -69,7 +69,7 @@ def create_profile(name):
 def added_cb(client, result, data):
     try:
         client.add_connection_finish(result)
-        print("The connection profile has been succesfully added to NetworkManager.")
+        print("The connection profile has been successfully added to NetworkManager.")
     except Exception as e:
         sys.stderr.write("Error: %s\n" % e)
     main_loop.quit()
diff --git a/examples/python/gi/deactivate-all.py b/examples/python/gi/deactivate-all.py
index a4588522..13d14bc9 100755
--- a/examples/python/gi/deactivate-all.py
+++ b/examples/python/gi/deactivate-all.py
@@ -35,7 +35,7 @@ import gi
 gi.require_version('NM', '1.0')
 from gi.repository import NM
 
-# suported connection types
+# supported connection types
 connection_types = {
   NM.SETTING_VPN_SETTING_NAME,
   NM.SETTING_WIRELESS_SETTING_NAME,
diff --git a/examples/shell/nm-logging.sh b/examples/shell/nm-logging.sh
index 0988e55e..98821650 100755
--- a/examples/shell/nm-logging.sh
+++ b/examples/shell/nm-logging.sh
@@ -31,7 +31,7 @@
 # Examples:
 #   nm-logging.sh debug   -  switches the debugging level on
 #   nm-logging.sh info    -  turns debugging off (back to normal)
-#   nm-logging.sh "" "WIFI"     -  changes domain to print only WiFi related messages
+#   nm-logging.sh "" "WIFI"     -  changes domain to print only Wi-Fi related messages
 #   nm-logging.sh err "HW,IP4"  -  will print only error messages related to hardware or IPv4
 #