Results 1 to 15 of 63

Thread: ipkg-Web-Managment cgi-bin Script von NSLU2 auf WL-HDD + ASUS umbauen

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #12
    Join Date
    Nov 2005
    Location
    Germany
    Posts
    423
    Hi,
    Quote Originally Posted by wengi View Post
    ... Dir ist bewusst, dass es sich um shell-scripts handelt, die html Dateien generieren?
    Jo .

    Also was habe ich gemacht?:
    A.) Zuerst mal nach dem Paket gesucht:
    PHP Code:
    ipkg list | grep ipkg
    ipkg
    -opt 0.99.163-The Itsy Package Manager
    ipkg
    -web 7-A web frontend for ipkg 
    B.) Dann versucht das Paket zu installieren mit ipkg:
    PHP Code:
    ipkg install ipkg-web
    Installing ipkg
    -web (7-7to /opt/...
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/ipkg-web_7-7_mipsel.ipk
    ipkgextract_archive: /home/httpd/: Read-only file system
    ipkg
    extract_archive: /home/httpd/html/: No such file or directory
    ipkg
    extract_archive: /home/httpd/html/Management/: No such file or directory
    ipkg
    : /home/httpd/html/Management/sluginfo.cgiNo such file or directory
    ipkg
    : /home/httpd/html/Management/package.cgiNo such file or directory
    Configuring ipkg
    -web
    Successfully terminated

    Was natürlich nicht geht da die Pfadangaben zu dem WebServer auf der NSLU2-Debian ganz anders sind als die der ASUS-Oleg-FirmeWare mit naträglich installiertem thttpd-WebServer oder LightHTTP.

    C.) Nun das Paket im Win geladen mit der URL von oben:
    http://ipkg.nslu2-linux.org/feeds/op...7-7_mipsel.ipk

    D.) Aus ipkg-web_7-7_mipsel.ipk einfach ipkg-web_7-7_mipsel.ipk.rar gemacht durch umbenennen.

    E.) Das ganze entpackt bis ich die beiden Dateien hatte:
    package.cgi
    sluginfo.cgi

    F.) Die dann per WinSCP oder per Samba auf meine WL-HDD geschoben,
    in den Web-Ordner vom thttpd/2.25b PHP/5.2.5 /opt/share/www/cgi-bin

    G.) das .cgi entfernt als Dateiendung

    H.) zum testen erstmal alle Rechte den beiden Dateien gegeben

    I.) dann in Browser aufgerufen
    http://IP.of.your.Router:8080/cgi-bin/sluginfo
    und es funktioneirt (siehe auch Bildanhang):
    Slug info
    System
    Installed software
    Disks
    Network
    samba
    System
    uname
    Linux Willi 2.4.20 #75 Fri Apr 6 00:12:23 MSD 2007 mips GNU/Linux
    cpuinfo
    system type : Broadcom BCM947XX
    J.) dann in Browser aufgerufen
    http://IP.of.your.Router:8080/cgi-bin/package
    und zeigt erstmal die Seite an, fein fein bis hier hin, aber eben nur bis hier hin (siehe Bildanhang).
    The ipkg web frontend
    Sync packages no yes
    Type: NONE Updates Installed Not installed
    Filter

    Please install bash
    I recomend to install bash because this cgi script will run more than two times faster with bash
    K.) So jetzt auf Type. Installed gesetz und Anfrage senden
    und schon kommt die Fehlermeldung (siehe Bildanhang):
    package02: package02: 248: ipkg: not found
    L.) nun munter in der "package" mit einem Texteditor drin rum gewurzelt und keine Erfogle erziehl, nur nebenbei ein bischen Shell-Script gelernt.

    Das hier habe ich installiert:
    PHP Code:
    ipkg list_installed grep php
    php 
    5.2.5-The php scripting language
    php
    -thttpd 2.25b-5.2.5-php-thttpd is thttpd webserver with php support 
    PHP Code:
    ipkg list_installed grep http
    php
    -thttpd 2.25b-5.2.5-php-thttpd is thttpd webserver with php support 
    PHP Code:
    ipkg list_installed grep cgi
    [admin@Willi cgi-bin]$ 
    So jetzt habe ich mal das gemacht:
    PHP Code:
    ipkg list | grep cgi
    haserl 
    0.9.20-Haserl is a small program that uses shell or Lua script to create cgi web scripts.
    mod-fastcgi 2.4.2-mod_fastcgi is an Apache module providing language independentscalableopen extension to CGI.
    perl-cgi-application 3.31-Framework for building reusable web-applications
    perl
    -scgi 0.6-The Perl SCGI server library.
    php-fcgi 5.2.5-The php scripting languagebuilt as an fcgi module
    py
    -scgi 1.12-Server-side implementation of the SCGI protocol.
    py25-scgi 1.12-Server-side implementation of the SCGI protocol
    Und dann das installiert:
    PHP Code:
    ipkg install php-fcgi
    Installing php
    -fcgi (5.2.5-1to /opt/...
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/php-fcgi_5.2.5-1_mipsel.ipk
    Configuring php-fcgi
    Successfully terminated

    Hat auch nix gebracht. Was muß ich da noch konfigurieren an dem "php-fcgi"?

    -----------------------------------------------------------------------------------------

    So rufe ich nun das Script ohne Parameter über Putty auf kommt das:
    PHP Code:
    [admin@Willi cgi-bin]$ ./package02
    Content
    -typetext/html

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
    >
    <
    html xmlns="http://www.w3.org/1999/xhtml">

    <
    head>
    <
    meta name="generator" content="CGI:shell" />
    <
    meta name="version" content="$Id: package.cgi 6240 2007-06-17 22:29:05Z marceln $" />
    <
    title>ipkg web</title>
    <
    style type="text/css">
    h1h2 {
      
    font-familyArialHelveticasans-serif;
      
    color#004;
    }

    table {
      
    border-top1px solid #eee;
      
    border-right1px solid #eee;
      
    width100%;
    }

    thtd {
      
    padding2px 4px;
      
    border-left1px solid #eee;
      
    border-bottom1px solid #eee;
    }

    table a {
      
    background#ddd;
      
    color#004;
      
    text-decorationnone;
      
    margin1px;
      
    padding2px 4px;
      
    font-familyArialHelveticasans-serif;
      
    font-size75%;
    }

    table a.ins {
      
    background#dfd;
      
    border-left1px solid #cec;
      
    border-bottom1px solid #cec;
    }

    table a.upd {
      
    background#ddf;
      
    border-left1px solid #cce;
      
    border-bottom1px solid #cce;
    }

    table a.del {
      
    background#fdd;
      
    border-left1px solid #ecc;
      
    border-bottom1px solid #ecc;
    }
    </
    style>
    </
    head>

    <
    body>
    <
    h1>The ipkg web frontend</h1>
    <
    form methode="GET">
    <
    table>
    <
    tr>
            <
    td>Sync packages</td>
            <
    td>
                    <
    input type="radio" name="updatedb" value="n" checked>no</input>
                    <
    input type="radio" name="updatedb" value="y">yes</input>
            </
    td>
    </
    tr>
    <
    tr>
            <
    td>Type:</td>
            <
    td>
                    <
    select name="typefilter">
                            <
    option selected value="none">NONE</option>
                            <
    option value="update">Updates</option>
                            <
    option value="installed">Installed</option>
                            <
    option value="not">Not installed</option>
                    </
    select>
            </
    td>
    </
    tr>
    <
    tr>
            <
    td>Filter</td>
            <
    td><input type="text" name="namefilter"></td>
    </
    tr>
    </
    table>
    <
    input type="submit" name="submit">&nbsp;<input type="reset">
    </
    form>
    <
    h2>Please install bash</h2>
    <
    p>I recomend to install bash because this cgi script will
    run more than two times faster with bash
    </p>
    </
    body>
    </
    html
    Hole ich mir jetzt die Paramer von der URL:
    http://IP.of.your.Router:8080/package?updatedb=n&typefilter=installed&namefilter=&submi t=Anfrage+senden
    PHP Code:
    ?updatedb=n&typefilter=installed&namefilter=&submit=Anfrage+senden 
    und setzte die an den Aufruf hinten drann
    PHP Code:
    ./package?updatedb=n&typefilter=installed&namefilter=&submit=Anfrage+senden 
    kommt das:
    PHP Code:
    [admin@Willi cgi-bin]$ ./package?updatedb=n&typefilter=installed&namefilter=&submit=Anfrage+senden
    -sh: ./package02?updatedb=nnot found
    [3] + Done                       ./package02?updatedb=n
    [2] + Done                       ./package02?updatedb=n
    [1] + Done(127)                ./package02?updatedb=
    Scheinbar ist die Parameterübergabe nicht richtig um das per Konsole aufzurifen.
    Wie müsste die erfoglen?









































    Quote Originally Posted by wengi View Post
    Eigentlich müssen die nur ausgeführt werden. Das Script überprüft ob bash installiert ist, macht aber auch ohne bash weiter...
    Würde das da auch ganz ohne cgi gehen?
    Könnte ich das auch über den Origianl-Oleg-ASUS-WebServer aufrufen?
    Müsste doch irgendwie zu machen sein oder?
    Ich kann ja Befehle / Programme / ShellScripte mit der Original-Oleg-ASUS-WebServer aufrufen unter http://10.0.2.93/Main_AdmStatus_Content.asp.
    Das habe ich ja auch für mein SIS-PM-WebGui genutzt.
    Quote Originally Posted by wengi View Post
    Ich werds bei gelegenheit mal testen
    Jo, das wäre nett wenn du da auch mal mit dran bleiben köntest.
    Ist ja nicht so das das Script lebensnotwendig wäre aber, wissen wann und warum nicht es geht oder nicht geht wöllte ich schon.

    Gruß.
    Attached Images Attached Images      
    Last edited by WLAN-Fan; 05-03-2008 at 13:19.

Similar Threads

  1. [Prob] Mediatomb UPnP Media Server auf dem Asus Wl-500 gP (Oleg)? Wie?
    By edelknecht in forum German Discussion - Deutsch (DE)
    Replies: 15
    Last Post: 16-04-2010, 12:54
  2. System-Aufbau von Oleg-FW auf den ASUS-Rouern gesucht
    By WLAN-Fan in forum German Discussion - Deutsch (DE)
    Replies: 7
    Last Post: 14-12-2007, 12:44
  3. Asus WL-500G en Linksys NSLU2
    By VEJ in forum Dutch Discussion - Nederlands
    Replies: 0
    Last Post: 06-12-2007, 21:23
  4. Verbinden von zwei WL500GP klappt nicht
    By marrrtin in forum German Discussion - Deutsch (DE)
    Replies: 13
    Last Post: 09-08-2007, 15:34

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •