Details |
Last modification |
View Log
| RSS feed
Rev |
Author |
Line No. |
Line |
203 |
- |
1 |
#!/bin/sh
|
|
|
2 |
# This is a NetworkManager dispatcher / networkd-dispatcher script for
|
|
|
3 |
# chronyd to set its NTP sources online or offline when a network interface
|
|
|
4 |
# is configured or removed
|
|
|
5 |
|
|
|
6 |
export LC_ALL=C
|
|
|
7 |
|
|
|
8 |
chronyc=/usr/bin/chronyc
|
|
|
9 |
|
|
|
10 |
# For NetworkManager consider only up/down events
|
|
|
11 |
[ $# -ge 2 ] && [ "$2" != "up" ] && [ "$2" != "down" ] && exit 0
|
|
|
12 |
|
|
|
13 |
# Note: for networkd-dispatcher routable.d ~= on and off.d ~= off
|
|
|
14 |
|
|
|
15 |
$chronyc onoffline > /dev/null 2>&1
|
|
|
16 |
|
|
|
17 |
exit 0
|