Lubomir Rintel
0d3c6072f5
contrib/checkpatch: remove the first character off a diff
...
Otherwise the leading whitespace checks won't work on patches.
2018-10-07 15:46:02 +02:00
Lubomir Rintel
587f006690
contrib/checkpatch: check some more whitespace trouble
2018-10-07 15:46:02 +02:00
Lubomir Rintel
1d57aefa41
contrib/checkpatch: correctly separate indentation across hunks
2018-10-07 15:46:02 +02:00
Lubomir Rintel
66ddc92135
checkpatch: detect some whitespace errors
...
Vim's trademark.
2018-09-24 13:21:12 +02:00
Thomas Haller
cf02b9c5df
checkpatch.pl: complain about space in elvis operator ?:
2018-08-09 17:07:23 +02:00
Javier Arteaga
6c3174f6e0
checkpatch: fix perldoc heading
...
The script does not actually emulate a serial modem (yet).
https://github.com/NetworkManager/NetworkManager/pull/165
2018-07-12 07:40:02 +02:00
Lubomir Rintel
7e98b4cad2
checkpatch: skip foreign code
2018-07-11 12:02:06 +02:00
Lubomir Rintel
2b152a69c4
checkpatch: add a licensing hint
2018-07-11 12:02:06 +02:00
Lubomir Rintel
26910ebdd7
checkpatch: reset line counter on next file
2018-07-11 12:02:06 +02:00
Thomas Haller
24082ad09e
checkpatch: check against using "unsigned int" and "$INT_TYPE unsigned|signed"
...
Don't use the integer type before signed/unsigned, but the
other way around. That is,
unsigned long var;
instead of
long unsigned var;
Also, just use "unsigned" instead of "unsigned int".
2018-07-11 12:02:06 +02:00
Thomas Haller
a9d81031f4
checkpatch: skip over generated files from glib-mkenums
2018-07-11 12:02:06 +02:00
Thomas Haller
2d28d5d5d4
checkpatch: warn about non-leading tabs
...
Tabs are not only wrong after a space, they are always
wrong if they don't appear at the beginning of a line.
That would happen usually, when trying to align multiple
lines like
enum {
VALUE1 = 1;
OTHER_VALUE = 2;
};
When doing that, the alignment will only be correct, if the
reader later uses the same tab-width. Note that in NetworkManager
we recommend the tab-width to be 4 characters, but with our "smart
tab" indentation style, it wouldn't actually matter and the reader
is free to choose any other tab-width -- as long as we don't use
non-leading tabs.
Don't allow non-leading tabs.
2018-07-11 12:02:06 +02:00
Thomas Haller
e82e2ca730
checkpatch: warn about using glib typedefs like gchar or gint
...
We should not use glib typedefs for basic C types char, short, int,
long, float or double. We commonly do not use them, so enforce
consistency.
That is not true for typedefs like guint, which we commonly use
because it's shorter typing than "unsigned int" (or "int unsigned"
or "unsigned"). Whether or not to use guint is left undecided at this
point.
2018-07-11 12:02:06 +02:00
Lubomir Rintel
c866df7997
contrib/checkpatch: print the actual source name instead of patch name
...
This gives more relevant output in a commit check.
Include a couple of small fixes trivial enough not to deserve a separate
commit.
2018-07-10 13:32:04 +02:00
Lubomir Rintel
0f3f56695a
contrib: add checkpatch.pl
...
A naive code compliance checker. Invoke directly:
contrib/scripts/checkpatch.pl 0001-switch-comments-to-klingon.patch
contrib/scripts/checkpatch.pl hello.[ch] world.c
Use from a commit hook:
echo 'git format-patch --stdout -1 |contrib/scripts/checkpatch.pl || :>' \
>.git/hooks/post-commit
Or view the documentation with "perldoc contrib/scripts/checkpatch.pl"
2018-07-10 12:41:37 +02:00
Thomas Haller
3d41812945
contrib: add -h option to NM-log
...
Pass "-h" to highlight individual words.
"-h" stands for "highlight".
$ NM-log -h wlan0 j
2018-02-12 13:06:49 +01:00
Thomas Haller
28da0154fc
all: drop trailing spaces
2018-02-07 13:32:04 +01:00
Thomas Haller
7573594a21
platform: merge nm_platform_*_delete() delete functions
...
It only makes sense to call delete() with NMPObjects that
we obtained from the platform cache. Otherwise, if we didn't
get it from the cache in the first place, we wouldn't know
what to delete.
Hence, the input argument is (almost) always an NMPObject
in the first place. That is different from add(), where
we might create a new specific NMPlatform* instance on the
stack. For add() it makes slightly more sense to have different
functions depending on the type. For delete(), it doesn't.
2017-12-11 10:30:26 +01:00
Thomas Haller
8649fcf02a
contrib: use less in NM-log to pre-process input
...
GNU less supports filters. That makes it nice to use instead of cat.
Also, less is well suited for output to a pipe.
With this, `NM-log nm-log.txt.gz` works as you would expect
2017-11-21 15:14:32 +01:00
Thomas Haller
102a58bb62
contrib/scripts: fix coloring for platform messages in NM-log for old logs
...
Older logfiles contain
platform: route: adding or updating IPv4 route: 10.1.0
Hightlight that too.
2017-10-03 15:35:56 +02:00
Thomas Haller
18f53a8b30
contrib/scripts: update coloring for platform messages in NM-log (2)
...
Fixes: 9344013977
2017-09-25 18:36:08 +02:00
Thomas Haller
9344013977
contrib/scripts: update coloring for platform messages in NM-log
2017-09-25 15:13:02 +02:00
Thomas Haller
66a09b2192
contrib/NM-log: don't use exec in bash functions
...
When sourcing the file, using exec inside NM-show-journal is a bad idea,
because it replaces the calling shell.
2017-09-08 17:18:32 +02:00
Thomas Haller
d4a5e2b1c8
contrib/NM-log: don't run less with --quit-on-intr argument
...
I find it annoying when ^C exits less and it prompts me to often
do `NM-log | less -R` instead.
2017-09-07 14:45:26 +02:00
Thomas Haller
83e2764050
contrib/NM-log: colorize warnings and errors in red (fix)
...
Must not colorize the trailing space, otherwise the following
" device" will no longer match.
2017-09-07 14:29:11 +02:00
Thomas Haller
b20fc58b3c
contrib/NM-log: colorize warnings and errors in red
...
- remove "\r\n" line endings
- colorize <warn> and <error> in red
- extend matching the info levels to include the timestamp. This
(intentionally) will no longer highlight messages from ModemManager,
which don't include a timestamp.
2017-09-07 14:24:56 +02:00
Thomas Haller
cffde0101e
contrib/NM-log: improve script and make it sourceable
...
- use "grep -a" so that grep doesn't refuse to work in binary input.
- make the script source-able to only define the NM-colorize and
NM-show-journal
- In case the script is sourced, it also defines a NM-log function,
which does the same as the script itself.
- rename internal functions so that they have names starting with "NM"
in case of sourcing.
2017-09-07 14:04:13 +02:00
Thomas Haller
1fbd8c079c
contrib/scripts: add NM-log helper
...
To pretty print and colorize NetworkManager logfiles.
2017-08-24 18:40:49 +02:00
Beniamino Galvani
c46627e1dc
contrib: add macsec test script
2017-01-16 17:47:10 +01:00
Jiří Klimeš
c391fb299b
nm-import-openvpn: sort the options alphabetically
2016-11-10 20:56:44 +01:00
Jiří Klimeš
3219bb3b76
nm-import-openvpn: remove old code for 'dev' option
2016-11-10 20:56:44 +01:00
Jiří Klimeš
79643ce28a
nm-import-openvpn: parse quoted string as a single word
...
It is necessary, for example, for this to work:
verify-x509-name "C=US, L=Cambridge, CN=GNOME, emailAddress=networkmanager-list@gnome.org" subject
2016-11-10 20:56:44 +01:00
Jiří Klimeš
c4ed2483b2
nm-import-openvpn: import 'verify-x509-name' option
...
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=b51b3562ce079cc0be426e968fe1c90faadc0efd
2016-11-10 20:56:44 +01:00
Jiří Klimeš
bc446c3ab8
nm-import-openvpn: improve importing 'comp-lzo' option
...
https://bugzilla.gnome.org/show_bug.cgi?id=769177
https://bugzilla.redhat.com/show_bug.cgi?id=1355688
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833166
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=62bdd278d69cc396479af9d05a0b776d5ad386bf
2016-11-10 20:56:44 +01:00
Jiří Klimeš
e58cfa4fc1
nm-import-openvpn: improve parsing and checking 'route' option
2016-11-10 20:56:44 +01:00
Jiří Klimeš
f7e4b748e1
nm-import-openvpn: import 'ns-cert-type' option
...
https://bugzilla.gnome.org/show_bug.cgi?id=719430
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=644e55ed404edbc953e323d13c57297b53cc0f8b
2016-11-10 20:56:44 +01:00
Jiří Klimeš
978328712b
nm-import-openvpn: import 'tls-cipher' option
...
https://bugzilla.gnome.org/show_bug.cgi?id=763484
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=d7a84afe1d1948c7990a08b18913e65550c222a0
2016-11-10 20:56:44 +01:00
Jiří Klimeš
367d13a7dd
nm-import-openvpn: import 'max-routes' option
...
https://bugzilla.gnome.org/show_bug.cgi?id=720097
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=c4d45e51280d5b0cb8c5e8f826d68c3262162080
2016-11-10 20:56:44 +01:00
Jiří Klimeš
966e0fb50e
nm-import-openvpn: import 'tun-ipv6' option
...
https://bugzilla.gnome.org/show_bug.cgi?id=761907
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=ffda527d8a932f2e3419d6c64623540e5b190d9e
2016-11-10 20:56:44 +01:00
Jiří Klimeš
acaf7cf641
nm-import-openvpn: import 'route' option
...
https://bugzilla.gnome.org/show_bug.cgi?id=753578
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=4eb5f3ad43cdc62c6d4d254731e24c90b87ba91a
2015-12-07 12:22:45 +01:00
Jiří Klimeš
02cfeac668
nm-import-openvpn: import 'keepalive' option
...
https://bugzilla.gnome.org/show_bug.cgi?id=651657
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=6afd16bcacd87a019e12f4df0d63a9e0e8c94e9e
2015-08-19 12:39:06 +02:00
Jiří Klimeš
e655358d44
nm-import-openvpn: import 'ping', 'ping-exit' and 'ping-restart' options
...
https://bugzilla.gnome.org/show_bug.cgi?id=651657
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=054cc997ca38e5d786859fa6d032c4404af3d28a
2015-08-19 12:23:04 +02:00
Jiří Klimeš
bde1cd342e
nm-import-openvpn: improve error checking
2015-08-19 12:23:04 +02:00
Jiří Klimeš
a646870684
nm-import-openvpn: fix importing OpenVPN configuration with 'tls-client'
2015-08-19 10:58:29 +02:00
Jiří Klimeš
a5e43ab510
nm-import-openvpn: import 'float' OpenVPN option
...
https://bugzilla.gnome.org/show_bug.cgi?id=737108
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
2015-05-28 12:04:58 +02:00
Jiří Klimeš
466515e953
contrib/scripts: fix importing 'remote' and 'remote-random' options for openvpn
...
see https://bugzilla.redhat.com/show_bug.cgi?id=1194643
2015-05-19 09:21:50 +02:00
Jiří Klimeš
29473f1bc4
contrib/scripts: nm-import-openconnect - script for importing OpenConnect VPN configs to NM
2015-05-19 09:21:50 +02:00
Jiří Klimeš
db0cf1e7f6
contrib/scripts: nm-import-vpnc - script for importing Cisco VPN configs to NM
2015-05-19 09:21:50 +02:00
Jiří Klimeš
1a2798d1a4
contrib/scripts: nm-import-openvpn - script for importing OpenVPN configs to NM
...
Synopsis:
$ nm-import-openvpn -i <infile1> <infile2> ...
$ nm-import-openvpn <infile> <outfile>
Put the file to NetworkManager:
# cp <outfile> /etc/NetworkManager/system-connections/
# chmod 600 /etc/NetworkManager/system-connections/<outfile>
# nmcli con load /etc/NetworkManager/system-connections/<outfile>
2015-05-19 09:21:50 +02:00