Move setkey to /sbin/setkey from /usr/sbin/setkey due to FreeBSD changing the location.

This commit is contained in:
Scott Ullrich 2005-12-22 18:59:24 +00:00
parent 8022eaaafc
commit fe227c6959
4 changed files with 11 additions and 11 deletions

View File

@ -94,8 +94,8 @@ function vpn_ipsec_configure($ipchg = false) {
//echo "Enabling [VIA Padlock] ...";
//mwexec("/sbin/kldload padlock");
//mwexec("/sbin/sysctl net.inet.ipsec.crypto_support=1");
//mwexec("/usr/sbin/setkey -F");
//mwexec("/usr/sbin/setkey -FP");
//mwexec("/sbin/setkey -F");
//mwexec("/sbin/setkey -FP");
//echo " done.\n";
}
}
@ -142,8 +142,8 @@ function vpn_ipsec_configure($ipchg = false) {
}
/* flush SPD and SAD */
mwexec("/usr/sbin/setkey -FP");
mwexec("/usr/sbin/setkey -F");
mwexec("/sbin/setkey -FP");
mwexec("/sbin/setkey -F");
if (isset($ipseccfg['enable'])) {
@ -219,7 +219,7 @@ function vpn_ipsec_configure($ipchg = false) {
fclose($fd);
/* load SPD */
mwexec("/usr/sbin/setkey -c < {$g['varetc_path']}/spd.conf");
mwexec("/sbin/setkey -c < {$g['varetc_path']}/spd.conf");
}
/* generate racoon.conf */

View File

@ -57,7 +57,7 @@ include("head.inc");
/* delete any SA? */
if ($_GET['act'] == "del") {
$fd = @popen("/usr/sbin/setkey -c > /dev/null 2>&1", "w");
$fd = @popen("/sbin/setkey -c > /dev/null 2>&1", "w");
if ($fd) {
fwrite($fd, "delete {$_GET['src']} {$_GET['dst']} {$_GET['proto']} {$_GET['spi']} ;\n");
pclose($fd);
@ -66,7 +66,7 @@ if ($_GET['act'] == "del") {
}
/* query SAD */
$fd = @popen("/usr/sbin/setkey -D", "r");
$fd = @popen("/sbin/setkey -D", "r");
$sad = array();
if ($fd) {
while (!feof($fd)) {

View File

@ -57,7 +57,7 @@ include("head.inc");
/* delete any SP? */
if ($_GET['act'] == "del") {
$fd = @popen("/usr/sbin/setkey -c > /dev/null 2>&1", "w");
$fd = @popen("/sbin/setkey -c > /dev/null 2>&1", "w");
if ($fd) {
fwrite($fd, "spddelete {$_GET['src']} {$_GET['dst']} any -P {$_GET['dir']} ;\n");
pclose($fd);
@ -66,7 +66,7 @@ if ($_GET['act'] == "del") {
}
/* query SAD */
$fd = @popen("/usr/sbin/setkey -DP", "r");
$fd = @popen("/sbin/setkey -DP", "r");
$spd = array();
if ($fd) {
while (!feof($fd)) {

View File

@ -128,8 +128,8 @@ defCmdT("ez-ipupdate.cache","cat /conf/ez-ipupdate.cache");
defCmdT("df","/bin/df");
defCmdT("racoon.conf","cat /var/etc/racoon.conf");
defCmdT("SPD","/usr/sbin/setkey -DP");
defCmdT("SAD","/usr/sbin/setkey -D");
defCmdT("SPD","/sbin/setkey -DP");
defCmdT("SAD","/sbin/setkey -D");
defCmdT("last 200 system log entries","/usr/sbin/clog /var/log/system.log 2>&1 | tail -n 200");
defCmdT("last 50 filter log entries","/usr/sbin/clog /var/log/filter.log 2>&1 | tail -n 50");