]>
Commit | Line | Data |
---|---|---|
cd1a2927 MT |
1 | sub genmenu\r |
2 | {\r | |
3 | ... snip ...\r | |
4 | if ( ! -e "${General::swroot}/proxy/enable" && ! -e "${General::swroot}/proxy/enable_blue" ) {\r | |
5 | splice (@{$menu{'2.status'}{'subMenu'}}, 4, 1);\r | |
6 | splice (@{$menu{'7.mainlogs'}{'subMenu'}}, 2, 1);\r | |
7 | }\r | |
8 | \r | |
9 | # Read additionnal menus entry\r | |
10 | # this have to be hardened and accepted. To be extended.\r | |
11 | opendir (DIR, "${General::swroot}/addon-menu");\r | |
12 | while (my $menuitem = readdir (DIR)) {\r | |
13 | \r | |
14 | if ( $menuitem =~ /^menu\.([1-6]\..*)\..*/) { #model is "menu.(N.submenu).filename"\r | |
15 | my $submenu = $1;\r | |
16 | open (FILE,"${General::swroot}/addon-menu/$menuitem") or die;\r | |
17 | while (my $text = <FILE>) { # file may content many entry\r | |
18 | splice (@{$menu{$submenu}{'subMenu'}} ,-1,0, [ eval($text) ] );\r | |
19 | }\r | |
20 | close (FILE);\r | |
21 | }\r | |
22 | }\r | |
23 | closedir (DIR);\r | |
24 | }\r |