about summary refs log tree commit diff
path: root/examples
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2019-12-18 18:29:24 +0100
committerMichael Biebl <biebl@debian.org>2019-12-18 18:29:24 +0100
commit28028b26b3371756811e95d894f709f4b1207c00 (patch)
tree6fe7316fd743b51042db47601a8ef8814b3134ac /examples
parente22609983008e1a669196ad64ba3a59ae8c76e0d (diff)
New upstream version 1.22.0 upstream/1.22.0
Diffstat (limited to 'examples')
-rw-r--r--examples/C/glib/add-connection-gdbus.c17
-rw-r--r--examples/C/glib/add-connection-libnm.c17
-rw-r--r--examples/C/glib/get-active-connections-gdbus.c17
-rw-r--r--examples/C/glib/get-ap-info-libnm.c17
-rw-r--r--examples/C/glib/list-connections-gdbus.c17
-rw-r--r--examples/C/glib/list-connections-libnm.c17
-rw-r--r--examples/C/glib/meson.build19
-rw-r--r--examples/C/glib/monitor-nm-running-gdbus.c17
-rw-r--r--examples/C/glib/monitor-nm-state-gdbus.c17
-rw-r--r--examples/C/qt/add-connection-wired.cpp17
-rw-r--r--examples/C/qt/change-ipv4-addresses.cpp17
-rw-r--r--examples/C/qt/list-connections.cpp17
-rw-r--r--examples/C/qt/meson.build13
-rw-r--r--examples/C/qt/monitor-nm-running.cpp17
-rwxr-xr-xexamples/dispatcher/10-ifcfg-rh-routes.sh32
-rwxr-xr-xexamples/dispatcher/70-wifi-wired-exclusive.sh4
-rwxr-xr-xexamples/js/get_ips.js18
-rwxr-xr-xexamples/lua/lgi/add-connection.lua20
-rwxr-xr-xexamples/lua/lgi/change-vpn-username.lua20
-rwxr-xr-xexamples/lua/lgi/deactivate-all.lua20
-rwxr-xr-xexamples/lua/lgi/get-basic-nm-info.lua20
-rwxr-xr-xexamples/lua/lgi/get-ips.lua20
-rwxr-xr-xexamples/lua/lgi/list-connections.lua20
-rwxr-xr-xexamples/lua/lgi/list-devices.lua20
-rwxr-xr-xexamples/lua/lgi/show-wifi-networks.lua20
-rwxr-xr-xexamples/python/dbus/add-connection-compat.py15
-rwxr-xr-xexamples/python/dbus/add-connection.py15
-rwxr-xr-xexamples/python/dbus/add-wifi-eap-connection.py15
-rwxr-xr-xexamples/python/dbus/add-wifi-psk-connection.py15
-rwxr-xr-xexamples/python/dbus/create-bond.py15
-rwxr-xr-xexamples/python/dbus/disconnect-device.py15
-rwxr-xr-xexamples/python/dbus/get-active-connection-uuids.py15
-rwxr-xr-xexamples/python/dbus/is-wwan-default.py15
-rwxr-xr-xexamples/python/dbus/list-connections.py15
-rwxr-xr-xexamples/python/dbus/list-devices.py15
-rwxr-xr-xexamples/python/dbus/nm-state.py15
-rwxr-xr-xexamples/python/dbus/show-bssids.py15
-rwxr-xr-xexamples/python/dbus/update-ip4-method.py15
-rwxr-xr-xexamples/python/dbus/update-secrets.py15
-rwxr-xr-xexamples/python/dbus/vpn.py15
-rwxr-xr-xexamples/python/dbus/wifi-active-ap.py15
-rwxr-xr-xexamples/python/dbus/wifi-hotspot.py15
-rwxr-xr-xexamples/python/gi/add_connection.py18
-rwxr-xr-xexamples/python/gi/deactivate-all.py18
-rwxr-xr-xexamples/python/gi/device-state-ip4config.py16
-rwxr-xr-xexamples/python/gi/firewall-zone.py17
-rwxr-xr-xexamples/python/gi/get-active-connections.py15
-rwxr-xr-xexamples/python/gi/get_ips.py18
-rwxr-xr-xexamples/python/gi/list-connections.py18
-rwxr-xr-xexamples/python/gi/nm-add-connection2.py26
-rwxr-xr-xexamples/python/gi/nm-connection-update-stable-id.py17
-rwxr-xr-xexamples/python/gi/nm-update2.py26
-rwxr-xr-xexamples/python/gi/nm-wg-set16
-rwxr-xr-xexamples/python/gi/setting-user-data.py17
-rwxr-xr-xexamples/python/gi/show-wifi-networks.py15
-rwxr-xr-xexamples/python/gi/update-ip4-method.py17
-rwxr-xr-xexamples/ruby/add-connection.rb15
-rwxr-xr-xexamples/ruby/get-basic-nm-info.rb15
-rwxr-xr-xexamples/ruby/list-devices.rb15
-rwxr-xr-xexamples/shell/active-wifi.sh15
-rwxr-xr-xexamples/shell/disconnect-device.sh15
-rwxr-xr-xexamples/shell/get-hostname.sh15
-rwxr-xr-xexamples/shell/list-devices.sh15
-rwxr-xr-xexamples/shell/nm-logging.sh15
64 files changed, 142 insertions, 937 deletions
diff --git a/examples/C/glib/add-connection-gdbus.c b/examples/C/glib/add-connection-gdbus.c
index 7f779f81..3ffb2929 100644
--- a/examples/C/glib/add-connection-gdbus.c
+++ b/examples/C/glib/add-connection-gdbus.c
@@ -1,19 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
- * This program is free software; 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.
- *
- * This program 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 License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright 2011, 2014 Red Hat, Inc.
+ * Copyright (C) 2011, 2014 Red Hat, Inc.
  */
 
 /*
diff --git a/examples/C/glib/add-connection-libnm.c b/examples/C/glib/add-connection-libnm.c
index e8188f6b..4859b907 100644
--- a/examples/C/glib/add-connection-libnm.c
+++ b/examples/C/glib/add-connection-libnm.c
@@ -1,19 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
- * This program is free software; 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.
- *
- * This program 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 License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright 2011 Red Hat, Inc.
+ * Copyright (C) 2011 Red Hat, Inc.
  */
 
 /*
diff --git a/examples/C/glib/get-active-connections-gdbus.c b/examples/C/glib/get-active-connections-gdbus.c
index 3045ab73..e4218ae5 100644
--- a/examples/C/glib/get-active-connections-gdbus.c
+++ b/examples/C/glib/get-active-connections-gdbus.c
@@ -1,19 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
- * This program is free software; 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.
- *
- * This program 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 License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * (C) Copyright 2010 -2014 Red Hat, Inc.
+ * Copyright (C) 2010 - 2014 Red Hat, Inc.
  */
 
 /*
diff --git a/examples/C/glib/get-ap-info-libnm.c b/examples/C/glib/get-ap-info-libnm.c
index 2f31d7db..85242b0e 100644
--- a/examples/C/glib/get-ap-info-libnm.c
+++ b/examples/C/glib/get-ap-info-libnm.c
@@ -1,19 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
- * This program is free software; 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.
- *
- * This program 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 License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright 2010 Red Hat, Inc.
+ * Copyright (C) 2010 Red Hat, Inc.
  */
 
 /*
diff --git a/examples/C/glib/list-connections-gdbus.c b/examples/C/glib/list-connections-gdbus.c
index 86a4cc19..028ff910 100644
--- a/examples/C/glib/list-connections-gdbus.c
+++ b/examples/C/glib/list-connections-gdbus.c
@@ -1,19 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
- * This program is free software; 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.
- *
- * This program 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 License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright 2011, 2014 Red Hat, Inc.
+ * Copyright (C) 2011, 2014 Red Hat, Inc.
  */
 
 /*
diff --git a/examples/C/glib/list-connections-libnm.c b/examples/C/glib/list-connections-libnm.c
index 1c7fafe7..77d5dfb7 100644
--- a/examples/C/glib/list-connections-libnm.c
+++ b/examples/C/glib/list-connections-libnm.c
@@ -1,19 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
- * This program is free software; 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.
- *
- * This program 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 License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright 2011 Red Hat, Inc.
+ * Copyright (C) 2011 Red Hat, Inc.
  */
 
 /*
diff --git a/examples/C/glib/meson.build b/examples/C/glib/meson.build
index 47d64bdd..7471ecad 100644
--- a/examples/C/glib/meson.build
+++ b/examples/C/glib/meson.build
@@ -1,19 +1,18 @@
 examples = [
-  ['add-connection-gdbus', [libnm_enum[1]], [libnm_inc], [uuid_dep]],
-  ['add-connection-libnm', [], [], [libnm_dep]],
-  ['get-active-connections-gdbus', [libnm_enum[1]], [libnm_inc], []],
-  ['get-ap-info-libnm', [], [], [libnm_dep]],
-  ['list-connections-gdbus', [], [], []],
-  ['list-connections-libnm', [], [], [libnm_dep]],
-  ['monitor-nm-running-gdbus', [], [], []],
-  ['monitor-nm-state-gdbus', [], [], []],
+  ['add-connection-gdbus', [libnm_enum_sources[1]], [uuid_dep]],
+  ['add-connection-libnm', [], [libnm_dep]],
+  ['get-active-connections-gdbus', [libnm_enum_sources[1]], []],
+  ['get-ap-info-libnm', [], [libnm_dep]],
+  ['list-connections-gdbus', [], []],
+  ['list-connections-libnm', [], [libnm_dep]],
+  ['monitor-nm-running-gdbus', [], []],
+  ['monitor-nm-state-gdbus', [], []],
 ]
 
 foreach example: examples
   executable(
     example[0],
     [example[0] + '.c'] + example[1],
-    include_directories: example[2],
-    dependencies: [libnm_core_dep] + example[3],
+    dependencies: [libnm_nm_default_dep] + example[2],
   )
 endforeach
diff --git a/examples/C/glib/monitor-nm-running-gdbus.c b/examples/C/glib/monitor-nm-running-gdbus.c
index e2ea38db..3856e731 100644
--- a/examples/C/glib/monitor-nm-running-gdbus.c
+++ b/examples/C/glib/monitor-nm-running-gdbus.c
@@ -1,19 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
- * This program is free software; 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.
- *
- * This program 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 License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright 2012 Red Hat, Inc.
+ * Copyright (C) 2012 Red Hat, Inc.
  */
 
 /*
diff --git a/examples/C/glib/monitor-nm-state-gdbus.c b/examples/C/glib/monitor-nm-state-gdbus.c
index bca4d572..e7c23ca2 100644
--- a/examples/C/glib/monitor-nm-state-gdbus.c
+++ b/examples/C/glib/monitor-nm-state-gdbus.c
@@ -1,19 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
- * This program is free software; 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.
- *
- * This program 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 License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright 2012 Red Hat, Inc.
+ * Copyright (C) 2012 Red Hat, Inc.
  */
 
 /*
diff --git a/examples/C/qt/add-connection-wired.cpp b/examples/C/qt/add-connection-wired.cpp
index fade1e4f..97f544ee 100644
--- a/examples/C/qt/add-connection-wired.cpp
+++ b/examples/C/qt/add-connection-wired.cpp
@@ -1,19 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
- * This program is free software; 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.
- *
- * This program 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 License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * (C) Copyright 2011 Eckhart Wörner
+ * Copyright (C) 2011 Eckhart Wörner
  */
 
 /*
diff --git a/examples/C/qt/change-ipv4-addresses.cpp b/examples/C/qt/change-ipv4-addresses.cpp
index ce9b1ab4..4c42a6b6 100644
--- a/examples/C/qt/change-ipv4-addresses.cpp
+++ b/examples/C/qt/change-ipv4-addresses.cpp
@@ -1,19 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
- * This program is free software; 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.
- *
- * This program 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 License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * (C) Copyright 2011 Red Hat, Inc.
+ * Copyright (C) 2011 Red Hat, Inc.
  */
 
 /*
diff --git a/examples/C/qt/list-connections.cpp b/examples/C/qt/list-connections.cpp
index 0ade61a8..70831ad5 100644
--- a/examples/C/qt/list-connections.cpp
+++ b/examples/C/qt/list-connections.cpp
@@ -1,19 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
- * This program is free software; 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.
- *
- * This program 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 License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * (C) Copyright 2011 Eckhart Wörner
+ * Copyright (C) 2011 Eckhart Wörner
  */
 
 /*
diff --git a/examples/C/qt/meson.build b/examples/C/qt/meson.build
index c3487af4..172502a2 100644
--- a/examples/C/qt/meson.build
+++ b/examples/C/qt/meson.build
@@ -4,18 +4,11 @@ examples = [
   ['change-ipv4-addresses', []],
 ]
 
-incs = [
-  top_inc,
-  libnm_core_inc,
-]
-
-qt_core_dep = dependency('QtCore', version: '>= 4')
-
 deps = [
   dbus_dep,
   qt_core_dep,
-  dependency('QtDBus'),
-  dependency('QtNetwork'),
+  qt_dbus_dep,
+  qt_network_dep,
 ]
 
 moc = find_program('moc-qt4', required: false)
@@ -39,7 +32,7 @@ foreach example: examples
   executable(
     example[0],
     example[0] + '.cpp',
-    include_directories: incs,
+    include_directories: libnm_core_inc,
     dependencies: deps,
     link_depends: example[1],
   )
diff --git a/examples/C/qt/monitor-nm-running.cpp b/examples/C/qt/monitor-nm-running.cpp
index 2d318031..ace29698 100644
--- a/examples/C/qt/monitor-nm-running.cpp
+++ b/examples/C/qt/monitor-nm-running.cpp
@@ -1,19 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
- * This program is free software; 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.
- *
- * This program 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 License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * (C) Copyright 2012 Red Hat, Inc.
+ * Copyright (C) 2012 Red Hat, Inc.
  */
 
 /*
diff --git a/examples/dispatcher/10-ifcfg-rh-routes.sh b/examples/dispatcher/10-ifcfg-rh-routes.sh
index d72400ae..0f49ec2a 100755
--- a/examples/dispatcher/10-ifcfg-rh-routes.sh
+++ b/examples/dispatcher/10-ifcfg-rh-routes.sh
@@ -12,6 +12,20 @@
 # This file is derived from scripts 'if{up,down}-routes' from
 # Fedora/RHEL initscripts.
 
+if [ "$2" != "pre-up" ] && [ "$2" != "down" ]; then
+    exit 0
+fi
+
+file_regex='^/etc/sysconfig/network-scripts/ifcfg-([^/]+)$'
+
+[[ "$CONNECTION_FILENAME" =~ $file_regex ]] || exit 0
+
+profile="${BASH_REMATCH[1]}"
+
+if [ ! -f "/etc/sysconfig/network-scripts/rule-$profile" ] && [ ! -f "/etc/sysconfig/network-scripts/rule6-$profile" ]; then
+    exit 0
+fi
+
 MATCH='^[[:space:]]*(\#.*)?$'
 
 handle_file () {
@@ -45,24 +59,6 @@ handle_ip_file() {
 }
 
 
-if [ "$2" != "pre-up" ] && [ "$2" != "down" ]; then
-    exit 0
-fi
-
-dir=$(dirname "$CONNECTION_FILENAME")
-if [ "$dir" != "/etc/sysconfig/network-scripts" ]; then
-    exit 0
-fi
-
-profile=$(basename "$CONNECTION_FILENAME" | sed -ne 's/^ifcfg-//p')
-if [ -z "$profile" ]; then
-    exit 0
-fi
-
-if [ ! -f "$dir/rule-$profile" ] && [ ! -f "$dir/rule6-$profile" ]; then
-    exit 0
-fi
-
 case "$2" in
     pre-up)
         # Routes
diff --git a/examples/dispatcher/70-wifi-wired-exclusive.sh b/examples/dispatcher/70-wifi-wired-exclusive.sh
index fac18b59..b8a2336e 100755
--- a/examples/dispatcher/70-wifi-wired-exclusive.sh
+++ b/examples/dispatcher/70-wifi-wired-exclusive.sh
@@ -4,8 +4,8 @@
 # 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.
+# Copyright (C) 2012 Johannes Buchner <buchner.johannes@gmx.at>
+# Copyright (C) 2012 - 2014 Red Hat, Inc.
 #
 
 export LC_ALL=C
diff --git a/examples/js/get_ips.js b/examples/js/get_ips.js
index 490ecb2a..7d3c436e 100755
--- a/examples/js/get_ips.js
+++ b/examples/js/get_ips.js
@@ -1,21 +1,7 @@
 #!/usr/bin/env gjs
-
+// SPDX-License-Identifier: GPL-2.0+
 /*
- * This program is free software; 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.
- *
- * This program 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 License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright 2014,2017 Red Hat, Inc.
+ * Copyright (C) 2014, 2017 Red Hat, Inc.
  */
 
 const System = imports.system;
diff --git a/examples/lua/lgi/add-connection.lua b/examples/lua/lgi/add-connection.lua
index efccfddf..14871aa4 100755
--- a/examples/lua/lgi/add-connection.lua
+++ b/examples/lua/lgi/add-connection.lua
@@ -1,28 +1,14 @@
 #!/usr/bin/env lua
+-- SPDX-License-Identifier: GPL-2.0+
 --
--- This program is free software; 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.
---
--- This program 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 License along
--- with this program; if not, write to the Free Software Foundation, Inc.,
--- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
---
--- Copyright 2015 Red Hat, Inc.
---
+-- Copyright (C) 2015 Red Hat, Inc.
 --
+
 -- Adding an Ethernet connection to NetworkManager in Lua.
 -- The example uses libnm library using GObject introspection via Lua lgi module.
 -- Most distribution ship the module as lua-lgi package.
 -- libnm guide:   https://developer.gnome.org/libnm/1.0/
 -- Lua-lgi guide: https://github.com/pavouk/lgi/blob/master/docs/guide.md
---
 
 local lgi = require 'lgi'
 local GLib = lgi.GLib
diff --git a/examples/lua/lgi/change-vpn-username.lua b/examples/lua/lgi/change-vpn-username.lua
index 1e6c94bb..3b607c05 100755
--- a/examples/lua/lgi/change-vpn-username.lua
+++ b/examples/lua/lgi/change-vpn-username.lua
@@ -1,28 +1,14 @@
 #!/usr/bin/env lua
+-- SPDX-License-Identifier: GPL-2.0+
 --
--- This program is free software; 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.
---
--- This program 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 License along
--- with this program; if not, write to the Free Software Foundation, Inc.,
--- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
---
--- Copyright 2015 Red Hat, Inc.
---
+-- Copyright (C) 2015 Red Hat, Inc.
 --
+
 -- This example changes username in a VPN profile.
 -- The example uses libnm library using GObject introspection via Lua lgi module.
 -- Most distribution ship the module as lua-lgi package.
 -- libnm guide:   https://developer.gnome.org/libnm/1.0/
 -- Lua-lgi guide: https://github.com/pavouk/lgi/blob/master/docs/guide.md
---
 
 local lgi = require 'lgi'
 local NM = lgi.NM
diff --git a/examples/lua/lgi/deactivate-all.lua b/examples/lua/lgi/deactivate-all.lua
index b4db8add..6d53956d 100755
--- a/examples/lua/lgi/deactivate-all.lua
+++ b/examples/lua/lgi/deactivate-all.lua
@@ -1,28 +1,14 @@
 #!/usr/bin/env lua
+-- SPDX-License-Identifier: GPL-2.0+
 --
--- This program is free software; 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.
---
--- This program 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 License along
--- with this program; if not, write to the Free Software Foundation, Inc.,
--- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
---
--- Copyright 2015 Red Hat, Inc.
---
+-- Copyright (C) 2015 Red Hat, Inc.
 --
+
 -- Deactivate all active connections (of certain type).
 -- The example uses libnm library using GObject introspection via Lua lgi module.
 -- Most distribution ship the module as lua-lgi package.
 -- libnm guide:   https://developer.gnome.org/libnm/1.0/
 -- Lua-lgi guide: https://github.com/pavouk/lgi/blob/master/docs/guide.md
---
 
 local lgi = require 'lgi'
 local NM = lgi.NM
diff --git a/examples/lua/lgi/get-basic-nm-info.lua b/examples/lua/lgi/get-basic-nm-info.lua
index 6ff0be54..5c99461d 100755
--- a/examples/lua/lgi/get-basic-nm-info.lua
+++ b/examples/lua/lgi/get-basic-nm-info.lua
@@ -1,28 +1,14 @@
 #!/usr/bin/env lua
+-- SPDX-License-Identifier: GPL-2.0+
 --
--- This program is free software; 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.
---
--- This program 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 License along
--- with this program; if not, write to the Free Software Foundation, Inc.,
--- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
---
--- Copyright 2015 Red Hat, Inc.
---
+-- Copyright (C) 2015 Red Hat, Inc.
 --
+
 -- This example gets basic information about NetworkManager.
 -- The example uses libnm library using GObject introspection via Lua lgi module.
 -- Most distribution ship the module as lua-lgi package.
 -- libnm guide:   https://developer.gnome.org/libnm/1.0/
 -- Lua-lgi guide: https://github.com/pavouk/lgi/blob/master/docs/guide.md
---
 
 local lgi = require 'lgi'
 local NM = lgi.NM
diff --git a/examples/lua/lgi/get-ips.lua b/examples/lua/lgi/get-ips.lua
index 0f67c807..916dcea0 100755
--- a/examples/lua/lgi/get-ips.lua
+++ b/examples/lua/lgi/get-ips.lua
@@ -1,29 +1,15 @@
 #!/usr/bin/env lua
+-- SPDX-License-Identifier: GPL-2.0+
 --
--- This program is free software; 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.
---
--- This program 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 License along
--- with this program; if not, write to the Free Software Foundation, Inc.,
--- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
---
--- Copyright 2015 Red Hat, Inc.
---
+-- Copyright (C) 2015 Red Hat, Inc.
 --
+
 -- This example shows how to get addresses, routes and DNS information from
 -- NMIP4Config and NMIP6Config (got out of NMDevice)
 -- The example uses libnm library using GObject introspection via Lua lgi module.
 -- Most distribution ship the module as lua-lgi package.
 -- libnm guide:   https://developer.gnome.org/libnm/1.0/
 -- Lua-lgi guide: https://github.com/pavouk/lgi/blob/master/docs/guide.md
---
 
 local lgi = require 'lgi'
 local NM = lgi.NM
diff --git a/examples/lua/lgi/list-connections.lua b/examples/lua/lgi/list-connections.lua
index 6c1d0cb0..fc62e12d 100755
--- a/examples/lua/lgi/list-connections.lua
+++ b/examples/lua/lgi/list-connections.lua
@@ -1,28 +1,14 @@
 #!/usr/bin/env lua
+-- SPDX-License-Identifier: GPL-2.0+
 --
--- This program is free software; 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.
---
--- This program 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 License along
--- with this program; if not, write to the Free Software Foundation, Inc.,
--- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
---
--- Copyright 2015 Red Hat, Inc.
---
+-- Copyright (C) 2015 Red Hat, Inc.
 --
+
 -- Getting and printing all NetworkManager connection in Lua.
 -- The example uses libnm library using GObject introspection via Lua lgi module.
 -- Most distribution ship the module as lua-lgi package.
 -- libnm guide:   https://developer.gnome.org/libnm/1.0/
 -- Lua-lgi guide: https://github.com/pavouk/lgi/blob/master/docs/guide.md
---
 
 local lgi = require 'lgi'
 local GLib = lgi.GLib
diff --git a/examples/lua/lgi/list-devices.lua b/examples/lua/lgi/list-devices.lua
index 57ed54e6..35023453 100755
--- a/examples/lua/lgi/list-devices.lua
+++ b/examples/lua/lgi/list-devices.lua
@@ -1,28 +1,14 @@
 #!/usr/bin/env lua
+-- SPDX-License-Identifier: GPL-2.0+
 --
--- This program is free software; 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.
---
--- This program 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 License along
--- with this program; if not, write to the Free Software Foundation, Inc.,
--- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
---
--- Copyright 2015 Red Hat, Inc.
---
+-- Copyright (C) 2015 Red Hat, Inc.
 --
+
 -- Getting basic information about network interfaces known to NetworkManager.
 -- The example uses libnm library using GObject introspection via Lua lgi module.
 -- Most distribution ship the module as lua-lgi package.
 -- libnm guide:   https://developer.gnome.org/libnm/1.0/
 -- Lua-lgi guide: https://github.com/pavouk/lgi/blob/master/docs/guide.md
---
 
 local lgi = require 'lgi'
 local GLib = lgi.GLib
diff --git a/examples/lua/lgi/show-wifi-networks.lua b/examples/lua/lgi/show-wifi-networks.lua
index 7bffada2..8fecc741 100755
--- a/examples/lua/lgi/show-wifi-networks.lua
+++ b/examples/lua/lgi/show-wifi-networks.lua
@@ -1,28 +1,14 @@
 #!/usr/bin/env lua
+-- SPDX-License-Identifier: GPL-2.0+
 --
--- This program is free software; 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.
---
--- This program 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 License along
--- with this program; if not, write to the Free Software Foundation, Inc.,
--- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
---
--- Copyright 2015 Red Hat, Inc.
---
+-- Copyright (C) 2015 Red Hat, Inc.
 --
+
 -- This example lists Wi-Fi access points NetworkManager scanned on Wi-Fi devices.
 -- The example uses libnm library using GObject introspection via Lua lgi module.
 -- Most distribution ship the module as lua-lgi package.
 -- libnm guide:   https://developer.gnome.org/libnm/1.0/
 -- Lua-lgi guide: https://github.com/pavouk/lgi/blob/master/docs/guide.md
---
 
 local lgi = require 'lgi'
 local NM = lgi.NM
diff --git a/examples/python/dbus/add-connection-compat.py b/examples/python/dbus/add-connection-compat.py
index 8806fcac..6c389f1b 100755
--- a/examples/python/dbus/add-connection-compat.py
+++ b/examples/python/dbus/add-connection-compat.py
@@ -1,18 +1,5 @@
 #!/usr/bin/env python
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2010 - 2012 Red Hat, Inc.
 #
diff --git a/examples/python/dbus/add-connection.py b/examples/python/dbus/add-connection.py
index 510f7c88..fec93430 100755
--- a/examples/python/dbus/add-connection.py
+++ b/examples/python/dbus/add-connection.py
@@ -1,18 +1,5 @@
 #!/usr/bin/env python
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2010 - 2012 Red Hat, Inc.
 #
diff --git a/examples/python/dbus/add-wifi-eap-connection.py b/examples/python/dbus/add-wifi-eap-connection.py
index e8ce6df9..26111138 100755
--- a/examples/python/dbus/add-wifi-eap-connection.py
+++ b/examples/python/dbus/add-wifi-eap-connection.py
@@ -1,18 +1,5 @@
 #!/usr/bin/env python
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2011 Red Hat, Inc.
 #
diff --git a/examples/python/dbus/add-wifi-psk-connection.py b/examples/python/dbus/add-wifi-psk-connection.py
index d8268b1a..8f2294f2 100755
--- a/examples/python/dbus/add-wifi-psk-connection.py
+++ b/examples/python/dbus/add-wifi-psk-connection.py
@@ -1,18 +1,5 @@
 #!/usr/bin/env python
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2015 Red Hat, Inc.
 #
diff --git a/examples/python/dbus/create-bond.py b/examples/python/dbus/create-bond.py
index 4347b2a0..1ce988c3 100755
--- a/examples/python/dbus/create-bond.py
+++ b/examples/python/dbus/create-bond.py
@@ -1,18 +1,5 @@
 #!/usr/bin/env python
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2015 Red Hat, Inc.
 #
diff --git a/examples/python/dbus/disconnect-device.py b/examples/python/dbus/disconnect-device.py
index e884df62..2387daf6 100755
--- a/examples/python/dbus/disconnect-device.py
+++ b/examples/python/dbus/disconnect-device.py
@@ -1,18 +1,5 @@
 #!/usr/bin/env python
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2010 Red Hat, Inc.
 #
diff --git a/examples/python/dbus/get-active-connection-uuids.py b/examples/python/dbus/get-active-connection-uuids.py
index 6e4310d0..8d0e5c15 100755
--- a/examples/python/dbus/get-active-connection-uuids.py
+++ b/examples/python/dbus/get-active-connection-uuids.py
@@ -1,18 +1,5 @@
 #!/usr/bin/env python
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2010 Red Hat, Inc.
 #
diff --git a/examples/python/dbus/is-wwan-default.py b/examples/python/dbus/is-wwan-default.py
index c16aadca..d6e2b12e 100755
--- a/examples/python/dbus/is-wwan-default.py
+++ b/examples/python/dbus/is-wwan-default.py
@@ -1,18 +1,5 @@
 #!/usr/bin/env python
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2011 - 2012 Red Hat, Inc.
 #
diff --git a/examples/python/dbus/list-connections.py b/examples/python/dbus/list-connections.py
index 90aec3b3..43a9c4e0 100755
--- a/examples/python/dbus/list-connections.py
+++ b/examples/python/dbus/list-connections.py
@@ -1,18 +1,5 @@
 #!/usr/bin/env python
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2010 - 2011 Red Hat, Inc.
 #
diff --git a/examples/python/dbus/list-devices.py b/examples/python/dbus/list-devices.py
index fd58695b..4a9ebe4e 100755
--- a/examples/python/dbus/list-devices.py
+++ b/examples/python/dbus/list-devices.py
@@ -1,18 +1,5 @@
 #!/usr/bin/env python
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2011 - 2012 Red Hat, Inc.
 #
diff --git a/examples/python/dbus/nm-state.py b/examples/python/dbus/nm-state.py
index 68979efa..38d10ae6 100755
--- a/examples/python/dbus/nm-state.py
+++ b/examples/python/dbus/nm-state.py
@@ -1,18 +1,5 @@
 #!/usr/bin/env python
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2010 - 2012 Red Hat, Inc.
 #
diff --git a/examples/python/dbus/show-bssids.py b/examples/python/dbus/show-bssids.py
index b364ed03..b4217a55 100755
--- a/examples/python/dbus/show-bssids.py
+++ b/examples/python/dbus/show-bssids.py
@@ -1,18 +1,5 @@
 #!/usr/bin/env python
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2010 Red Hat, Inc.
 #
diff --git a/examples/python/dbus/update-ip4-method.py b/examples/python/dbus/update-ip4-method.py
index 5a1cd4c5..2c12c2bb 100755
--- a/examples/python/dbus/update-ip4-method.py
+++ b/examples/python/dbus/update-ip4-method.py
@@ -1,18 +1,5 @@
 #!/usr/bin/env python
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2014 Red Hat, Inc.
 #
diff --git a/examples/python/dbus/update-secrets.py b/examples/python/dbus/update-secrets.py
index 1fc73209..a0b53b7c 100755
--- a/examples/python/dbus/update-secrets.py
+++ b/examples/python/dbus/update-secrets.py
@@ -1,18 +1,5 @@
 #!/usr/bin/env python
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2011 - 2012 Red Hat, Inc.
 #
diff --git a/examples/python/dbus/vpn.py b/examples/python/dbus/vpn.py
index 0c4b2bb6..8939d262 100755
--- a/examples/python/dbus/vpn.py
+++ b/examples/python/dbus/vpn.py
@@ -1,18 +1,5 @@
 #!/usr/bin/env python
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2009 Novell, Inc.
 # Copyright (C) 2009 Red Hat, Inc.
diff --git a/examples/python/dbus/wifi-active-ap.py b/examples/python/dbus/wifi-active-ap.py
index c0ed6710..78673e76 100755
--- a/examples/python/dbus/wifi-active-ap.py
+++ b/examples/python/dbus/wifi-active-ap.py
@@ -1,18 +1,5 @@
 #!/usr/bin/env python
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2015 Red Hat, Inc.
 #
diff --git a/examples/python/dbus/wifi-hotspot.py b/examples/python/dbus/wifi-hotspot.py
index 9b057a2c..d4f17d07 100755
--- a/examples/python/dbus/wifi-hotspot.py
+++ b/examples/python/dbus/wifi-hotspot.py
@@ -1,18 +1,5 @@
 #!/usr/bin/env python
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2010 - 2012 Red Hat, Inc.
 #
diff --git a/examples/python/gi/add_connection.py b/examples/python/gi/add_connection.py
index 3b0abef1..9cf9e348 100755
--- a/examples/python/gi/add_connection.py
+++ b/examples/python/gi/add_connection.py
@@ -1,21 +1,7 @@
 #!/usr/bin/env python
-
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
-# Copyright 2014 Red Hat, Inc.
+# Copyright (C) 2014 Red Hat, Inc.
 #
 
 #
diff --git a/examples/python/gi/deactivate-all.py b/examples/python/gi/deactivate-all.py
index 7a9b2ce1..3af350e4 100755
--- a/examples/python/gi/deactivate-all.py
+++ b/examples/python/gi/deactivate-all.py
@@ -1,21 +1,7 @@
 #!/usr/bin/env python
-
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
-# Copyright 2015 Red Hat, Inc.
+# Copyright (C) 2015 Red Hat, Inc.
 #
 
 #
diff --git a/examples/python/gi/device-state-ip4config.py b/examples/python/gi/device-state-ip4config.py
index 70ab8871..18848d07 100755
--- a/examples/python/gi/device-state-ip4config.py
+++ b/examples/python/gi/device-state-ip4config.py
@@ -1,19 +1,5 @@
 #!/usr/bin/env python
-#
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2012 Red Hat, Inc.
 #
diff --git a/examples/python/gi/firewall-zone.py b/examples/python/gi/firewall-zone.py
index 6be18dd9..6cbd8c25 100755
--- a/examples/python/gi/firewall-zone.py
+++ b/examples/python/gi/firewall-zone.py
@@ -1,20 +1,7 @@
 #!/usr/bin/env python
+# SPDX-License-Identifier: GPL-2.0+
 #
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Copyright 2013 - 2014 Red Hat, Inc.
+# Copyright (C) 2013 - 2014 Red Hat, Inc.
 #
 
 import sys
diff --git a/examples/python/gi/get-active-connections.py b/examples/python/gi/get-active-connections.py
index d7d35663..072f245a 100755
--- a/examples/python/gi/get-active-connections.py
+++ b/examples/python/gi/get-active-connections.py
@@ -1,18 +1,5 @@
 #!/usr/bin/env python
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2014 Red Hat, Inc.
 #
diff --git a/examples/python/gi/get_ips.py b/examples/python/gi/get_ips.py
index 48bbac6d..13b0a8b6 100755
--- a/examples/python/gi/get_ips.py
+++ b/examples/python/gi/get_ips.py
@@ -1,21 +1,7 @@
 #!/usr/bin/env python
+# SPDX-License-Identifier: GPL-2.0+
 #
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Copyright 2014 Red Hat, Inc.
+# Copyright (C) 2014 Red Hat, Inc.
 #
 
 import sys, socket
diff --git a/examples/python/gi/list-connections.py b/examples/python/gi/list-connections.py
index 4cd15feb..7278fafd 100755
--- a/examples/python/gi/list-connections.py
+++ b/examples/python/gi/list-connections.py
@@ -1,21 +1,7 @@
 #!/usr/bin/env python
-
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
-# Copyright 2012 - 2014 Red Hat, Inc.
+# Copyright (C) 2012 - 2014 Red Hat, Inc.
 #
 
 import gi
diff --git a/examples/python/gi/nm-add-connection2.py b/examples/python/gi/nm-add-connection2.py
index b78016db..01c1ae7b 100755
--- a/examples/python/gi/nm-add-connection2.py
+++ b/examples/python/gi/nm-add-connection2.py
@@ -1,20 +1,7 @@
 #!/usr/bin/env python
+# SPDX-License-Identifier: GPL-2.0+
 #
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Copyright 2019 Red Hat, Inc.
+# Copyright (C) 2019 Red Hat, Inc.
 #
 
 import sys
@@ -40,8 +27,13 @@ def con_to_str(con):
     return '"%s" (%s)' % (s_con.get_id(), s_con.get_uuid())
 
 def usage():
-    print('Usage: %s --clone [[id] <id>]' % (sys.argv[0]))
-    print('       %s --clone [[uuid] <uuid>]' % (sys.argv[0]))
+    arg0 = sys.argv[0]
+    arg0_spaced = ' ' * len(arg0)
+    print('Usage: %s [ --clone ( [id] <id> | [uuid] <uuid> ) ] \\' % (arg0))
+    print('       %s [ --to-disk | --in-memory ] \\' % (arg0_spaced))
+    print('       %s [ --block-autoconnect ] \\' % (arg0_spaced))
+    print('       %s [ --id <new-id> ] \\' % (arg0_spaced))
+    print('       %s [ --uuid <new-uuid> ] \\' % (arg0_spaced))
     return 1
 
 def die(msg, print_usage=False):
diff --git a/examples/python/gi/nm-connection-update-stable-id.py b/examples/python/gi/nm-connection-update-stable-id.py
index bd4f12b6..3629d072 100755
--- a/examples/python/gi/nm-connection-update-stable-id.py
+++ b/examples/python/gi/nm-connection-update-stable-id.py
@@ -1,20 +1,7 @@
 #!/usr/bin/env python
+# SPDX-License-Identifier: GPL-2.0+
 #
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Copyright 2017 Red Hat, Inc.
+# Copyright (C) 2017 Red Hat, Inc.
 #
 
 #
diff --git a/examples/python/gi/nm-update2.py b/examples/python/gi/nm-update2.py
index 36449fd8..5a658793 100755
--- a/examples/python/gi/nm-update2.py
+++ b/examples/python/gi/nm-update2.py
@@ -1,20 +1,7 @@
 #!/usr/bin/env python
+# SPDX-License-Identifier: GPL-2.0+
 #
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Copyright 2019 Red Hat, Inc.
+# Copyright (C) 2019 Red Hat, Inc.
 #
 
 import sys
@@ -40,8 +27,13 @@ def con_to_str(con):
     return '"%s" (%s)' % (s_con.get_id(), s_con.get_uuid())
 
 def usage():
-    print('Usage: %s [[id] <id>]' % (sys.argv[0]))
-    print('       %s [[uuid] <uuid>]' % (sys.argv[0]))
+    arg0 = sys.argv[0]
+    arg0_spaced = ' ' * len(arg0)
+    print('Usage: %s [ [id] <id> | [uuid] <uuid> ] \\' % (arg0))
+    print('       %s [ --to-disk | --in-memory | --in-memory-detached | --in-memory-only ] \\' % (arg0_spaced))
+    print('       %s [ --block-autoconnect ] \\' % (arg0_spaced))
+    print('       %s [ --volatile ] \\' % (arg0_spaced))
+    print('       %s [ --no-reapply ] \\' % (arg0_spaced))
     return 1
 
 def die(msg, print_usage=False):
diff --git a/examples/python/gi/nm-wg-set b/examples/python/gi/nm-wg-set
index 5f284c2c..ca31ac72 100755
--- a/examples/python/gi/nm-wg-set
+++ b/examples/python/gi/nm-wg-set
@@ -1,20 +1,8 @@
 #!/usr/bin/env python
+# SPDX-License-Identifier: GPL-2.0+
 #
-# This program is free software; 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.
+# Copyright (C) 2018 - 2019 Red Hat, Inc.
 #
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Copyright 2018 - 2019 Red Hat, Inc.
 
 # nm-wg-set: modify an existing WireGuard connection profile.
 #
diff --git a/examples/python/gi/setting-user-data.py b/examples/python/gi/setting-user-data.py
index d5e00105..fd86445b 100755
--- a/examples/python/gi/setting-user-data.py
+++ b/examples/python/gi/setting-user-data.py
@@ -1,21 +1,8 @@
 #!/usr/bin/env python
-
-#
-# This program is free software; 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.
-#
-# This program 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.
+# SPDX-License-Identifier: GPL-2.0+
 #
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# Copyright (C) 2017 Red Hat, Inc.
 #
-# Copyright 2017 Red Hat, Inc.
 
 #
 # set and show user-data for a connection:
diff --git a/examples/python/gi/show-wifi-networks.py b/examples/python/gi/show-wifi-networks.py
index 6eb6ac91..e1ee4c3d 100755
--- a/examples/python/gi/show-wifi-networks.py
+++ b/examples/python/gi/show-wifi-networks.py
@@ -1,19 +1,6 @@
 #!/usr/bin/env python
 # coding=utf-8
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2013 Red Hat, Inc.
 #
diff --git a/examples/python/gi/update-ip4-method.py b/examples/python/gi/update-ip4-method.py
index e4c603fb..9bba6199 100755
--- a/examples/python/gi/update-ip4-method.py
+++ b/examples/python/gi/update-ip4-method.py
@@ -1,20 +1,7 @@
 #!/usr/bin/env python
+# SPDX-License-Identifier: GPL-2.0+
 #
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Copyright 2014 Red Hat, Inc.
+# Copyright (C) 2014 Red Hat, Inc.
 #
 
 #
diff --git a/examples/ruby/add-connection.rb b/examples/ruby/add-connection.rb
index bd9b4ed7..dae6ece3 100755
--- a/examples/ruby/add-connection.rb
+++ b/examples/ruby/add-connection.rb
@@ -1,18 +1,5 @@
 #!/usr/bin/env ruby
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2011 Red Hat, Inc.
 #
diff --git a/examples/ruby/get-basic-nm-info.rb b/examples/ruby/get-basic-nm-info.rb
index d5525429..e696f353 100755
--- a/examples/ruby/get-basic-nm-info.rb
+++ b/examples/ruby/get-basic-nm-info.rb
@@ -1,18 +1,5 @@
 #!/usr/bin/env ruby
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2011 Red Hat, Inc.
 #
diff --git a/examples/ruby/list-devices.rb b/examples/ruby/list-devices.rb
index 690d3e5f..e885d4a6 100755
--- a/examples/ruby/list-devices.rb
+++ b/examples/ruby/list-devices.rb
@@ -1,18 +1,5 @@
 #!/usr/bin/env ruby
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2011 - 2012 Red Hat, Inc.
 #
diff --git a/examples/shell/active-wifi.sh b/examples/shell/active-wifi.sh
index 0f550fed..54e0527f 100755
--- a/examples/shell/active-wifi.sh
+++ b/examples/shell/active-wifi.sh
@@ -1,18 +1,5 @@
 #!/bin/sh
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2012 Red Hat, Inc.
 #
diff --git a/examples/shell/disconnect-device.sh b/examples/shell/disconnect-device.sh
index edfb9d17..ef2a129b 100755
--- a/examples/shell/disconnect-device.sh
+++ b/examples/shell/disconnect-device.sh
@@ -1,18 +1,5 @@
 #!/bin/sh
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2012 Red Hat, Inc.
 #
diff --git a/examples/shell/get-hostname.sh b/examples/shell/get-hostname.sh
index 5009120b..ecefdcfd 100755
--- a/examples/shell/get-hostname.sh
+++ b/examples/shell/get-hostname.sh
@@ -1,18 +1,5 @@
 #!/bin/sh
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2011 Red Hat, Inc.
 #
diff --git a/examples/shell/list-devices.sh b/examples/shell/list-devices.sh
index ee694215..74342d41 100755
--- a/examples/shell/list-devices.sh
+++ b/examples/shell/list-devices.sh
@@ -1,18 +1,5 @@
 #!/bin/sh
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2011 - 2012 Red Hat, Inc.
 #
diff --git a/examples/shell/nm-logging.sh b/examples/shell/nm-logging.sh
index ab4c4917..2261f449 100755
--- a/examples/shell/nm-logging.sh
+++ b/examples/shell/nm-logging.sh
@@ -1,18 +1,5 @@
 #!/bin/sh
-#
-# This program is free software; 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.
-#
-# This program 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 License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2011 Red Hat, Inc.
 #