Revision 42ebf952
Added by Renato Botelho almost 9 years ago
src/etc/inc/services.inc | ||
---|---|---|
1258 | 1258 |
return 0; |
1259 | 1259 |
} |
1260 | 1260 |
|
1261 |
/* restore the leases, if we have them */ |
|
1262 |
if (platform_booting() && |
|
1263 |
isset($config['system']['use_mfs_tmpvar']) && |
|
1264 |
file_exists("{$g['cf_conf_path']}/dhcp6leases.tgz")) { |
|
1265 |
$dhcprestore = ""; |
|
1266 |
$dhcpreturn = ""; |
|
1267 |
exec("cd /;LANG=C /usr/bin/tar -xzf {$g['cf_conf_path']}/dhcp6leases.tgz 2>&1", |
|
1268 |
$dhcprestore, $dhcpreturn); |
|
1269 |
$dhcprestore = implode(" ", $dhcprestore); |
|
1270 |
if ($dhcpreturn <> 0) { |
|
1271 |
log_error(sprintf(gettext( |
|
1272 |
'DHCP leases v6 restore failed exited with %1$s, the error is: %2$s'), |
|
1273 |
$dhcpreturn, $dhcprestore)); |
|
1274 |
} |
|
1275 |
} |
|
1276 |
|
|
1261 | 1277 |
$syscfg = $config['system']; |
1262 | 1278 |
if (!is_array($config['dhcpdv6'])) { |
1263 | 1279 |
$config['dhcpdv6'] = array(); |
Also available in: Unified diff
Restore accidentally removed block
On dc61252ae the code used to restore dhcp6 leases when platform was
nanobsd was removed, but this code is supposed to run on full install
when it's configured to use MFS /tmp. Restored it, adjusting indent,
and add the correct conditional to run on MFS /tmp
Spotted-by: @phil-davis