diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-06-30 21:54:20 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-06-30 21:54:20 +0000 |
commit | daf52412e8bf520a13c3ccbc90ffb6c7cde0d9c9 (patch) | |
tree | 78f91d8894071ec31e844d528f778cf8eaf10e76 /usr | |
parent | 6f20377b6fdf63cccc433ed684fbf91430c57a40 (diff) | |
download | pfsense-daf52412e8bf520a13c3ccbc90ffb6c7cde0d9c9.zip pfsense-daf52412e8bf520a13c3ccbc90ffb6c7cde0d9c9.tar.gz |
Correctly move upnp to base since LiveCD cannot write files to /usr/local/etc or /usr/local/etc/rc.d/
Ticket #1342
Diffstat (limited to 'usr')
-rw-r--r-- | usr/local/pkg/miniupnpd.inc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/usr/local/pkg/miniupnpd.inc b/usr/local/pkg/miniupnpd.inc index 5a2c543..c13cc30 100644 --- a/usr/local/pkg/miniupnpd.inc +++ b/usr/local/pkg/miniupnpd.inc @@ -11,8 +11,19 @@ function upnp_warn ($msg) { syslog(LOG_WARNING, "miniupnpd: {$msg}"); return; } function upnp_action ($action) { - if (file_exists(UPNP_RCFILE)) - mwexec(UPNP_RCFILE.' '.$action); + switch($action) { + case "start": + mwexec("killall miniupnpd 2>/dev/null"); + upnp_start(); + break; + case "stop": + mwexec("killall miniupnpd"); + break; + case "restart": + mwexec("killall miniupnpd"); + upnp_start(); + break; + } } function upnp_running () { |