Commit c0282c12 authored by Franco Fichtner's avatar Franco Fichtner

rc: switch to static binary for recovery

parent 884d4ec3
...@@ -171,7 +171,7 @@ function recover_ports() ...@@ -171,7 +171,7 @@ function recover_ports()
'post-install' 'post-install'
); );
exec('/usr/sbin/pkg query -e \'%#U > 0 || %#G > 0\' %n', $pkgs); exec('/usr/local/sbin/pkg-static query -e \'%#U > 0 || %#G > 0\' %n', $pkgs);
if ($pkgs[0] == '') { if ($pkgs[0] == '') {
return; return;
...@@ -181,7 +181,7 @@ function recover_ports() ...@@ -181,7 +181,7 @@ function recover_ports()
$tempfile = fopen($tempname, 'w'); $tempfile = fopen($tempname, 'w');
foreach ($pkgs as $pkg) { foreach ($pkgs as $pkg) {
$raw = exec('/usr/sbin/pkg info --raw --raw-format json-compact ' . $pkg); $raw = exec('/usr/local/sbin/pkg-static info --raw --raw-format json-compact ' . $pkg);
$info = json_decode($raw, true); $info = json_decode($raw, true);
foreach($actions as $action) { foreach($actions as $action) {
if (!isset($info['scripts'][$action])) { if (!isset($info['scripts'][$action])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment