Revision 27bb6557
Added by Warren Baker about 13 years ago
etc/inc/services.inc | ||
---|---|---|
1443 | 1443 |
else |
1444 | 1444 |
sleep(1); |
1445 | 1445 |
|
1446 |
/* Setup Unbound DHCP Chroot environment */ |
|
1447 |
$fd = fopen("{$g['tmp_path']}/unbound.sh","w"); |
|
1448 |
$status = `/sbin/mount | /usr/bin/grep "{$g['unbound_chroot_path']}/dev"`; |
|
1449 |
fwrite($fd, "mkdir -p {$g['unbound_chroot_path']}\n"); |
|
1450 |
fwrite($fd, "mkdir -p {$g['unbound_chroot_path']}/dev\n"); |
|
1451 |
fwrite($fd, "mkdir -p {$g['unbound_chroot_path']}/etc\n"); |
|
1452 |
if(!trim($status)) |
|
1453 |
fwrite($fd, "mount -t devfs devfs {$g['unbound_chroot_path']}/dev\n"); |
|
1454 |
fclose($fd); |
|
1455 |
mwexec("/bin/sh {$g['tmp_path']}/unbound.sh"); |
|
1456 |
|
|
1446 | 1457 |
/* generate Unbound config file */ |
1447 | 1458 |
if(unbound_generate_config()!=0) { |
1448 | 1459 |
log_error("Problem generating Unbound configuration."); |
Also available in: Unified diff
Setup chroot environment for unbound