Commit 86058fb8 authored by Ad Schellevis's avatar Ad Schellevis

rename check_reload_status to configd, but keep legacy support for check_reload_status.

parent 32a052f2
......@@ -345,9 +345,12 @@ echo "done."
# Run the php.ini setup file
/usr/local/etc/rc.php_ini_setup
chmod u+rx /usr/local/opnsense/service/check_reload_status.py
/usr/local/opnsense/service/check_reload_status.py
sleep 1 # give check_reload_status some time to load to prevent missing socket
chmod u+rx /usr/local/opnsense/service/configd.py
/usr/local/opnsense/service/configd.py
# check_reload_status renamed, for legacy stuff symlink old socket
/bin/rm -f /var/run/check_reload_status
ln -s /var/run/configd.socket /var/run/check_reload_status
sleep 1 # give configd some time to load to prevent missing socket
# let the PHP-based configuration subsystem set up the system now
echo -n "Launching the init system..."
......
......@@ -430,10 +430,10 @@ pfSenseupgrade)
rm /tmp/configbak/*_log.txt 2>/dev/null
# tar explode image onto hd
ps -a | grep "check_reload_status" | awk '{print $1;}' | kill -9
ps -a | grep "configd" | awk '{print $1;}' | kill -9
echo "Installing $IMG." >> /conf/upgrade_log.txt 2>&1
cd / && /usr/bin/tar --exclude=./dev -xzUPf $IMG >> /conf/upgrade_log.txt 2>&1
/usr/local/opnsense/service/check_reload_status.py
/usr/local/opnsense/service/configd.py
echo "Image installed $IMG." >> /conf/upgrade_log.txt 2>&1
# process custom image if its passed
......
......@@ -38,7 +38,7 @@ class Backend
/**
* @var string location of configd socket
*/
private $configdSocket = "/var/run/check_reload_status";
private $configdSocket = "/var/run/configd.socket";
/**
* init Backend component
......
[main]
socket_filename:/var/run/check_reload_status
pid_filename:/var/run/check_reload_status.pid
socket_filename:/var/run/configd.socket
pid_filename:/var/run/configd.pid
......@@ -28,7 +28,7 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : check_reload_status
package : configd
function: delivers a process coordinator to handle frontend functions
......@@ -56,12 +56,12 @@ os.chdir(program_path)
# open configuration
cnf = ConfigParser.ConfigParser()
cnf.read('conf/check_reload_status.conf')
cnf.read('conf/configd.conf')
# validate configuration, exit on missing item
for config_item in ['socket_filename','pid_filename']:
if cnf.has_section('main') == False or cnf.has_option('main',config_item) == False:
print('configuration item main/%s not found in %s/conf/check_reload_status.conf'%(config_item,program_path))
print('configuration item main/%s not found in %s/conf/configd.conf'%(config_item,program_path))
sys.exit(0)
# run process coordinator ( on console or as daemon )
......
......@@ -28,7 +28,7 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : check_reload_status
package : configd
function: commandline execute commands to check_reload_status daemon
......@@ -63,6 +63,16 @@ except socket.error, msg:
try:
print ('send:%s '%exec_command)
sock.send(exec_command)
print ('response:%s'% sock.recv(4096))
data = []
while True:
line = sock.recv(4096)
if line:
data.append(line)
else:
break
print ('response:%s'% ''.join(data) )
finally:
sock.close()
......@@ -27,7 +27,7 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : check_reload_status
package : configd
function: config handler
......
......@@ -27,7 +27,7 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : check_reload_status
package : configd
function: unix domain socket process worker process
......
......@@ -27,7 +27,7 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : check_reload_status
package : configd
function: unix domain socket process worker process
......
......@@ -27,7 +27,7 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : check_reload_status
package : configd
function: template handler, generate configuration files using templates
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment