slitaz-tools view tinyutils/netbox @ rev 126

netbox: add servers tab
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Apr 08 08:27:19 2008 +0000 (2008-04-08)
parents bcdf06f0074a
children 36695da47702
line source
1 #!/bin/sh
2 #
3 # Gtkdialog box to manage network connexion.
4 # - SliTaz GNU/Linux 2008.
5 #
6 VERSION=20080113
8 # Check if user is root.
9 check_root()
10 {
11 if test $(id -u) != 0 ; then
12 echo -e "
13 You must be root to run `basename $0`. Please type 'su' and
14 root password to become super-user.\n"
15 exit 0
16 fi
17 }
19 # Interafce status with ifconfig without arguments to show all
20 # active connections.
21 #
22 export IFCONFIG='
23 <window title="Ifconfig" icon-name="network-wired">
24 <vbox>
25 <text use-markup="true">
26 <label>"
27 <b>Active network interfaces</b>"
28 </label>
29 </text>
30 <text wrap="false">
31 <input>date</input>
32 </text>
33 <frame Ifconfig>
34 <text wrap="false" width-chars="58">
35 <input>ifconfig</input>
36 </text>
37 </frame>
38 <hbox>
39 <button>
40 <input file icon="exit"></input>
41 <action type="closewindow">IFCONFIG</action>
42 </button>
43 </hbox>
44 </vbox>
45 </window>
46 '
48 # The main dialog with notebook, start/stop buttons and all options.
49 # Note than /etc/network.conf is seded wehwn an interafce is activate
50 #
51 NET_BOX='
52 <window title="Netbox" icon-name="network-wired">
53 <vbox>
54 <text use-markup="true">
55 <label>
56 "
57 <b>SliTaz - Netbox</b>"
58 </label>
59 </text>
60 <text wrap="true" width-chars="44">
61 <label>
62 "
63 Manage network connections getting dynamic IP
64 by DHCP or static IP, and setup servers.
65 Netbox can start or stop networking, configure
66 network interfaces or directly edit files.
67 "
68 </label>
69 </text>
71 <frame General>
72 <hbox>
73 <text use-markup="true">
74 <label>"<b>Interface :</b>"</label>
75 </text>
76 <entry>
77 <input>. /etc/network.conf; echo $INTERFACE</input>
78 <variable>INTERFACE</variable>
79 </entry>
80 </hbox>
81 </frame>
83 <notebook labels="DHCP|Static IP|System wide|Servers">
85 <frame Udhcpc>
86 <hbox>
87 <text use-markup="true">
88 <label>"<b>Options :</b>"</label>
89 </text>
90 <entry>
91 <default>-b</default>
92 <variable>UDHCPC_OPTS</variable>
93 </entry>
94 <button>
95 <input file icon="help"></input>
96 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x27 -title "udhcpc help" -e "udhcpc --help ; echo -e \"----\nENTER to continue...\" && read close"</action>
97 </button>
98 </hbox>
99 <hbox>
100 <button>
101 <label>Start</label>
102 <input file icon="forward"></input>
103 <action>sed -i s/`cat /etc/network.conf | grep ^INTERFACE=`/INTERFACE=\"$INTERFACE\"/ /etc/network.conf</action>
104 <action>sed -i s/DHCP=\"no\"/DHCP=\"yes\"/ /etc/network.conf</action>
105 <action>sed -i s/STATIC=\"yes\"/STATIC=\"no\"/ /etc/network.conf</action>
106 <action>udhcpc $UDHCPC_OPTS -i $INTERFACE -p /var/run/udhcpc.$INTERFACE.pid</action>
107 </button>
108 <button>
109 <label>Stop</label>
110 <input file icon="stop"></input>
111 <action>echo -n "Stopping interface : $INTERFACE... "</action>
112 <action>ifconfig $INTERFACE down</action>
113 <action>killall -q udhcpc; echo "done"</action>
114 </button>
115 </hbox>
116 </frame>
118 <frame Configuration>
119 <hbox>
120 <text use-markup="true">
121 <label>"<b>IP :</b>"</label>
122 </text>
123 <entry>
124 <input>. /etc/network.conf; echo "$IP"</input>
125 <variable>IP</variable>
126 </entry>
127 </hbox>
128 <hbox>
129 <text use-markup="true">
130 <label>"<b>Netmask :</b>"</label>
131 </text>
132 <entry>
133 <input>. /etc/network.conf; echo "$NETMASK"</input>
134 <variable>NETMASK</variable>
135 </entry>
136 </hbox>
137 <hbox>
138 <text use-markup="true">
139 <label>"<b>Gateway :</b>"</label>
140 </text>
141 <entry>
142 <input>. /etc/network.conf; echo "$GATEWAY"</input>
143 <variable>GATEWAY</variable>
144 </entry>
145 </hbox>
146 <hbox>
147 <text use-markup="true">
148 <label>"<b>DNS server :</b>"</label>
149 </text>
150 <entry>
151 <input>. /etc/network.conf; echo "$DNS_SERVER"</input>
152 <variable>DNS_SERVER</variable>
153 </entry>
154 </hbox>
155 <hbox>
156 <button>
157 <label>Start</label>
158 <input file icon="forward"></input>
159 <action>ifconfig lo down</action>
160 <action>ifconfig $INTERFACE down</action>
161 <action>sed -i s/`cat /etc/network.conf | grep ^INTERFACE=`/INTERFACE=\"$INTERFACE\"/ /etc/network.conf</action>
162 <action>sed -i s/DHCP=\"yes\"/DHCP=\"no\"/ /etc/network.conf</action>
163 <action>sed -i s/STATIC=\"no\"/STATIC=\"yes\"/ /etc/network.conf</action>
164 <action>sed -i s/`cat /etc/network.conf | grep ^IP=`/IP=\"$IP\"/ /etc/network.conf</action>
165 <action>sed -i s/`cat /etc/network.conf | grep ^NETMASK=`/NETMASK=\"$NETMASK\"/ /etc/network.conf</action>
166 <action>sed -i s/`cat /etc/network.conf | grep ^GATEWAY=`/GATEWAY=\"$GATEWAY\"/ /etc/network.conf</action>
167 <action>sed -i s/`cat /etc/network.conf | grep ^DNS_SERVER=`/DNS_SERVER=\"$DNS_SERVER\"/ /etc/network.conf</action>
168 <action>/etc/init.d/network.sh</action>
169 </button>
170 <button>
171 <label>Stop</label>
172 <input file icon="stop"></input>
173 <action>echo -n "Stopping interface : $INTERFACE... "</action>
174 <action>ifconfig $INTERFACE down; echo "done"</action>
175 </button>
176 </hbox>
177 </frame>
179 <frame Configuration files>
180 <hbox>
181 <text use-markup="true">
182 <label>"<b>Hosts :</b>"</label>
183 </text>
184 <entry editable="false">
185 <default>/etc/hosts</default>
186 <variable>HOSTS</variable>
187 </entry>
188 <button>
189 <input file icon="accessories-text-editor"></input>
190 <action type="lauch">leafpad $HOSTS</action>
191 </button>
192 </hbox>
193 <hbox>
194 <text use-markup="true">
195 <label>"<b>Host name :</b>"</label>
196 </text>
197 <entry editable="false">
198 <default>/etc/hostname</default>
199 <variable>HOSTNAME</variable>
200 </entry>
201 <button>
202 <input file icon="accessories-text-editor"></input>
203 <action type="lauch">leafpad $HOSTNAME</action>
204 </button>
205 </hbox>
206 <hbox>
207 <text use-markup="true">
208 <label>"<b>Network :</b>"</label>
209 </text>
210 <entry editable="false">
211 <default>/etc/network.conf</default>
212 <variable>CONFIG_FILE</variable>
213 </entry>
214 <button>
215 <input file icon="accessories-text-editor"></input>
216 <action type="lauch">leafpad $CONFIG_FILE</action>
217 </button>
218 </hbox>
219 <hbox>
220 <button>
221 <label>Restart</label>
222 <input file icon="reload"></input>
223 <action>echo -n "Stopping interface : $INTERFACE... "</action>
224 <action>ifconfig lo down</action>
225 <action>ifconfig $INTERFACE down</action>
226 <action>killall -q udhcpc; echo "done"</action>
227 <action>/etc/init.d/network.sh</action>
228 </button>
229 </hbox>
230 </frame>
231 <notebook labels="'
232 tmp=''
233 [ -x /usr/sbin/dropbear ] && NET_BOX="${NET_BOX}${tmp}SSH" && tmp='|'
234 [ -x /usr/bin/tftpd ] && NET_BOX="${NET_BOX}${tmp}TFTP" && tmp='|'
235 [ -x /usr/sbin/udhcpd ] && NET_BOX="${NET_BOX}${tmp}DHCP" && tmp='|'
236 [ -f /usr/share/boot/pxelinux.0.lzma -a -x /usr/bin/tftpd -a \
237 -x /usr/sbin/udhcpd ] && NET_BOX="${NET_BOX}${tmp}PXE" && tmp='|'
238 [ -x /usr/sbin/dnsd ] && NET_BOX="${NET_BOX}${tmp}DNS" && tmp='|'
239 [ -x /usr/bin/rsync ] && NET_BOX="${NET_BOX}${tmp}RSYNC" && tmp='|'
240 [ -x /usr/sbin/lighttpd ] && NET_BOX="${NET_BOX}${tmp}HTTP" && tmp='|'
241 . /etc/daemons.conf
242 set -- $DROPBEAR_OPTIONS
243 while [ -n "$2" ]; do
244 [ "$1" = "-b" ] && DROPBEAR_BANNER="$2" && break
245 shift
246 done
247 NET_BOX="${NET_BOX}\">"
248 tmp='<frame Dropbear>
249 <hbox>
250 <text use-markup="true">
251 <label>"<b>DROPBEAR_OPTIONS</b>"</label>
252 </text>
253 <entry editable="false">'
254 [ -n "$DROPBEAR_OPTIONS" ] && tmp="$tmp<default>$DROPBEAR_OPTIONS</default>"
255 tmp2='
256 <variable>DROPBEAR_OPTS</variable>
257 </entry>
258 <button>
259 <input file icon="help"></input>
260 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x30 -title "dropbear help" -e "dropbear --help ; echo -e \"----\nENTER to continue...\" && read close"</action>
261 </button>
262 <button>
263 <input file icon="accessories-text-editor"></input>
264 <action type="lauch">leafpad /etc/daemons.conf</action>
265 </button>
266 </hbox>
267 <hbox>
268 <text use-markup="true">
269 <label>"<b>Banner :</b>"</label>
270 </text>
271 <entry editable="false">'
272 [ -n "$DROPBEAR_BANNER" ] && tmp="$tmp$tmp2<default>$DROPBEAR_BANNER</default>"
273 tmp2='
274 <variable>DROPBEAR_BANNER</variable>
275 </entry>
276 <button>
277 <input file icon="accessories-text-editor"></input>
278 <action type="lauch">leafpad $DROPBEAR_BANNER</action>
279 </button>
280 </hbox>
281 <hbox>
282 <button>
283 <label>Start</label>
284 <input file icon="forward"></input>
285 <action>sed -i "s/RUN_DAEMONS=\"\(.*\)dropbear \?\(.*\)\"/RUN_DAEMONS=\"\1\2\"/" /etc/rcS.conf</action>
286 <action>sed -i "s/RUN_DAEMONS=\"\(.*\)\"/RUN_DAEMONS=\"dropbear \1\"/" /etc/rcS.conf</action>
287 <action>/etc/init.d/dropbear start</action>
288 </button>
289 <button>
290 <label>Stop</label>
291 <input file icon="stop"></input>
292 <action>sed -i "s/RUN_DAEMONS=\"\(.*\)dropbear \?\(.*\)\"/RUN_DAEMONS=\"\1\2\"/" /etc/rcS.conf</action>
293 <action>/etc/init.d/dropbear stop</action>
294 </button>
295 </hbox>
296 </frame>
297 '
298 [ -x /usr/sbin/dropbear ] && NET_BOX="${NET_BOX}${tmp}${tmp2}"
299 set -- $TFTPD_OPTIONS
300 TFTPD_OPTS=""
301 while [ -n "$2" ]; do
302 TFTPD_OPTS="$TFTPD_OPTS $1"
303 shift
304 done
305 TFTPD_ROOT="$1"
306 tmp='<frame Tftpd>
307 <hbox>
308 <text use-markup="true">
309 <label>"<b>TFTPD_OPTIONS</b>"</label>
310 </text>
311 <entry editable="false">'
312 [ -n "$TFTPD_OPTS" ] && tmp="$tmp<default>$TFTPD_OPTS</default>"
313 tmp2='
314 <variable>TFTPD_OPTS</variable>
315 </entry>
316 <button>
317 <input file icon="help"></input>
318 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x13 -title "tftpd help" -e "tftpd --help ; echo -e \"----\nENTER to continue...\" && read close"</action>
319 </button>
320 <button>
321 <input file icon="accessories-text-editor"></input>
322 <action type="lauch">leafpad /etc/daemons.conf</action>
323 </button>
324 </hbox>
325 <hbox>
326 <text use-markup="true">
327 <label>"<b>Root path :</b>"</label>
328 </text>
329 <entry editable="false">'
330 tmp="$tmp$tmp2"
331 [ -n "$TFTPD_ROOT" ] && tmp="$tmp<default>$TFTPD_ROOT</default>"
332 tmp2='
333 <variable>TFTPD_ROOT</variable>
334 </entry>
335 </hbox>
336 <hbox>
337 <button>
338 <label>Start</label>
339 <input file icon="forward"></input>
340 <action>sed -i "s/RUN_DAEMONS=\"\(.*\)tftpd \?\(.*\)\"/RUN_DAEMONS=\"\1\2\"/" /etc/rcS.conf</action>
341 <action>sed -i "s/RUN_DAEMONS=\"\(.*\)\"/RUN_DAEMONS=\"tftpd \1\"/" /etc/rcS.conf</action>
342 <action>/etc/init.d/tftpd start</action>
343 </button>
344 <button>
345 <label>Stop</label>
346 <input file icon="stop"></input>
347 <action>sed -i "s/RUN_DAEMONS=\"\(.*\)tftpd \?\(.*\)\"/RUN_DAEMONS=\"\1\2\"/" /etc/rcS.conf</action>
348 <action>/etc/init.d/tftpd start</action>
349 </button>
350 </hbox>
351 </frame>
352 '
353 [ -x /usr/bin/tftpd ] && NET_BOX="${NET_BOX}${tmp}${tmp2}"
354 tmp='<frame Dhcpd>
355 <hbox>
356 <text use-markup="true">
357 <label>"<b>Configuration :</b>"</label>
358 </text>
359 <entry editable="false">
360 <default>/etc/udhcpd.conf</default>
361 <variable>UDHCPD_CONF</variable>
362 </entry>
363 <button>
364 <input file icon="accessories-text-editor"></input>
365 <action type="lauch">leafpad $UDHCPD_CONF</action>
366 </button>
367 </hbox>
368 <hbox>
369 <button>
370 <label>Start</label>
371 <input file icon="forward"></input>
372 <action>sed -i "s/RUN_DAEMONS=\"\(.*\)udhcpd \?\(.*\)\"/RUN_DAEMONS=\"\1\2\"/" /etc/rcS.conf</action>
373 <action>sed -i "s/RUN_DAEMONS=\"\(.*\)\"/RUN_DAEMONS=\"udhcpd \1\"/" /etc/rcS.conf</action>
374 <action>/etc/init.d/udhcpd start</action>
375 </button>
376 <button>
377 <label>Stop</label>
378 <input file icon="stop"></input>
379 <action>sed -i "s/RUN_DAEMONS=\"\(.*\)udhcpd \?\(.*\)\"/RUN_DAEMONS=\"\1\2\"/" /etc/rcS.conf</action>
380 <action>/etc/init.d/udhcpd stop</action>
381 </button>
382 </hbox>
383 </frame>
384 '
385 [ -x /usr/sbin/udhcpd ] && NET_BOX="${NET_BOX}${tmp}"
386 tmp='<frame Pxelinux>
387 <hbox>
388 <text wrap="true">
389 <label>
390 "Tftpd and Dhcpd must be lauched to start the PXE service."
391 </label>
392 </text>
393 </hbox>
394 <hbox>
395 <text use-markup="true">
396 <label>"<b>Configuration :</b>"</label>
397 </text>
398 <entry editable="false">
399 <default>pxelinux.cfg/default</default>
400 <variable>PXE_CONF</variable>
401 </entry>
402 <button>
403 <input file icon="accessories-text-editor"></input>
404 <action>dir=$(dirname $TFTPD_ROOT/$PXE_CONF); [ -d $dir ] || mkdir -p $dir</action>
405 <action>lzma d /usr/share/boot/pxelinux.0.lzma $TFTPD_ROOT/pxelinux.0</action>
406 <action>grep "^option bootfile=pxelinux.0" $UDHCPD_CONF || echo "option bootfile=pxelinux.0" >> $UDHCPD_CONF</action>
407 <action>[ -f $TFTPD_ROOT/$PXE_CONF ] || echo -e "label slitaz\n\tkernel bzImage\n\tappend initrd=rootfs.gz rw root=/dev/null vga=normal" > $TFTPD_ROOT/$PXE_CONF</action>
408 <action type="lauch">leafpad $TFTPD_ROOT/$PXE_CONF</action>
409 </button>
410 </hbox>
411 </frame>
412 '
413 [ -f /usr/share/syslinux/pxelinux.0 -a -x /usr/bin/tftpd -a \
414 -x /usr/sbin/udhcpd ] && NET_BOX="${NET_BOX}${tmp}"
415 tmp='<frame Dnsd>
416 <hbox>
417 <text use-markup="true">
418 <label>"<b>DNSD_OPTIONS</b>"</label>
419 </text>
420 <entry editable="false">'
421 [ -n "$DNSD_OPTIONS" ] && tmp="$tmp<default>$DNSD_OPTIONS</default>"
422 tmp2='
423 <variable>DNSD_OPTS</variable>
424 </entry>
425 <button>
426 <input file icon="help"></input>
427 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x15 -title "dnsd help" -e "dnsd --help ; echo -e \"----\nENTER to continue...\" && read close"</action>
428 </button>
429 <button>
430 <input file icon="accessories-text-editor"></input>
431 <action type="lauch">leafpad /etc/daemons.conf</action>
432 </button>
433 </hbox>
434 <hbox>
435 <text use-markup="true">
436 <label>"<b>Configuration :</b>"</label>
437 </text>
438 <entry editable="false">
439 <default>/etc/dnsd.conf</default>
440 <variable>DNSD_CONF</variable>
441 </entry>
442 <button>
443 <input file icon="accessories-text-editor"></input>
444 <action type="lauch">leafpad $DNSD_CONF</action>
445 </button>
446 </hbox>
447 <hbox>
448 <button>
449 <label>Start</label>
450 <input file icon="forward"></input>
451 <action>sed -i "s/RUN_DAEMONS=\"\(.*\)dnsd \?\(.*\)\"/RUN_DAEMONS=\"\1\2\"/" /etc/rcS.conf</action>
452 <action>sed -i "s/RUN_DAEMONS=\"\(.*\)\"/RUN_DAEMONS=\"dnsd \1\"/" /etc/rcS.conf</action>
453 <action>/etc/init.d/dnsd start</action>
454 </button>
455 <button>
456 <label>Stop</label>
457 <input file icon="stop"></input>
458 <action>sed -i "s/RUN_DAEMONS=\"\(.*\)dnsd \?\(.*\)\"/RUN_DAEMONS=\"\1\2\"/" /etc/rcS.conf</action>
459 <action>/etc/init.d/dnsd stop</action>
460 </button>
461 </hbox>
462 </frame>
463 '
464 [ -x /usr/sbin/dnsd ] && NET_BOX="${NET_BOX}${tmp}${tmp2}"
465 tmp='<frame Rsync>
466 <hbox>
467 <text use-markup="true">
468 <label>"<b>RSYNCD_OPTIONS</b>"</label>
469 </text>
470 <entry editable="false">'
471 [ -n "${RSYNCD_OPTIONS#* }" ] && tmp="$tmp<default>${RSYNCD_OPTIONS#* }</default>"
472 tmp2='
473 <variable>RSYNC_OPTS</variable>
474 </entry>
475 <button>
476 <input file icon="help"></input>
477 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x30 -title "rsync daemon help" -e "rsync --daemon --help ; echo -e \"----\nENTER to continue...\" && read close"</action>
478 </button>
479 <button>
480 <input file icon="accessories-text-editor"></input>
481 <action type="lauch">leafpad /etc/daemons.conf</action>
482 </button>
483 </hbox>
484 <hbox>
485 <text use-markup="true">
486 <label>"<b>Configuration :</b>"</label>
487 </text>
488 <entry editable="false">
489 <default>/etc/rsyncd.conf</default>
490 <variable>RSYNCD_CONF</variable>
491 </entry>
492 <button>
493 <input file icon="accessories-text-editor"></input>
494 <action type="lauch">leafpad $RSYNCD_CONF</action>
495 </button>
496 </hbox>
497 <hbox>
498 <text use-markup="true">
499 <label>"<b>Secrets file :</b>"</label>
500 </text>
501 <entry editable="true">
502 <default>/etc/rsyncd.secrets</default>
503 <variable>RSYNCD_SECRETS</variable>
504 </entry>
505 <button>
506 <input file icon="accessories-text-editor"></input>
507 <action type="lauch">leafpad $RSYNCD_SECRETS</action>
508 </button>
509 </hbox>
510 <hbox>
511 <button>
512 <label>Start</label>
513 <input file icon="forward"></input>
514 <action>sed -i "s/RUN_DAEMONS=\"\(.*\)rsyncd \?\(.*\)\"/RUN_DAEMONS=\"\1\2\"/" /etc/rcS.conf</action>
515 <action>sed -i "s/RUN_DAEMONS=\"\(.*\)\"/RUN_DAEMONS=\"rsyncd \1\"/" /etc/rcS.conf</action>
516 <action>/etc/init.d/rsyncd start</action>
517 </button>
518 <button>
519 <label>Stop</label>
520 <input file icon="stop"></input>
521 <action>sed -i "s/RUN_DAEMONS=\"\(.*\)rsyncd \?\(.*\)\"/RUN_DAEMONS=\"\1\2\"/" /etc/rcS.conf</action>
522 <action>/etc/init.d/rsyncd stop</action>
523 </button>
524 </hbox>
525 </frame>
526 '
527 [ -x /usr/bin/rsync ] && NET_BOX="${NET_BOX}${tmp}${tmp2}"
528 tmp='<frame Lighttpd>
529 <hbox>
530 <text use-markup="true">
531 <label>"<b>Configuration :</b>"</label>
532 </text>
533 <entry editable="false">
534 <default>/etc/lighttpd/lighttpd.conf</default>
535 <variable>LIGHTTPD_CONF</variable>
536 </entry>
537 <button>
538 <input file icon="accessories-text-editor"></input>
539 <action type="lauch">leafpad $LIGHTTPD_CONF</action>
540 </button>
541 </hbox>
542 <hbox>
543 <button>
544 <label>Start</label>
545 <input file icon="forward"></input>
546 <action>sed -i "s/RUN_DAEMONS=\"\(.*\)lighttpd \?\(.*\)\"/RUN_DAEMONS=\"\1\2\"/" /etc/rcS.conf</action>
547 <action>sed -i "s/RUN_DAEMONS=\"\(.*\)\"/RUN_DAEMONS=\"lighttpd \1\"/" /etc/rcS.conf</action>
548 <action>/etc/init.d/lighttpd start</action>
549 </button>
550 <button>
551 <label>Stop</label>
552 <input file icon="stop"></input>
553 <action>sed -i "s/RUN_DAEMONS=\"\(.*\)lighttpd \?\(.*\)\"/RUN_DAEMONS=\"\1\2\"/" /etc/rcS.conf</action>
554 <action>/etc/init.d/lighttpd stop</action>
555 </button>
556 </hbox>
557 </frame>
558 '
559 [ -x /usr/sbin/lighttpd ] && NET_BOX="${NET_BOX}${tmp}"
560 tmp='
561 </notebook>
563 </notebook>
565 <hbox>
566 <button>
567 <label>Status</label>
568 <input file icon="network-wired"></input>
569 <action type="launch">IFCONFIG</action>
570 </button>
571 <button>
572 <input file icon="exit"></input>
573 <action type="exit">Exit</action>
574 </button>
575 </hbox>
577 </vbox>
578 </window>
579 '
580 NET_BOX="${NET_BOX}${tmp}"
582 export NET_BOX
584 # TODO: Servers/VNC(X11vnc) Servers/SMB(Samba)
585 # Modules(Network kernel module) Firewall(Iptables) VPN(OpenVPN)
586 # TODO: Status: running servers
588 # Only root can configure network.
589 check_root
590 gtkdialog --center --program=NET_BOX
592 exit 0