Skip to content

Commit

Permalink
resolved: onlyif snippet requires shell support
Browse files Browse the repository at this point in the history
Fixes a problem (I) introduced in voxpupuli#276.

Signed-off-by: Simon Deziel <simon@sdeziel.info>
  • Loading branch information
simondeziel committed Aug 15, 2022
1 parent 4989f36 commit 0f2f463
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions manifests/resolved.pp
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@
# /etc/resolv.conf to something that might actually work on
# reboot.
exec { 'restore_resolv.conf_if_possible':
command => 'cp --remove-destination -f /run/systemd/resolve/resolv.conf /etc/resolv.conf',
onlyif => 'l="$(readlink /etc/resolv.conf)"; test "$l" = "/run/systemd/resolve/resolv.conf" || test "$l" = "/run/systemd/resolve/stub-resolv.conf',
path => $facts['path'],
command => 'cp --remove-destination -f /run/systemd/resolve/resolv.conf /etc/resolv.conf',
onlyif => 'l="$(readlink /etc/resolv.conf)"; test "$l" = "/run/systemd/resolve/resolv.conf" || test "$l" = "/run/systemd/resolve/stub-resolv.conf',
path => $facts['path'],
provider => 'shell',
}
}
}
Expand Down

0 comments on commit 0f2f463

Please sign in to comment.