Age | Commit message (Collapse) | Author |
|
|
|
|
|
https://wiki.ubuntu.com/DashAsBinSh#A.5B
`checkbashisms` output:
> possible bashism in 10-chrony line 17 (should be 'b = a'):
> [ "$(nmcli -t --fields STATE g)" == "connected" ];
Closes #8.
|
|
|
|
networkmanager-dispatcher-chrony-update
Conflicts:
networkmanager-dispatcher-chrony/10-chrony
|
|
|
|
This feature was introduced in chrony 1.28 and
eliminates the need to parse the configuration file
or the keys file.
http://chrony.tuxfamily.org/manual.html#Chronyc-command-line-options
|
|
|
|
Localised environments might have the `nmcli` response be translated, breaking
the string comparison.
|
|
> The NetworkManager 0.9.10.0-2 that is in the repository no longer
> ships the 'nm-tool' utility, so this script is also broken in that
> area. It can be replaced by "nmcli -t --fields STATE g" easily:
>
> STATECMD="nmcli -t --fields STATE g"
> [...]
> if [ ! `${STATECMD}` = 'connected' ]; then
> [...]
>
> This fix plus the PASSWORD one now results in a fully working
> dispatcher with the latest NM release.
|
|
> This script doesn't work with the default configuration of chrony.conf
> and chrony.keys; they set the keyword 'generatecommandkey' which
> writes the key in MD5 format (other Googling shows SHA is also
> possible):
>
> 1 MD5 HEX:AABBCCDDEEFF
>
> This is documented here:
>
> http://chrony.tuxfamily.org/manual.html#commandkey-directive
>
> The issue is the sed line for PASSWORD doesn't strip out the method,
> so tries to pass "MD5 HEX:..." over to chronyc. Here's a sed that
> works for both what's in the wiki ('1 xyzzy') and the autogenerated
> keys ('1 MD5 HEX:...'):
>
> -PASSWORD=`grep ^$COMMANDKEY $KEYFILE | sed 's/[^ ]* //' -`
> +PASSWORD=`grep ^$COMMANDKEY $KEYFILE | sed 's/.*[^ ] //' -`
>
> That will extract the other direction - find the last space and grab
> what follows it, rather than finding the first space etc. It also
> looks like we could just avoid this altogether and use "chronyc -a" to
> automatically do the needful.
|
|
|
|
|
|
|
|
|