Project

General

Profile

Download (16.2 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/* $Id$ */
3
/*
4
	services.inc
5
	part of m0n0wall (http://m0n0.ch/wall)
6

    
7
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
8
	All rights reserved.
9

    
10
	Redistribution and use in source and binary forms, with or without
11
	modification, are permitted provided that the following conditions are met:
12

    
13
	1. Redistributions of source code must retain the above copyright notice,
14
	   this list of conditions and the following disclaimer.
15

    
16
	2. Redistributions in binary form must reproduce the above copyright
17
	   notice, this list of conditions and the following disclaimer in the
18
	   documentation and/or other materials provided with the distribution.
19

    
20
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
21
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
24
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
	POSSIBILITY OF SUCH DAMAGE.
30
*/
31

    
32
/* include all configuration functions */
33
require_once("functions.inc");
34

    
35
function services_dhcpd_configure() {
36
	global $config, $g;
37

    
38
	/* kill any running dhcpd */
39
	killbypid("{$g['varrun_path']}/dhcpd.pid");
40

    
41
	$syscfg = $config['system'];
42
	$dhcpdcfg = $config['dhcpd'];
43

    
44
	/* DHCP enabled on any interfaces? */
45
	$dhcpdenable = false;
46
	foreach ($dhcpdcfg as $dhcpif => $dhcpifconf) {
47
		if (isset($dhcpifconf['enable']) &&
48
			(($dhcpif == "lan") ||
49
			(isset($config['interfaces'][$dhcpif]['enable']) &&
50
			$config['interfaces'][$dhcpif]['if'] && (!$config['interfaces'][$dhcpif]['bridge']))))
51
			$dhcpdenable = true;
52
	}
53

    
54
	if (!$dhcpdenable)
55
		return 0;
56

    
57
	if ($g['booting'])
58
		echo "Starting DHCP service... ";
59
	else
60
		sleep(1);
61

    
62
	/* write dhcpd.conf */
63
	$fd = fopen("{$g['varetc_path']}/dhcpd.conf", "w");
64
	if (!$fd) {
65
		printf("Error: cannot open dhcpd.conf in services_dhcpd_configure().\n");
66
		return 1;
67
	}
68

    
69
	$dhcpdconf = <<<EOD
70
option domain-name "{$syscfg['domain']}";
71
default-lease-time 7200;
72
max-lease-time 86400;
73
authoritative;
74
log-facility local7;
75
ddns-update-style none;
76

    
77
EOD;
78

    
79
	$dhcpdifs = array();
80
	foreach ($dhcpdcfg as $dhcpif => $dhcpifconf) {
81

    
82
		$ifcfg = $config['interfaces'][$dhcpif];
83

    
84
		if (!isset($dhcpifconf['enable']) ||
85
			(($dhcpif != "lan") &&
86
			(!isset($ifcfg['enable']) || !$ifcfg['if'] || $ifcfg['bridge'])))
87
			continue;
88

    
89
		$subnet = gen_subnet($ifcfg['ipaddr'], $ifcfg['subnet']);
90
		$subnetmask = gen_subnet_mask($ifcfg['subnet']);
91

    
92
		$dnscfg = "";
93

    
94
		if ($dhcpifconf['domain']) {
95
			$dnscfg .= "	option domain-name \"{$dhcpifconf['domain']}\";\n";
96
		}
97

    
98
		if (is_array($dhcpifconf['dnsserver']) && ($dhcpifconf['dnsserver'][0])) {
99
			$dnscfg .= "	option domain-name-servers " . join(",", $dhcpifconf['dnsserver']) . ";";
100
		} else if (isset($config['dnsmasq']['enable'])) {
101
			$dnscfg .= "	option domain-name-servers " . $ifcfg['ipaddr'] . ";";
102
		} else if (is_array($syscfg['dnsserver']) && ($syscfg['dnsserver'][0])) {
103
			$dnscfg .= "	option domain-name-servers " . join(",", $syscfg['dnsserver']) . ";";
104
		}
105

    
106
		$dhcpdconf .= "subnet $subnet netmask $subnetmask {\n";
107
		$dhcpdconf .= "	pool {\n";
108
		if (isset($dhcpifconf['denyunknown']))
109
		   $dhcpdconf .= "		deny unknown clients;\n";
110

    
111
		if ($dhcpifconf['gateway'])
112
			$routers = $dhcpifconf['gateway'];
113
		else
114
			$routers = $ifcfg['ipaddr'];
115

    
116
		$dhcpdconf .= <<<EOD
117
		range {$dhcpifconf['range']['from']} {$dhcpifconf['range']['to']};
118
	}
119
	option routers {$routers};
120
$dnscfg
121

    
122
EOD;
123

    
124
		if ($dhcpifconf['defaultleasetime'])
125
			$dhcpdconf .= "	default-lease-time {$dhcpifconf['defaultleasetime']};\n";
126
		if ($dhcpifconf['maxleasetime'])
127
			$dhcpdconf .= "	max-lease-time {$dhcpifconf['maxleasetime']};\n";
128

    
129
		if (is_array($dhcpifconf['winsserver']) && $dhcpifconf['winsserver'][0]) {
130
			$dhcpdconf .= "	option netbios-name-servers " . join(",", $dhcpifconf['winsserver']) . ";\n";
131
			$dhcpdconf .= "	option netbios-node-type 8;\n";
132
		}
133

    
134
		if ($dhcpifconf['next-server'])
135
			$dhcpdconf .= "	next-server {$dhcpifconf['next-server']};\n";
136
		if ($dhcpifconf['filename'])
137
			$dhcpdconf .= "	filename \"{$dhcpifconf['filename']}\";\n";
138

    
139
		$dhcpdconf .= <<<EOD
140
}
141

    
142
EOD;
143

    
144
		/* add static mappings */
145
		if (is_array($dhcpifconf['staticmap'])) {
146

    
147
			$i = 0;
148
			foreach ($dhcpifconf['staticmap'] as $sm) {
149
				$dhcpdconf .= <<<EOD
150
host s_{$dhcpif}_{$i} {
151
	hardware ethernet {$sm['mac']};
152

    
153
EOD;
154
				if ($sm['ipaddr'])
155
					$dhcpdconf .= "	fixed-address {$sm['ipaddr']};\n";
156

    
157
				$dhcpdconf .= "}\n";
158
				$i++;
159
			}
160
		}
161

    
162
		$dhcpdifs[] = $ifcfg['if'];
163
	}
164

    
165
	fwrite($fd, $dhcpdconf);
166
	fclose($fd);
167

    
168
	/* create an empty leases database */
169
	touch("{$g['vardb_path']}/dhcpd.leases");
170

    
171
	/* fire up dhcpd */
172
	mwexec("/usr/local/sbin/dhcpd -cf {$g['varetc_path']}/dhcpd.conf " .
173
		join(" ", $dhcpdifs));
174

    
175
	if ($g['booting']) {
176
                print "done.\n";
177
	}
178

    
179
	return 0;
180
}
181

    
182
function interfaces_staticarp_configure($if) {
183
        global $config, $g;
184
        
185
        $ifcfg = $config['interfaces'][$if];
186

    
187
        /* Enable staticarp, if enabled */
188
        if(isset($config['dhcpd'][$if]['staticarp'])) {
189
                mwexec("/sbin/ifconfig " . escapeshellarg($ifcfg['if']) . " staticarp " );
190
                mwexec("/usr/sbin/arp -ad > /dev/null 2>&1 ");
191
                if (is_array($config['dhcpd'][$if]['staticmap'])) {
192

    
193
                        foreach ($config['dhcpd'][$if]['staticmap'] as $arpent) {
194
                                mwexec("/usr/sbin/arp -s " . escapeshellarg($arpent['ipaddr']) . " " . escapeshellarg($arpent['mac']));
195

    
196
                        }
197
                        
198
                }
199
        } else {
200
                mwexec("/sbin/ifconfig " . escapeshellarg($ifcfg['if']) . " -staticarp " );
201
                mwexec("/usr/sbin/arp -ad > /dev/null 2>&1 ");
202
        }
203

    
204
        return 0;
205
}
206

    
207
function services_dhcrelay_configure() {
208
	global $config, $g;
209

    
210
	/* kill any running dhcrelay */
211
	killbypid("{$g['varrun_path']}/dhcrelay.pid");
212

    
213
	$dhcrelaycfg = $config['dhcrelay'];
214

    
215
	/* DHCPRelay enabled on any interfaces? */
216
	$dhcrelayenable = false;
217
	foreach ($dhcrelaycfg as $dhcrelayif => $dhcrelayifconf) {
218
		if (isset($dhcrelayifconf['enable']) &&
219
			(($dhcrelayif == "lan") ||
220
			(isset($config['interfaces'][$dhcrelayif]['enable']) &&
221
			$config['interfaces'][$dhcrelayif]['if'] && (!$config['interfaces'][$dhcrelayif]['bridge']))))
222
			$dhcrelayenable = true;
223
	}
224

    
225
	if (!$dhcrelayenable)
226
		return 0;
227

    
228
	if ($g['booting'])
229
		echo "Starting DHCP relay service... ";
230
	else
231
		sleep(1);
232

    
233
	$dhcrelayifs = array();
234
	foreach ($dhcrelaycfg as $dhcrelayif => $dhcrelayifconf) {
235

    
236
		$ifcfg = $config['interfaces'][$dhcrelayif];
237

    
238
		if (!isset($dhcrelayifconf['enable']) ||
239
			(($dhcrelayif != "lan") &&
240
			(!isset($ifcfg['enable']) || !$ifcfg['if'] || $ifcfg['bridge'])))
241
			continue;
242

    
243
		$dhcrelayifs[] = $ifcfg['if'];
244
	}
245

    
246
	/* In order for the relay to work, it needs to be active on the
247
	   interface in which the destination server sits */
248
	foreach ($config['interfaces'] as $ifname) {
249
		$subnet = $ifname['ipaddr'] . "/" . $ifname['subnet'];
250
		if (ip_in_subnet($dhcrelaycfg['server'],$subnet))
251
			$destif = $ifname['if'];
252
	}
253

    
254
	if (!isset($destif))
255
		$destif = $config['interfaces']['wan']['if'];
256

    
257
	$dhcrelayifs[] = $destif;
258
	$dhcrelayifs = array_unique($dhcrelayifs);
259

    
260
	/* fire up dhcrelay */
261
	$cmd = "/usr/local/sbin/dhcrelay -i " .  join(" -i ", $dhcrelayifs);
262

    
263
	if (isset($dhcrelaycfg['agentoption']))
264
		$cmd .=  " -a -m replace";
265

    
266
	$cmd .= " {$dhcrelaycfg['server']}";
267
	mwexec($cmd);
268

    
269
	if (!$g['booting']) {
270
		filter_configure();
271
	}
272

    
273
	return 0;
274
}
275

    
276
function services_dyndns_reset() {
277
	global $config, $g;
278

    
279
	if (file_exists("{$g['vardb_path']}/ez-ipupdate.cache")) {
280
		unlink("{$g['vardb_path']}/ez-ipupdate.cache");
281
	}
282

    
283
	if (file_exists("{$g['conf_path']}/ez-ipupdate.cache")) {
284
		conf_mount_rw();
285
		unlink("{$g['conf_path']}/ez-ipupdate.cache");
286
		conf_mount_ro();
287
	}
288

    
289
	return 0;
290
}
291

    
292
function services_dyndns_configure() {
293
	global $config, $g;
294

    
295
	/* kill any running ez-ipupdate */
296
	/* ez-ipupdate needs SIGQUIT instead of SIGTERM */
297
	sigkillbypid("{$g['varrun_path']}/ez-ipupdate.pid", "QUIT");
298

    
299
	$dyndnscfg = $config['dyndns'];
300
	$wancfg = $config['interfaces']['wan'];
301

    
302
	if (isset($dyndnscfg['enable'])) {
303

    
304
		if ($g['booting'])
305
			echo "Starting DynDNS client... ";
306
		else
307
			sleep(1);
308

    
309
		/* determine WAN interface name */
310
		$wanif = get_real_wan_interface();
311

    
312
		/* write ez-ipupdate.conf */
313
		$fd = fopen("{$g['varetc_path']}/ez-ipupdate.conf", "w");
314
		if (!$fd) {
315
			printf("Error: cannot open ez-ipupdate.conf in services_dyndns_configure().\n");
316
			return 1;
317
		}
318

    
319
		$ezipupdateconf = <<<EOD
320
service-type={$dyndnscfg['type']}
321
user={$dyndnscfg['username']}:{$dyndnscfg['password']}
322
host={$dyndnscfg['host']}
323
interface=$wanif
324
max-interval=2073600
325
pid-file={$g['varrun_path']}/ez-ipupdate.pid
326
cache-file={$g['vardb_path']}/ez-ipupdate.cache
327
execute=/etc/rc.dyndns.storecache
328
daemon
329

    
330
EOD;
331

    
332
		/* enable MX? */
333
		if ($dyndnscfg['mx']) {
334
			$ezipupdateconf .= "mx={$dyndnscfg['mx']}\n";
335
		}
336

    
337
		/* enable wildcards? */
338
		if (isset($dyndnscfg['wildcard'])) {
339
			$ezipupdateconf .= "wildcard\n";
340
		}
341

    
342
		fwrite($fd, $ezipupdateconf);
343
		fclose($fd);
344

    
345
		/* if we're booting, copy the cache file from /conf */
346
		if ($g['booting']) {
347
			if (file_exists("{$g['conf_path']}/ez-ipupdate.cache")) {
348
				copy("{$g['conf_path']}/ez-ipupdate.cache", "{$g['vardb_path']}/ez-ipupdate.cache");
349
			}
350
		}
351

    
352
		/* run ez-ipupdate */
353
		mwexec("/usr/local/bin/ez-ipupdate -c {$g['varetc_path']}/ez-ipupdate.conf");
354

    
355
		if ($g['booting'])
356
			echo "done.\n";
357
	}
358

    
359
	return 0;
360
}
361

    
362
function services_dnsmasq_configure() {
363
	global $config, $g;
364

    
365
	/* kill any running dnsmasq */
366
	sigkillbypid("{$g['varrun_path']}/dnsmasq.pid", "TERM");
367

    
368
	if (isset($config['dnsmasq']['enable'])) {
369

    
370
		if ($g['booting'])
371
			echo "Starting DNS forwarder... ";
372
		else
373
			sleep(1);
374

    
375
		/* generate hosts file */
376
		system_hosts_generate();
377

    
378
		$args = "";
379

    
380
		if (isset($config['dnsmasq']['regdhcp'])) {
381

    
382
			$args .= " -l {$g['vardb_path']}/dhcpd.leases" .
383
				" -s {$config['system']['domain']}";
384
		}
385

    
386
		/* run dnsmasq */
387
		mwexec("/usr/local/sbin/dnsmasq {$args}");
388

    
389
		if ($g['booting'])
390
			echo "done.\n";
391
	}
392

    
393
	if (!$g['booting']) {
394
		services_dhcpd_configure();
395
	}
396

    
397
	return 0;
398
}
399

    
400
function services_snmpd_configure() {
401
	global $config, $g;
402

    
403
	/* kill any running snmpd */
404
	sigkillbypid("{$g['varrun_path']}/snmpd.pid", "TERM");
405

    
406
	if (isset($config['snmpd']['enable'])) {
407

    
408
		if ($g['booting'])
409
			echo "Starting SNMP daemon... ";
410

    
411
		/* generate snmpd.conf */
412
		$fd = fopen("{$g['varetc_path']}/snmpd.conf", "w");
413
		if (!$fd) {
414
			printf("Error: cannot open snmpd.conf in services_snmpd_configure().\n");
415
			return 1;
416
		}
417

    
418

    
419
		$snmpdconf = <<<EOD
420
location := "{$config['snmpd']['syslocation']}"
421
contact := "{$config['snmpd']['syscontact']}"
422
read := "{$config['snmpd']['rocommunity']}"
423

    
424
EOD;
425

    
426
/* No docs on what write strings do there for disable for now.
427
		if(isset($config['snmpd']['rwenable']) && preg_match('/^\S+$/', $config['snmpd']['rwcommunity'])){
428
		    $snmpdconf .= <<<EOD
429
# write string
430
write := "{$config['snmpd']['rwcommunity']}"
431

    
432
EOD;
433
		}
434
*/
435

    
436

    
437
		if(isset($config['snmpd']['trapenable']) && preg_match('/^\S+$/', $config['snmpd']['trapserver'])){
438
		    $snmpdconf .= <<<EOD
439
# SNMP Trap support.
440
traphost := {$config['snmpd']['trapserver']}
441
trapport := {$config['snmpd']['trapserverport']}
442
trap := "{$config['snmpd']['trapstring']}"
443

    
444

    
445
EOD;
446
		}
447

    
448

    
449
		$snmpdconf .= <<<EOD
450
system := 1     # pfSense
451
%snmpd
452
begemotSnmpdDebugDumpPdus       = 2
453
begemotSnmpdDebugSyslogPri      = 7
454
begemotSnmpdCommunityString.0.1 = $(read)
455

    
456
EOD;
457

    
458
/* No docs on what write strings do there for disable for now.
459
		if(isset($config['snmpd']['rwcommunity']) && preg_match('/^\S+$/', $config['snmpd']['rwcommunity'])){
460
		    $snmpdconf .= <<<EOD
461
begemotSnmpdCommunityString.0.2 = $(write)
462

    
463
EOD;
464
		}
465
*/
466

    
467
		
468
		if(isset($config['snmpd']['trapenable']) && preg_match('/^\S+$/', $config['snmpd']['trapserver'])){
469
		    $snmpdconf .= <<<EOD
470
begemotTrapSinkStatus.[$(traphost)].$(trapport) = 4
471
begemotTrapSinkVersion.[$(traphost)].$(trapport) = 2
472
begemotTrapSinkComm.[$(traphost)].$(trapport) = $(trap)
473

    
474
EOD;
475
		}
476

    
477

    
478
		$snmpdconf .= <<<EOD
479
begemotSnmpdCommunityDisable    = 1
480
begemotSnmpdPortStatus.0.0.0.0.161 = 1
481
begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1
482
begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4
483

    
484
sysContact      = $(contact)
485
sysLocation     = $(location)
486
sysObjectId     = 1.3.6.1.4.1.12325.1.1.2.1.$(system)
487

    
488
snmpEnableAuthenTraps = 2
489
begemotSnmpdModulePath."mibII"  = "/usr/lib/snmp_mibII.so"
490
begemotSnmpdModulePath."netgraph" = "/usr/lib/snmp_netgraph.so"
491
%netgraph
492
begemotNgControlNodeName = "snmpd"
493
begemotSnmpdModulePath."pf"     = "/usr/lib/snmp_pf.so"
494
# config must end with blank line
495

    
496
EOD;
497

    
498
		fwrite($fd, $snmpdconf);
499
		fclose($fd);
500

    
501
		/* run bsnmpd */
502
		mwexec("/usr/sbin/bsnmpd -c {$g['varetc_path']}/snmpd.conf" .
503
			" -p {$g['varrun_path']}/snmpd.pid");		  
504
//		mwexec("/usr/local/sbin/snmpd -c {$g['varetc_path']}/snmpd.conf" .
505
//			" -P {$g['varrun_path']}/snmpd.pid");
506

    
507
		if ($g['booting'])
508
			echo "done.\n";
509
	}
510

    
511
	return 0;
512
}
513

    
514
function services_proxyarp_configure() {
515
	global $config, $g;
516

    
517
	/* kill any running choparp */
518
	killbyname("choparp");
519

    
520
	if (is_array($config['proxyarp']) && count($config['proxyarp'])) {
521

    
522
		$paa = array();
523

    
524
		/* group by interface */
525
		foreach ($config['proxyarp']['proxyarpnet'] as $paent) {
526
			if ($paent['interface'])
527
				$if = $paent['interface'];
528
			else
529
				$if = "wan";
530

    
531
			if (!is_array($paa[$if]))
532
				$paa[$if] = array();
533

    
534
			$paa[$if][] = $paent;
535
		}
536

    
537
		foreach ($paa as $paif => $paents) {
538
			if ($paif == "wan" && !(is_ipaddr($config['interfaces']['wan']['ipaddr']) ||
539
                                       ($config['interfaces']['wan']['ipaddr'] == "dhcp") ||
540
                                       ($config['interfaces']['wan']['ipaddr'] == "bigpond")))
541
                               continue;
542

    
543
			$args = $config['interfaces'][$paif]['if'] . " auto";
544

    
545
			foreach ($paents as $paent) {
546

    
547
				if (isset($paent['network']))
548
					$args .= " " . escapeshellarg($paent['network']);
549
				else if (isset($paent['range']))
550
					$args .= " " . escapeshellarg($paent['range']['from'] . "-" .
551
						$paent['range']['to']);
552
			}
553

    
554
			mwexec_bg("/usr/local/sbin/choparp " . $args);
555
		}
556
	}
557
}
558

    
559
function services_dnsupdate_process() {
560
	global $config, $g;
561
	
562
	/* Dynamic DNS updating active? */
563
	if (isset($config['dnsupdate']['enable'])) {
564
		
565
		$wanip = get_current_wan_address();
566
		if ($wanip) {
567
			
568
			$keyname = $config['dnsupdate']['keyname'];
569
			/* trailing dot */
570
			if (substr($keyname, -1) != ".")
571
				$keyname .= ".";
572
			
573
			$hostname = $config['dnsupdate']['host'];
574
			/* trailing dot */
575
			if (substr($hostname, -1) != ".")
576
				$hostname .= ".";
577
			
578
			/* write private key file
579
			   this is dumb - public and private keys are the same for HMAC-MD5,
580
			   but nsupdate insists on having both */
581
			$fd = fopen("{$g['varetc_path']}/K{$keyname}+157+00000.private", "w");
582
			$privkey .= <<<EOD
583
Private-key-format: v1.2
584
Algorithm: 157 (HMAC)
585
Key: {$config['dnsupdate']['keydata']}
586

    
587
EOD;
588
			fwrite($fd, $privkey);
589
			fclose($fd);
590
			
591
			/* write public key file */
592
			if ($config['dnsupdate']['keytype'] == "zone") {
593
				$flags = 257;
594
				$proto = 3;
595
			} else if ($config['dnsupdate']['keytype'] == "host") {
596
				$flags = 513;
597
				$proto = 3;
598
			} else if ($config['dnsupdate']['keytype'] == "user") {
599
				$flags = 0;
600
				$proto = 2;
601
			}
602
			
603
			$fd = fopen("{$g['varetc_path']}/K{$keyname}+157+00000.key", "w");
604
			fwrite($fd, "{$keyname} IN KEY {$flags} {$proto} 157 {$config['dnsupdate']['keydata']}\n");
605
			fclose($fd);
606
			
607
			/* generate update instructions */
608
			$upinst =  "update delete {$config['dnsupdate']['host']} A\n";
609
			$upinst .= "update add {$config['dnsupdate']['host']} {$config['dnsupdate']['ttl']} A {$wanip}\n";
610
			$upinst .= "\n";	/* mind that trailing newline! */
611
			
612
			$fd = fopen("{$g['varetc_path']}/nsupdatecmds", "w");
613
			fwrite($fd, $upinst);
614
			fclose($fd);
615
			
616
			/* invoke nsupdate */
617
			$cmd = "/usr/sbin/nsupdate -k {$g['varetc_path']}:{$keyname}";
618
			if (isset($config['dnsupdate']['usetcp']))
619
				$cmd .= " -v";
620
			$cmd .= " {$g['varetc_path']}/nsupdatecmds";
621
			
622
			mwexec_bg($cmd);
623
		}
624
	}
625
	
626
	return 0;
627
}
628

    
629
?>
(12-12/19)