diff options
Diffstat (limited to 'gnu/services')
| -rw-r--r-- | gnu/services/networking.scm | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index c8a7ce21c95..cc3876492d8 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm | |||
| @@ -1487,11 +1487,9 @@ project's documentation} for more information." | |||
| 1487 | #$@(if (pair? dnsmasq-configuration-files) ;if non-empty | 1487 | #$@(if (pair? dnsmasq-configuration-files) ;if non-empty |
| 1488 | ;; If /etc/NetworkManager/dnsmasq.d is a symlink to a store file, | 1488 | ;; If /etc/NetworkManager/dnsmasq.d is a symlink to a store file, |
| 1489 | ;; delete it. | 1489 | ;; delete it. |
| 1490 | `((if (and (file-exists? "/etc/NetworkManager/dnsmasq.d") | 1490 | `((when (false-if-exception |
| 1491 | (store-file-name? | 1491 | (store-file-name? (readlink "/etc/NetworkManager/dnsmasq.d"))) |
| 1492 | (canonicalize-path "/etc/NetworkManager/dnsmasq.d"))) | 1492 | (delete-file "/etc/NetworkManager/dnsmasq.d")) |
| 1493 | (delete-file-recursively | ||
| 1494 | "/etc/NetworkManager/dnsmasq.d")) | ||
| 1495 | (symlink | 1493 | (symlink |
| 1496 | ,(file-union "network-manager-dnsmasq-configuration-directory" | 1494 | ,(file-union "network-manager-dnsmasq-configuration-directory" |
| 1497 | dnsmasq-configuration-files) | 1495 | dnsmasq-configuration-files) |
| @@ -1500,11 +1498,9 @@ project's documentation} for more information." | |||
| 1500 | #$@(if (pair? extra-configuration-files) ;if non-empty | 1498 | #$@(if (pair? extra-configuration-files) ;if non-empty |
| 1501 | ;; If /etc/NetworkManager/conf.d is a symlink to a store file, | 1499 | ;; If /etc/NetworkManager/conf.d is a symlink to a store file, |
| 1502 | ;; delete it. | 1500 | ;; delete it. |
| 1503 | `((if (and (file-exists? "/etc/NetworkManager/conf.d") | 1501 | `((when (false-if-exception |
| 1504 | (store-file-name? | 1502 | (store-file-name? (readlink "/etc/NetworkManager/conf.d"))) |
| 1505 | (canonicalize-path "/etc/NetworkManager/conf.d"))) | 1503 | (delete-file "/etc/NetworkManager/conf.d")) |
| 1506 | (delete-file-recursively | ||
| 1507 | "/etc/NetworkManager/conf.d")) | ||
| 1508 | ;; If it exists but is not a symlink to a store file, then | 1504 | ;; If it exists but is not a symlink to a store file, then |
| 1509 | ;; this will fail with EEXIST; we leave this for the user to | 1505 | ;; this will fail with EEXIST; we leave this for the user to |
| 1510 | ;; handle, since they probably created the directory | 1506 | ;; handle, since they probably created the directory |
