Project

General

Profile

« Previous | Next » 

Revision 5caa648d

Added by Scott Ullrich almost 16 years ago

It seems upon captive portal startup the captiveportal.db file is not written out until the /etc/rc.prunecaptiveportal script is run. If the Operator decides to visit status -> captive portal right after enabling the service they will be greated with some nasty nasty errors. Silence this nonsense by creating a blank captiveportal.db file right after nuking it.

View differences:

etc/inc/captiveportal.inc
98 98
		unlink_if_exists("{$g['vardb_path']}/captiveportal_ip.db");
99 99
		unlink_if_exists("{$g['vardb_path']}/captiveportal_radius.db");
100 100

  
101
		/* setup new database in case someone tries to access the status -> captive portal page */
102
		touch("{$g['vardb_path']}/captiveportal.db");
103

  
101 104
		/* write portal page */
102 105
		if ($config['captiveportal']['page']['htmltext'])
103 106
			$htmltext = base64_decode($config['captiveportal']['page']['htmltext']);

Also available in: Unified diff