Changeset 45954


Ignore:
Timestamp:
03/19/22 15:40:59 (2 years ago)
Author:
obi
Message:

fix ipkg install

Location:
titan/titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/extensions.h

    r45952 r45954  
    625625                        {
    626626                                debug(130, "file: %s", mbox1->name);
    627                                 tmpstr = ostrcat("titan-plugin-", mbox->name, 0, 0);
    628                                 tmpstr = ostrcat(tmpstr, "-", 1, 0);
     627//                              tmpstr = ostrcat("titan-plugin-", mbox->name, 0, 0);
     628//                              tmpstr = ostrcat(tmpstr, "-", 1, 0);
    629629                                tmpstr = ostrcat(tmpstr, mbox1->param, 1, 0);
     630                                debug(130, "tmpstr: %s", tmpstr);
     631
     632char* installpath = "root";
     633//                                      installpath = getinstallpath(mbox1->param2, mbox1->param3);
     634//                                      if(installpath != NULL)
     635//                                      {
    630636
    631637                                tmpinfo = ostrcat(tmpinfo, _("Installing"), 1, 0);
     
    643649                                        resettvpic();
    644650                                        char* log = NULL;
     651
     652                                        log = get_ipk_install(tmpstr, installpath);
     653
     654                                if(log == NULL) log = ostrcat("No output found !", NULL, 0, 0);
     655                                textbox(_("Ipk Install Info - Install OK"), _(log), "EXIT", getrcconfigint("rcexit", NULL), "OK", getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, 800, 600, 0, 0);
     656                                free(log); log = NULL;
     657
     658/*
    645659                                        if(ipkg_install(tmpstr) == 0)
    646660                                        {
     
    655669                                                textbox(_("Ipk Install Info - Install ERROR"), _(log), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 600, 0, 0);
    656670                                        }
     671*/
    657672                                        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);
    658673                                        loadplugin();
  • titan/titan/ipkg.h

    r45952 r45954  
    276276}
    277277
    278 int ipkg_install(const char* package)
     278int ipkg_install_org(const char* package)
    279279{
    280280        debug(130, "package: %s", package);
     
    292292#endif 
    293293        return err;
     294}
     295
     296char* get_ipk_install(char* package, char* dest)
     297{
     298        debug(130, "package: %s (%s)", package, dest);
     299
     300//      unlink("/var/usr/lib/ipkg/cross");
     301//      unlink("/var/usr/lib/ipkg/secret");
     302//      unlink("/var/usr/lib/ipkg/titan");     
     303
     304        char* cmd = NULL, *tmpstr = NULL;
     305        cmd = ostrcat(cmd, "opkg install ", 1, 0);
     306//      cmd = ostrcat(cmd, path, 1, 0);
     307//      cmd = ostrcat(cmd, "/", 1, 0);
     308        cmd = ostrcat(cmd, package, 1, 0);
     309        cmd = ostrcat(cmd, " --dest ", 1, 0);
     310        cmd = ostrcat(cmd, dest, 1, 0);
     311
     312        tmpstr = command(cmd);
     313
     314        debug(130, "out %s",cmd);
     315        free(cmd); cmd = NULL;
     316        return tmpstr;
    294317}
    295318
Note: See TracChangeset for help on using the changeset viewer.