summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-06-22 03:17:18 +0000
committerColin Smith <colin@pfsense.org>2005-06-22 03:17:18 +0000
commitb662f54ff6e6969e646c3b4329275d2e30c2a61c (patch)
treeb5f866bf9964479938a20b678f0bcbd810706a0d
parentc83068f68d920f9a3dcb7070d65357c6b0903b29 (diff)
downloadpfsense-b662f54ff6e6969e646c3b4329275d2e30c2a61c.zip
pfsense-b662f54ff6e6969e646c3b4329275d2e30c2a61c.tar.gz
Make sure we're writing to a realistic prefix ;)
-rw-r--r--etc/inc/service-utils.inc3
1 files changed, 1 insertions, 2 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc
index 2601eb6..f76e4f8 100644
--- a/etc/inc/service-utils.inc
+++ b/etc/inc/service-utils.inc
@@ -35,7 +35,7 @@
function write_rcfile($params) {
global $config, $g;
- $fileprefix = "/home/colin/";
+ $fileprefix = "/usr/local/etc/rc.d/";
if(!(is_writable($fileprefix . $params['file']) or $params['start'])) return false;
$towrite .= "#!/bin/sh\n# This file was automatically generated\n# by the pfSense service handler.\n\n";
/* write our rc functions */
@@ -51,7 +51,6 @@ function write_rcfile($params) {
/* begin rcfile logic */
$towrite .= "case $1 in\n\tstart)\n\t\trc_start\n\t\t;;\n\tstop)\n\t\trc_stop\n\t\t;;\n\trestart)\n\t\trc_stop\n\t\trc_start\n\t\t;;\nesac\n\n";
$fout = fopen($fileprefix . $params['file'], "w");
- print $towrite;
fwrite($fout, $towrite);
fclose($fout);
return;
OpenPOWER on IntegriCloud