source: titan/titan/extensions.h @ 39899

Last change on this file since 39899 was 39636, checked in by obi, 7 years ago

fix secret feed

File size: 16.9 KB
Line 
1#ifndef EXTENSIONS_H
2#define EXTENSIONS_H
3
4//flag 0: inputbox
5//flag 1: auto
6void screenfeed(int flag)
7{
8        char* tmpstr = NULL, *line = NULL, *lastline = NULL;
9        char* pos = NULL;
10
11        tmpstr = readsys(getconfig("feed", NULL), 4); //line4
12        tmpstr = string_replace("src/gz secret http://", "", tmpstr, 1);
13
14        if(tmpstr != NULL)
15                pos = strchr(tmpstr, '/');
16        if(pos != NULL)
17                pos[0] = '\0';
18
19        if(tmpstr == NULL || ostrcmp(tmpstr, "") == 0 || ostrcmp(tmpstr, "\n") == 0)
20                tmpstr = ostrcat(tmpstr, "000.000.000.000", 1, 0);
21
22        if(flag == 1)
23                lastline = ostrcat("999.999.999.999", NULL, 0, 0);
24        else   
25                lastline = numinput(_("Feed"), tmpstr, "000.000.000.000", 1);
26       
27        //for devs, who have secret feed not in mind
28        if(ostrcmp("999.999.999.999", lastline) == 0)
29        {
30                free(lastline); lastline = NULL;
31                lastline = ostrcat("097.074.032.010", NULL, 0, 0);
32        }
33
34        if(lastline != NULL)
35        {
36                free(tmpstr); tmpstr = NULL;
37                tmpstr = fixip(lastline, 1);
38                free(lastline); lastline = tmpstr;
39
40                tmpstr = readsys(getconfig("feed", NULL), 1); //line1
41                if(tmpstr == NULL || (tmpstr != NULL && strlen(tmpstr) == 0))
42                        line = ostrcat(line, "#", 1, 0);
43                else
44                        line = ostrcat(line, tmpstr, 1, 0);
45                free(tmpstr); tmpstr = NULL;
46
47                if(line[strlen(line) - 1] != '\n')
48                        line = ostrcat(line, "\n", 1, 0);
49
50                tmpstr = readsys(getconfig("feed", NULL), 2); //line2
51                if(tmpstr == NULL || (tmpstr != NULL && strlen(tmpstr) == 0))
52                        line = ostrcat(line, "#\n", 1, 0);
53                else
54                        line = ostrcat(line, tmpstr, 1, 0);
55                free(tmpstr); tmpstr = NULL;
56/////
57                if(line[strlen(line) - 1] != '\n')
58                        line = ostrcat(line, "\n", 1, 0);
59
60                tmpstr = readsys(getconfig("feed", NULL), 3); //line3
61                if(tmpstr == NULL || (tmpstr != NULL && strlen(tmpstr) == 0))
62                        line = ostrcat(line, "#\n", 1, 0);
63                else
64                        line = ostrcat(line, tmpstr, 1, 0);
65                free(tmpstr); tmpstr = NULL;
66/////
67                if(line[strlen(line) - 1] == '\n')
68                        tmpstr = ostrcat(line, "src/gz secret http://", 0, 0);
69                else
70                        tmpstr = ostrcat(line, "\nsrc/gz secret http://", 0, 0);
71
72                if(strlen(lastline) == 0)
73                {
74                        free(tmpstr);
75                        tmpstr = ostrcat(line, NULL, 0, 0);
76                }
77
78                tmpstr = ostrcat(tmpstr, lastline, 1, 0);
79//              tmpstr = ostrcat(tmpstr, "/svn/tpk/sh4", 1, 0);
80#ifdef SH4
81                tmpstr = ostrcat(tmpstr, "/svn/tpk/nightly-sh4-secret", 1, 0); 
82#else
83#ifdef ARM
84                tmpstr = ostrcat(tmpstr, "/svn/tpk/nightly-arm-secret", 1, 0); 
85#else
86                tmpstr = ostrcat(tmpstr, "/svn/tpk/nightly-mipsel-secret", 1, 0);       
87#endif
88#endif
89                writesys(getconfig("feed", NULL), tmpstr, 0);
90        }
91
92        free(tmpstr);
93        free(line);
94        free(lastline);
95}
96
97//flag 0: install ok
98//flag 1: install err
99//flag 2: remove ok
100//flag 3: remove err
101char* gettpklog(char* installpath, int flag)
102{
103        char* tmpstr = NULL;
104
105        if(flag == 0 || flag == 1)
106                tmpstr = ostrcat(tmpstr, _("Installation start"), 1, 0);
107        else
108                tmpstr = ostrcat(tmpstr, _("Remove start"), 1, 0);
109        tmpstr = ostrcat(tmpstr, "\n\n", 1, 0);
110       
111        tmpstr = ostrcat(tmpstr, readfiletomem(TPKLOG, 0), 1, 1);
112       
113        tmpstr = ostrcat(tmpstr, "\n\n", 1, 0);
114       
115        if(installpath != NULL)
116        {
117                tmpstr = ostrcat(tmpstr, _("New free space (KB): "), 1, 0);
118                tmpstr = ostrcat(tmpstr, ollutoa(getfreespace(installpath) / 1024), 1, 1);
119                tmpstr = ostrcat(tmpstr, "\n", 1, 0);
120        }
121       
122        if(flag == 0)
123                tmpstr = ostrcat(tmpstr, _("Install success"), 1, 0);
124        if(flag == 1)
125                tmpstr = ostrcat(tmpstr, _("Install error"), 1, 0);
126        if(flag == 2)
127                tmpstr = ostrcat(tmpstr, _("Remove success"), 1, 0);
128        if(flag == 3)
129                tmpstr = ostrcat(tmpstr, _("Remove error"), 1, 0);
130               
131        if(installpath == NULL || ostrcmp("/var/swap", installpath) == 0)
132                sync();
133       
134        return tmpstr;
135}
136
137char* getinstallpath(char* path, char* size)
138{
139        int count = 0, isize = 0;
140        char* tmpstr = NULL;
141        struct menulist* mlist = NULL, *mbox = NULL, *tmpmlist = NULL;
142       
143        if(size != NULL) isize = atoi(size);
144       
145        if(path == NULL || path[0] == '*' || ostrstr(path, "mnt") != NULL)
146        {
147                if(tpkchecksize(NULL, "/mnt/swapextensions", isize) == 0)
148                {
149                        tmpmlist = addmenulist(&mlist, _("Install to MNT"), NULL, NULL, 0, 0);
150                        changemenulistparam(tmpmlist, "/mnt/swapextensions", NULL, NULL, NULL);
151                        free(tmpstr); tmpstr = NULL;
152                        tmpstr = ostrcat("/mnt/swapextensions", NULL, 0, 0);
153                        count++;
154                }
155        }
156       
157        if(path == NULL || path[0] == '*' || ostrstr(path, "var") != NULL)
158        {
159                if(tpkchecksize(NULL, "/var", isize) == 0)
160                {
161                        tmpmlist = addmenulist(&mlist, _("Install to FLASH"), NULL, NULL, 0, 0);
162                        changemenulistparam(tmpmlist, "/var", NULL, NULL, NULL);
163                        free(tmpstr); tmpstr = NULL;
164                        tmpstr = ostrcat("/var", NULL, 0, 0);
165                        count++;
166                }
167        }
168       
169        if(path == NULL || path[0] == '*' || ostrstr(path, "swap") != NULL)
170        {
171                if(file_exist("/tmp/.swapextensionsdev") == 1 || file_exist("/var/swap"))
172                {
173                        if(tpkchecksize(NULL, "/var/swap", isize) == 0)
174                        {
175                                tmpmlist = addmenulist(&mlist, _("Install to SWAP"), NULL, NULL, 0, 0);
176                                changemenulistparam(tmpmlist, "/var/swap", NULL, NULL, NULL);
177                                free(tmpstr); tmpstr = NULL;
178                                tmpstr = ostrcat("/var/swap", NULL, 0, 0);
179                                count++;
180                        }
181                }
182        }
183       
184        //if(count > 1) // if only 1 installpath, don't show choicebox
185        if(count > 0) // show always choicebox
186        {
187                free(tmpstr); tmpstr = NULL;
188                mbox = menulistbox(mlist, "tpkinstallinfo", _("Choice Install Medium"), NULL, NULL, NULL, 0, 0);
189                if(mbox != NULL)
190                        tmpstr = ostrcat(mbox->param, NULL, 0, 0);
191        }
192        else if(count == 0)
193        {
194                textbox(_("Tpk Install Info"), _("Can't install Package. Package to big."), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 800, 200, 0, 0);
195                free(tmpstr); tmpstr = NULL;
196        }
197       
198        freemenulist(mlist, 0); mlist = NULL;
199        return tmpstr;
200}
201
202void screenextensions(int mode, char* path, char* defentry, int first)
203{
204        char* tmpstr = NULL, *tmpinfo = NULL, *installpath = NULL;
205        struct menulist* mlist = NULL, *mbox = NULL;
206        struct menulist* mlist1 = NULL, *mbox1 = NULL;
207        struct skin* load = getscreen("loading");
208               
209        status.hangtime = 99999;
210        unlink(TPKLOG);
211       
212        if(mode == 0)
213        {
214                drawscreen(load, 0, 0);
215
216                if(first == 1) tpkgetindex(0);
217                tpklist();
218
219                clearscreen(load);
220
221                mbox = tpkmenulist(mlist, NULL, _("Tpk Install - select section"), NULL, NULL, 1, defentry, 0);
222
223                if(mbox != NULL)
224                {
225                        debug(130, "section: %s", mbox->name);
226                        mbox1 = tpkmenulist(mlist1, "tpkinstall", _("Tpk Install - select file"), "/tmp/tpk", mbox->name, 2, NULL, 1);
227                       
228                        if(mbox1 != NULL && mbox1->param != NULL && mbox1->param1 != NULL)
229                        {
230                                debug(130, "file: %s", mbox1->name);
231                                if(ostrstr(mbox1->name, _("There may only be one package installed from this section. To install another package from this section, remove the installed one. If the package is not visible after a software update, perform a TPK update to: ")) == NULL)
232                                {
233                                        installpath = getinstallpath(mbox1->param2, mbox1->param3);
234                                        if(installpath != NULL)
235                                        {
236                                                tmpinfo = ostrcat(tmpinfo, _("Installing"), 1, 0);
237                                                tmpinfo = ostrcat(tmpinfo, " ", 1, 0);
238                                                tmpinfo = ostrcat(tmpinfo, mbox->name, 1, 0);
239                                                tmpinfo = ostrcat(tmpinfo, "-", 1, 0);
240                                                tmpinfo = ostrcat(tmpinfo, mbox1->name, 1, 0);
241                                                tmpinfo = ostrcat(tmpinfo, " ", 1, 0);
242                                                tmpinfo = ostrcat(tmpinfo, _("starting"), 1, 0);
243                                                tmpinfo = ostrcat(tmpinfo, " ?", 1, 0);
244                       
245                                                if(textbox(_("Tpk Install Info"), _(tmpinfo), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0) == 1)
246                                                {
247                                                        drawscreen(load, 0, 0);
248                                                        resettvpic();
249                                                        char* log = NULL;
250                                                        int tpkret = tpkgetpackage(mbox1->param, mbox1->param1, installpath, 0, 0);
251                                                        if(tpkret == 0)
252                                                        {
253                                                                log = gettpklog(installpath, 0);
254                                                                textbox(_("Tpk Install Info - Install OK"), _(log), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 600, 0, 2);
255                                                        }
256                                                        else if(tpkret == 2)
257                                                        {
258                                                                textbox(_("Tpk Install Info - Install ERROR"), _("There may only be one package installed from this section. To install another package from this section, remove the installed one. If the package is not visible after a software update, perform a TPK update to: "), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 600, 0, 2);
259                                                        }
260                                                        else
261                                                        {
262                                                                log = gettpklog(installpath, 1);
263                                                                textbox(_("Tpk Install Info - Install ERROR"), _(log), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 600, 0, 2);
264                                                        }
265        //                                              textbox(_("Message"), _("Some plugins needs restart.\nIf the plugin is not active\nreboot the box."), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0);
266                                                        loadplugin();
267                                                        free(log), log = NULL;
268                                                        unlink(TPKLOG);
269                                                        if(file_exist("/tmp/.tpk_needs_reboot"))
270                                                        {
271                                                                unlink("/tmp/.tpk_needs_reboot");
272                                                                textbox(_("Message"), _("Titan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 600, 200, 0, 0);
273                                                                //sync usb
274                                                                system("sync");
275                                                                //write only config file
276                                                                writeallconfig(3);
277                                                                //gui restart and write no config
278                                                                oshutdown(3, 2);
279                                                        }
280                                                }
281                                        }
282                                }
283                        }
284                }
285                free(installpath); installpath = NULL;
286                free(tmpstr); tmpstr = NULL;   
287                freemenulist(mlist1, 0); mlist1 = NULL;
288                if(mbox != NULL) tmpstr = ostrcat(mbox->name, NULL, 0, 0);
289                freemenulist(mlist, 0); mlist = NULL;
290                free(tmpinfo); tmpinfo = NULL;
291                freetpk();
292                if(mbox != NULL) screenextensions(0, path, tmpstr, 0);
293                free(tmpstr); tmpstr = NULL;
294        }
295        else if(mode == 1)
296        {
297                tpklistinstalled(0);
298                mbox = tpkmenulist(mlist, NULL, _("Tpk Remove - select file"), NULL, NULL, 1, defentry, 2);
299               
300                if(mbox != NULL && mbox->param != NULL)
301                {
302                        debug(130, "file: %s", mbox->name);
303
304                        tmpinfo = ostrcat(tmpinfo, _("Removeing"), 1, 0);
305                        tmpinfo = ostrcat(tmpinfo, " ", 1, 0);
306                        tmpinfo = ostrcat(tmpinfo, mbox->name, 1, 0);
307                        tmpinfo = ostrcat(tmpinfo, " ?", 1, 0);
308
309                        if(textbox(_("Tpk Remove Info"), _(tmpinfo), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 800, 200, 0, 0) == 1)
310                        {
311                                drawscreen(load, 0, 0);
312                                resettvpic();
313                                char* log = NULL;
314                                if(tpkremove(mbox->param, 0, 0) == 0)
315                                {
316                                        log = gettpklog(NULL, 2);
317                                        textbox(_("Tpk Remove Info - Remove OK"), _(log), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 600, 0, 2);
318                                        //del plugin from memory if Titanname is defined in plugin control file
319                                        if(mbox->param1 != NULL && mbox->param1[0] != '*') delplugin(mbox->param1);
320                                }
321                                else
322                                {
323                                        log = gettpklog(NULL, 3);
324                                        textbox(_("Tpk Remove Info - Remove ERROR"), _(log), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 600, 0, 2);
325                                }
326//                              textbox(_("Message"), _("Some plugins needs restart.\nIf the plugin is not active\nreboot the box."), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0);
327                                free(log); log = NULL;
328                                unlink(TPKLOG);
329                                if(file_exist("/tmp/.tpk_needs_reboot"))
330                                {
331                                        unlink("/tmp/.tpk_needs_reboot");
332                                        textbox(_("Message"), _("Titan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 600, 200, 0, 0);
333                                        //sync usb
334                                        system("sync");
335                                        //write only config file
336                                        writeallconfig(3);
337                                        //gui restart and write no config
338                                        oshutdown(3, 2);
339                                }
340                        }
341                }
342                free(tmpstr); tmpstr = NULL;
343                freemenulist(mlist, 0); mlist = NULL;
344                if(mbox != NULL) tmpstr = ostrcat(mbox->name, NULL, 0, 0);
345                free(tmpinfo); tmpinfo = NULL;
346                freetpk();
347                if(mbox != NULL) screenextensions(1, path, tmpstr, 0);
348                free(tmpstr); tmpstr = NULL;
349        }
350        else if(mode == 2)
351        {
352                char* text1 = "Tpk Tmp Install - select file";
353                char* text2 = "Tpk Tmp Info";
354
355                if(path == NULL)
356                        tmpstr = gettpktmplist("/tmp");
357                else
358                {
359                        tmpstr = gettpktmplist(path);
360                        text1 = "Tpk Media Install - select file";
361                        text2 = "Tpk Media Info";
362                }
363   
364                if(tmpstr == NULL || strlen(tmpstr) == 0)
365                {
366                        textbox(_("Message"), _("No plugin found."), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0);
367                }
368                else
369                {
370                        addmenulistall(&mlist, tmpstr, NULL, 0, defentry);
371                        mbox = menulistbox(mlist, NULL, text1, NULL, NULL, "/skin/plugin.png", 1, 0);
372                }
373               
374                free(tmpstr); tmpstr = NULL;
375               
376                if(mbox != NULL)
377                {
378                        installpath = getinstallpath(NULL, 0);
379                        debug(130, "installpath: %s", installpath);
380                        if(installpath != NULL)
381                        {
382                                debug(130, "file: %s", mbox->name);
383       
384                                tmpinfo = ostrcat(tmpinfo, _("Installing"), 1, 0);
385                                tmpinfo = ostrcat(tmpinfo, " ", 1, 0);
386                                tmpinfo = ostrcat(tmpinfo, mbox->name, 1, 0);
387                                tmpinfo = ostrcat(tmpinfo, " ", 1, 0);
388                                tmpinfo = ostrcat(tmpinfo, _("starting"), 1, 0);
389                                tmpinfo = ostrcat(tmpinfo, " ?", 1, 0);
390                                debug(130, "tmpinfo: %s", tmpinfo);
391       
392                                if(textbox(_(text2), _(tmpinfo), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0) == 1)
393                                {
394                                        char* log = NULL;
395                                        int ret = 0;                           
396                                        drawscreen(load, 0, 0);
397                                        resettvpic();                           
398                                        if(path == NULL)
399                                        {
400                                                tmpstr = ostrcat(tmpstr, "/tmp", 1, 0);
401                                                tmpstr = ostrcat(tmpstr, "/", 1, 0);
402                                                tmpstr = ostrcat(tmpstr, mbox->name, 1, 0);
403                                                debug(130, "tmpstr: %s", tmpstr);
404                                                ret = tpkinstall(tmpstr, installpath, 0);
405                                                free(tmpstr); tmpstr = NULL;
406                                        }
407                                        else
408                                        {
409                                                tmpstr = ostrcat(tmpstr, path, 1, 0);
410                                                tmpstr = ostrcat(tmpstr, "/", 1, 0);
411                                                tmpstr = ostrcat(tmpstr, mbox->name, 1, 0);
412                                                debug(130, "tmpstr: %s", tmpstr);
413                                                ret = tpkinstall(tmpstr, installpath, 0);
414                                                free(tmpstr); tmpstr = NULL;
415                                        }
416       
417                                        if(ret == 0)
418                                                log = gettpklog(installpath, 0);
419                                        else if(ret == 2)
420                                                log = ostrcat(_("There may only be one package installed from this section. To install another package from this section, remove the installed one. If the package is not visible after a software update, perform a TPK update to: "), NULL, 0, 0);
421                                        else
422                                                log = gettpklog(installpath, 1);
423                                        textbox(_(text2), log, _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 600, 0, 0);
424                                        free(log); log = NULL;
425                                        unlink(TPKLOG);
426                                        textbox(_("Message"), _("Some plugins needs restart.\nIf the plugin is not active\nreboot the box."), "EXIT", getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, NULL, 0, 1000, 200, 0, 0);
427                                        loadplugin();
428                                        if(file_exist("/tmp/.tpk_needs_reboot"))
429                                        {
430                                                unlink("/tmp/.tpk_needs_reboot");
431                                                textbox(_("Message"), _("Titan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 600, 200, 0, 0);
432                                                //sync usb
433                                                system("sync");
434                                                //write only config file
435                                                writeallconfig(3);
436                                                //gui restart and write no config
437                                                oshutdown(3, 2);
438                                        }
439                                }
440                        }
441                }
442                free(installpath); installpath = NULL;
443                free(tmpstr); tmpstr = NULL;
444                freemenulist(mlist, 0); mlist = NULL;
445                if(mbox != NULL) tmpstr = ostrcat(mbox->name, NULL, 0, 0);
446                free(tmpinfo); tmpinfo = NULL;
447                if(mbox != NULL) screenextensions(2, path, tmpstr, 0);
448                free(tmpstr); tmpstr = NULL;
449        }
450        else if(mode == 3)
451        {
452                drawscreen(load, 0, 0);
453                resettvpic();
454                if(first == 1)
455                {
456                        if(tpkgetindex(0) != 0)
457                                textbox(_("Tpk Update Info - Update ERROR"), _("Can't get all TPK index !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0);
458                }
459                writesys("/tmp/.tpk_upgrade_start", "0", 0);
460                if(tpkupdate(0) != 0)
461                        textbox(_("Tpk Update Info - Update ERROR"), _("Can't update all packages !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0);
462                loadplugin();
463                clearscreen(load);
464                drawscreen(skin, 0, 0);
465                unlink(TPKLOG);
466
467                if(file_exist("/tmp/.tpk_needs_reboot"))
468                {
469                        unlink("/tmp/.tpk_needs_reboot");
470                        textbox(_("Message"), _("Titan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 600, 200, 0, 0);
471                        //sync usb
472                        system("sync");
473                        //write only config file
474                        writeallconfig(3);
475                        //gui restart and write no config
476                        oshutdown(3, 2);
477                }
478                unlink("/tmp/.tpk_upgrade_start");
479        }
480
481        if(first == 1) tpkcleantmp(0);
482        status.hangtime = getconfigint("hangtime", NULL);
483}
484
485//flag 0: without message
486//flag 1: with message
487void screenextensions_check(int flag)
488{
489        int treffer = 0;
490        struct hdd *node = NULL;
491        char* tmpstr = NULL, *tmpstr1 = NULL;
492
493        if(status.security >= 1)
494        {
495                addhddall();
496                node = hdd;
497
498                while(node != NULL)
499                {
500                        if(node->partition != 0)
501                        {
502                                tmpstr = ostrcat("/autofs/", node->device, 0, 0);
503                                tmpstr1 = gettpktmplist(tmpstr);
504
505                                if(tmpstr1 != NULL)
506                                {
507                                        treffer = 1;
508                                        screenextensions(2, tmpstr, NULL, 1);
509                                }
510
511                                free(tmpstr); tmpstr = NULL;
512                                free(tmpstr1); tmpstr1 = NULL;
513                        }
514                        node = node->next;
515                }
516
517                if(flag == 1 && treffer == 0)
518                        textbox(_("Tpk Install Info"), _("No plugin found."), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0);
519        }
520}
521
522#endif
Note: See TracBrowser for help on using the repository browser.