Results 1 to 15 of 63

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2005
    Location
    Germany
    Posts
    423

    ipkg-Web-Managment cgi-bin Script von NSLU2 auf WL-HDD + ASUS umbauen The ipkg web fr

    The ipkg Web Frontend


    Hi,

    für die NSLU2 gibt es ein ipkg-Web-Managment Tool.
    Es ist für die NSLU2 geschrieben auf denen das NSLU2-Debian läuft.
    Also keine Oleg oder OpenWRT oder zu der Gruppe gehörende FirmeWare.

    Leider kann ea auf der WL-HDD so nicht per ipkg installiert werden, weil es andere Pfade nutzt. Da es ja nicht für die Oleg-Firmware geschrieben wurde.

    Daher möchte ich das von dem NSLU2-Debian auf die Oleg-FirmeWare portieren.

    Im Grund müssten nur ein paar Pfade geändert werden, dachte ich.
    Aber irgendwo scheint doch noch etwas tiefer der "Wurm" drin zu stecken.

    Aber vielleicht sehr ihr ja den springenden Punkt warum es sich nicht o einfach portieren lässt oder das es sich einfach portieren lässt nur bis jetzt das noch nicht gefunden wurde was es ist das geändert werden muß.

    Es besteht aus 2 Dateien:
    package.cgi
    PHP Code:
    #!/bin/sh
    #
    # $Id: package.cgi 6240 2007-06-17 22:29:05Z marceln $
    #

    if [ "${BASH_CHECK}!= --/opt/bin/bash ]
    then
        BASH_CHECK
    =1export BASH_CHECK
        
    /opt/bin/bash $0
        
    exit $$
    fi

    PROG
    =${0##*/}
    TMPFILE=/tmp/${PROG}.$$

    #
    # HTML Header
    #
    cat << EOF
    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>
    EOF

    NAMEFILTER
    =.

    # QUERY_STRING=task=install&package=atk
    IFS='&'
    set -- ${QUERY_STRING}
    for 
    i in $@
    do
        case ${
    i%%=*} in
            task
    )
                
    TASK="${i#*=}"
                
    ;;
            
    package)
                
    PACKAGE="${i#*=}"
                
    ;;
            
    updatedb)
                
    UPDATEDB="${i#*=}"
                
    ;;
            
    typefilter)
                
    TYPEFILTER="${i#*=}"
                
    ;;
            
    namefilter)
                if [ 
    "${i#*=}" ]
                
    then
                    NAMEFILTER
    ="${i#*=}"
                
    fi
                
    ;;
            
    submit)
                
    SUBMIT="${i#*=}"
                
    ;;
            *)
                echo 
    "<b>ERROR</b>: Unkown option '${i}'"
                
    echo '</body>'
                
    echo '</html>'
                
    exit 1
                
    ;;
        
    esac
    done

    if [ ! -/opt/bin/bash ]
    then
        
    echo "<h2>Please install bash</h2>"
        
    echo "<p>I recomend to install bash because this cgi script will"
        
    echo "run more than two times faster with bash</p>"
    fi

    if [ "${UPDATEDB}]
    then
        
    echo "<h2>Upgrading package list</h2>"
        
    echo '<pre>'
        
    ipkg update </dev/null
        
    echo '</pre>'
    fi

    if [ "${TASK}install ]
    then
        
    echo "<h2>Install ${PACKAGE}</h2>"
        
    echo '<pre>'
        
    ipkg -force-defaults install "${PACKAGE}</dev/null
        
    echo '</pre>'
    fi

    if [ "${TASK}update ]
    then
        
    echo "<h2>Update ${PACKAGE}</h2>"
        
    echo '<pre>'
        
    ipkg -force-defaults upgrade "${PACKAGE}</dev/null
        
    echo '</pre>'
    fi

    if [ "${TASK}delete ]
    then
        
    echo "<h2>Delete ${PACKAGE}</h2>"
        
    echo '<pre>'
        
    ipkg -force-defaults remove "${PACKAGE}</dev/null
        
    echo '</pre>'
    fi

    if [ "${SUBMIT}!= ""  ]
    then
        
    echo '<h2>Package list</h2>'
        
    ipkg list_installed >${TMPFILE}
        
    trap "[ -f ${TMPFILE} ] && rm ${TMPFILE}0

        
    echo '<table border="1" cellpadding="0" cellspacing="0">'
        
    echo '<tr><th>task</th><th>Package</th><th>I-Ver</th><th>P-Ver</th><th>Comment</th><th>Delete</th></tr>'
        
    ipkg list | grep -- "${NAMEFILTER}| while read line
        
    do
            
    INSTALLED=""
            
    NAME=${line%% - *}
            
    line=${line#* - }
            
    VERSION=${line%% - *}
            
    VERSION=${VERSION% -}
            
    COMMENT=${line#* - }
            
    if [ "$COMMENT"$line]
            
    then
                COMMENT
    ='&nbsp;'
            
    fi
            instline
    =$(grep "^${NAME} - " ${TMPFILE})
            if [ 
    "${instline}!= "" ]
            
    then
                INSTALLED
    =Y
                DEL
    ="<a href='$PROG?task=delete&amp;package=${NAME}' class='del'>delete</a>"
                
    instline=${instline#* - }
                
    IVER=${instline%% - *}
                if [ 
    "${IVER}"${VERSION}]
                
    then
                    TASK
    ='&nbsp;'
                
    else
                    
    TASK="<a href='$PROG?task=update&amp;package=${NAME}' class='upd'>update</a>"
                
    fi
            
    else
                
    DEL='&nbsp;'
                
    IVER='&nbsp;'
                
    TASK="<a href='$PROG?task=install&amp;package=${NAME}' class='ins'>install</a>"
            
    fi
            SHOW
    =0
            
    case "${TYPEFILTER}in
                none
    )
                    
    SHOW=1
                    
    ;;
                
    update)
                    [ 
    "${INSTALLED}] && [ "${IVER}!= "${VERSION}] && SHOW=1
                    
    ;;
                
    installed)
                    [ 
    "${INSTALLED}] && SHOW=1
                    
    ;;
                
    not)
                    [ -
    "${INSTALLED}] && SHOW=1
                    
    ;;
                *)
                    echo 
    "<b>ERROR</b>: Unkown typefilter '${TYPEFILTER}'"
                    
    echo '</body>'
                    
    echo '</html>'
                    
    exit 1
                    
    ;;
            
    esac
            
    "${SHOW}] && echo "<tr><td>${TASK}</td><td>${NAME}</td><td>${IVER}</td><td>${VERSION}</td><td>${COMMENT}</td><td>${DEL}</td></tr>"
        
    done
        
    echo '</table>'
    fi

    echo '</body>'
    echo '</html>' 
    und sluginfo:
    PHP Code:
    #!/bin/sh
    #
    # $Id: sluginfo.cgi 7479 2007-12-18 22:29:09Z marceln $
    #
    if [ "${BASH_CHECK}!= --/opt/bin/bash ]
    then
        BASH_CHECK
    =1export BASH_CHECK
        
    /opt/bin/bash $0
        
    exit $$
    fi

    showcommand
    () {
        
    NAME=$1
        shift
        PROG
    =$1
        shift
        
    if [ -${PROG} ]
        
    then
            
    echo "<h3>${NAME}</h3>"
            
    echo "<pre>"
            
    ${PROG"$@"
            
    echo "</pre>"
        
    fi
    }

    showfile() {
        
    FILE=$1;
        
    BASE=${FILE##*/}
        
    shift
        
    if [ -"${FILE}]
        
    then
            showcommand 
    "${BASE}" "/bin/cat" "${FILE}"
        
    fi
    }

    runprog() {
        
    PROG=$1;
        
    BASE=${PROG##*/}
        
    shift
        showcommand 
    "${BASE}" "${PROG}" "$@"
    }

    cd /tmp
    cat 
    << EOF
    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="sh" />
      <
    meta name="version" content="\$Id: sluginfo.cgi 7479 2007-12-18 22:29:09Z marceln $" />
      <
    title>sluginfo</title>
    </
    head>
    <
    body>
    <
    h1>Slug info</h1>
    <
    ol>
    <
    li><a href="#sys">System</a></li>
    <
    li><a href="#soft">Installed software</a></li>
    <
    li><a href="#disk">Disks</a></li>
    <
    li><a href="#network">Network</a></li>
    <
    li><a href="#samba">samba</a></li>
    </
    ol>
    EOF
    echo '<a id="sys" /><h2>System</h2>'
    showfile /etc/motd 
    runprog 
    /opt/bin/uname -a
    showfile 
    /proc/cpuinfo
    showfile 
    /proc/meminfo
    showfile 
    /proc/bus/usb/devices
    runprog 
    /sbin/lsmod
    runprog 
    /bin/ps
    runprog 
    /bin/dmesg
    echo '<a id="soft" /><h2>Installed software</h2>'
    runprog /usr/bin/ipkg list_installed
    echo '<a id="disk" /><h2>Disks</h2>'
    showfile /proc/mounts
    runprog 
    /bin/df
    showcommand 
    "sda" /sbin/fdisk -/dev/sda
    showcommand 
    "sdb" /sbin/fdisk -/dev/sdb
    showcommand 
    "sdc" /sbin/fdisk -/dev/sdc
    showcommand 
    "sdd" /sbin/fdisk -/dev/sdd
    echo '<a id="network" /><h2>Network</h2>'
    runprog /sbin/ifconfig
    runprog 
    /sbin/route
    showfile 
    /etc/resolv.conf
    runprog 
    /opt/bin/host ipkg.nslu2-linux.org
    runprog 
    /bin/ping -c 2 ipkg.nslu2-linux.org
    runprog 
    /usr/bin/wget http://ipkg.nslu2-linux.org
    echo '<a id="samba" /><h2>Samba</h2>'
    showfile /opt/etc/samba/smb.conf
    showfile 
    /opt/etc/samba/user_smb.conf
    showfile 
    /var/log/samba/log.smbd
    showfile 
    /var/log/samba/log.nmbd
    echo '</body>'
    echo '</html>' 
    Wobei sluginfo nur Informationen zum System ausgibt.
    Dieses Script habe ich schon an die WL-HDD angepasst, kann sein das ich noch was übersehen.

    Das script package.cgi muß noch bearbeitet werden.
    Als erstes muß das hier angepasst werden:
    PHP Code:
    if [ "${BASH_CHECK}!= --/opt/bin/bash ]
    then
        BASH_CHECK
    =1export BASH_CHECK
        
    /opt/bin/bash $0
        
    exit $$
    fi 
    Haben wir auf der WL-HDD eine bash? Oder wie heisst das Ding und wo liegt es, so das der Pfad geändert werden kann?

    Würde nach anpassen das auch ohne die Installation von einem zusätzlichen thttpd WebServer mit dem Originalen WebServer funktionieren?


    Ein:
    PHP Code:
     ipkg list | grep bash
    bash 
    3.2.17-A bourne style shell
    dash 
    0.5.3-dash (Debian Almquist Shellis a POSIX compliant shell that is much smaller than bash.
    which 2.18-which prints out the full path of the executablesthat bash(1would execute when the passed program names would have been enter 
    hat das ergeben.
    Brauche ich die bash? Ich habe doch schon root Zugriff über Putty.

    Gruß WLAN-Fan.
    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by WLAN-Fan; 05-03-2008 at 09:37.

  2. #2
    Join Date
    Feb 2005
    Location
    Germany - Frankfurt
    Posts
    1,548
    Hi,

    Das ist halt eine andere shell. Wenn das Webinterface die braucht kannst Du sie installieren.
    Welche shell für welchen user genutzt wird steht in der /etc/passwd.
    Du kannst die bash shell einfach über ipkg installieren.
    Sollte zum laufen der cgi-scripte aber nicht notwendig sein.

    wengi
    Übersicht aller HowTos --- HowTo Overview (mostly german)
    WL-HDD mit diesem Setup. --- WL-HDD with this setup.
    Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread!
    Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein)

  3. #3
    Join Date
    Nov 2005
    Location
    Germany
    Posts
    423

    sh bash F.A.Q

    Hi,
    Quote Originally Posted by wengi View Post
    Das ist halt eine andere shell.
    Quelle: www
    /bin/sh ist die Bourne Shell. Sie stammt von AT&T und ist Closed Source. Daher wirst du sie auch nicht bei deiner Linux Distribution finden.

    /bin/bash ist die Bourne Again Shell, die freie Variante der Bourne Shell. Die Bash ist 100% sh-kompatibel.

    die /bin/bash eigentlich die gebräuchlichste Shell.
    Fast alle Skripte werden für sie geschrieben.

    Die einzige Shell, die die bash übertrifft, ist die ZSH.

    Unterschiede sind z.B., dass die ZSH auch Tippfehler korrigieren kann (muss extra eingeschaltet werden), standardmäßig bei TAB-Vervollständigung die Vorschläge anzeigt (bei der Bash muss man normalerweise 2xTAB drücken, lässt sich aber konfigurieren), die ZSH Completion für Programme wir apt-get liefert und bei rpm -i TAB z.B. nur noch die Dateien mit der Endung .rpm anzeigt.

    Die sh ist quasi der Vorgänger der Bash (andersrum ist es korrekter: die Bash ist der Nachfolger der sh, quasi ein verbesserter Klon).

    Die sh ist älter als die Bash und ist nicht ganz so mächtig, hat also weniger "Optionen". Da aber früher unter Unix so ziemlich alles mit dieser Shell gemacht wurd, wird sie auch heute noch benutzt und ist sozusagen der kleinste gemeinsame Nenner. Schreibst du unter Linux ein Shellscript für die /bin/sh, so läuft dieses auch unter Solaris oder beispielsweise FreeBSD, denn auch diese haben eine /bin/sh mit genau der selben Syntax. Die Bash hingegen findest du auf solchen Systemen vielleicht nicht, daher schreibt man Scripte auf meist für /bin/sh.

    Es gibt noch einen weiteren Grund, warum man für /bin/sh schreiben sollte, der allerdings auf Linux leider NICHT zutrifft (was ich wirklich dumm finde). Unter FBSD ist /bin/sh beispielsweise ein eigenständiges Programm, also nicht wie bei Linux einfach ein zweiter Name für die Bash. Das hat zwei Vorteile:
    1) /bin/sh (die eigenständige Shell) startet erheblich schneller als die Bash im sh-Modus. Beim Booten werden gleich ein paar Dutzend Shells gestartet, so daß das eine große Zeitersparnis bringt.
    2) Die sh enthält eben wirklich nur die Features der sh, nicht mehr. Die bash hingegen hat die Features der sh und der bash. Das wirkt sich nicht nur auf die Performance aus, sondern auch auf den RAM-Verbrauch. Der kann schonmal 1MB höher bei Linux ausfallen, als bei FBSD mit einer eigenständigen /bin/sh. Das klingt nicht viel, aber wenn auf einem System 20 Scripte laufen, sind das schon 20MB (vor allen Dingen unnötige MB!).
    Warum verwenden wir sh und nicht die bash?
    Also warum muß ich die mir nachinstallieren?
    Ist die sh in dem BusyBox Paket dabei und die bash nicht?
    Wenn das so ist weil die sh kleiner als die bash ist?
    Wie funktioniert das generel mit dem BusyBox Paket?
    Ist das nur eine Zusammenstellung wichtiger Programme (Binarys)?
    Oder ist das ein Programm was diese wichtigen Programme enthält?

    Kann ich auch mit normal mit "/bin/sh" per Putty einloggen und dann auf die "bash" wechseln?
    Quote Originally Posted by wengi View Post
    Wenn das Webinterface die braucht kannst Du sie installieren.
    Du kannst die bash shell einfach über ipkg installieren.
    Sollte zum laufen der cgi-scripte aber nicht notwendig sein.
    Was müsste an dem Script umgeschrieben werden damit das ohne die bash sondern mit der sh funktioneirt?
    Quote Originally Posted by wengi View Post
    Welche shell für welchen user genutzt wird steht in der /etc/passwd.
    Was passiert wenn ich das auf bash ändere für meinen Nutzter root und die bash noch gar nee installiert habe oder sie wieder deinstalliere?
    Habe ich mich dann entgültig ausgesperrt aus meinem System?

    Gruß.

  4. #4
    Join Date
    Nov 2005
    Location
    Germany
    Posts
    423

    Installation von bash scheitert an BuildRoot, Warum?

    Hi,

    Installation von bash scheitert an BuildRoot, Warum?
    PHP Code:
    ipkg install bash
    Installing bash 
    (3.2.17-1to /opt/...
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/bash_3.2.17-1_mipsel.ipk
    Installing readline (5.2-2to /opt/...
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/readline_5.2-2_mipsel.ipk
    An error ocurred, return value2.
    Collected errors
    :
    Package readline wants to install file /opt/info/dir.old
            But that file is already provided by package buildroot
    Package readline wants to install file 
    /opt/info/dir
            But that file is already provided by package buildroot 
    So dann habe ich in der Datei "package" alle
    "/opt/bin/bash"
    durch
    "/bin/sh"
    ersetzt.

    Leider kommt dann im webGui die Fehlermeldung:
    packagesh: packagesh: 160: ipkg: not found
    und
    packagesh: packagesh: 248: ipkg: not found

    Was soll das aussagen?

    Liegt der Wurm eventuell hier:
    PHP Code:
    ipkg list_installed grep ipkg
    ipkg
    -opt 0.99.163-The Itsy Package Manager
    ipkg
    -web 7-A web frontend for ipkg 
    So gleich mal das probiert:
    PHP Code:
    ipkg remove ipkg-web
    Removing package ipkg
    -web from /opt/...
    Successfully terminated
    hat nix geholfen.

    Also mal das probiert:
    PHP Code:
    ipkg -force-defaults upgrade
    Upgrading adduser on 
    /optfrom 1.8.2-1 to 1.9.1-1...
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/adduser_1.9.1-1_mipsel.ipk
    Upgrading coreutils on /optfrom 6.9-6 to 6.9-7...
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/coreutils_6.9-7_mipsel.ipk
    Upgrading e2fsprogs on /optfrom 1.40.2-4 to 1.40.3-4...
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/e2fsprogs_1.40.3-4_mipsel.ipk
    Installing e2fslibs (1.40.3-4to /opt/...
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/e2fslibs_1.40.3-4_mipsel.ipk
    Upgrading findutils on /optfrom 4.2.31-3 to 4.2.32-1...
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/findutils_4.2.32-1_mipsel.ipk
    Upgrading hdparm on /optfrom 6.9-1 to 8.1-1...
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/hdparm_8.1-1_mipsel.ipk
    wgetserver returned error 404HTTP/1.1 404 Not Found
    Upgrading less on 
    /optfrom 416-1 to 418-1...
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/less_418-1_mipsel.ipk
    Upgrading libuclibc++ on /optfrom 0.2.2-4 to 0.2.2-6...
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/libuclibc++_0.2.2-6_mipsel.ipk
    Upgrading libxml2 on /optfrom 2.6.30-2 to 2.6.31-1...
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/libxml2_2.6.31-1_mipsel.ipk
    Upgrading man on /optfrom 1.5p-4 to 1.6f-1...
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/man_1.6f-1_mipsel.ipk
    Upgrading man-pages on /optfrom 2.33-3 to 2.76-1...
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/man-pages_2.76-1_mipsel.ipk
    Upgrading nano on /optfrom 2.0.6-1 to 2.0.7-1...
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/nano_2.0.7-1_mipsel.ipk
    Upgrading nmap on /optfrom 4.20-1 to 4.53-1...
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/nmap_4.53-1_mipsel.ipk
    Upgrading pcre on /optfrom 7.4-1 to 7.6-2...
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/pcre_7.6-2_mipsel.ipk
    Configuring adduser
    update
    -alternativesLinking //opt/bin/su to coreutils-su
    Configuring coreutils
    update
    -alternativesLinking //opt/bin/[ to coreutils-lbracket
    update-alternativesLinking //opt/bin/base64 to coreutils-base64
    update-alternativesLinking //opt/bin/basename to coreutils-basename
    update-alternativesLinking //opt/bin/cat to coreutils-cat

    SCHNIP
    ...
    SCHNAP

    Configuring libxml2
    Configuring man
    Configuring man
    -pages
    Configuring nano
    Configuring nmap
    Configuring pcre
    Successfully terminated
    .
    Collected errors:
    ipkg_downloadERRORCommand failed with return value 1: `wget    -q -P /opt/ipkg-hGXEx7 http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/hdparm_8.1-1_mipsel.ipk'
    Failed to download hdparm. Perhaps you need to run 'ipkg update'? 
    was auch immer der Befehl so richtig macht. Weiß das einer?

    So jetzt nehem ich das Script auseinander.
    Das gelöscht:
    PHP Code:
    if [ "${BASH_CHECK}!= --/opt/bin/bash ]
    then
        BASH_CHECK
    =1export BASH_CHECK
        
    /opt/bin/bash $0
        
    exit $$
    fi

    PROG
    =${0##*/}
    TMPFILE=/tmp/${PROG}.$$ 
    Kommt das:
    PHP Code:
    packageshpackagesh242cannot create Directory nonexistent packageshpackagesh242ipkgnot found task Package I-Ver P-Ver Comment Delete 
    packagesh
    packagesh242ipkgnot found 
    Gruß.
    Last edited by WLAN-Fan; 04-03-2008 at 13:46.

  5. #5
    Join Date
    Feb 2005
    Location
    Germany - Frankfurt
    Posts
    1,548
    Quote Originally Posted by WLAN-Fan View Post
    1) Warum verwenden wir sh und nicht die bash?
    2) Also warum muß ich die mir nachinstallieren?
    3) Ist die sh in dem BusyBox Paket dabei und die bash nicht?
    4) Wenn das so ist weil die sh kleiner als die bash ist?
    5) Wie funktioniert das generel mit dem BusyBox Paket?
    6) Ist das nur eine Zusammenstellung wichtiger Programme (Binarys)?
    7) Oder ist das ein Programm was diese wichtigen Programme enthält?
    8) Kann ich auch mit normal mit "/bin/sh" per Putty einloggen und dann auf die "bash" wechseln?

    9) Was müsste an dem Script umgeschrieben werden damit das ohne die bash sondern mit der sh funktioneirt?

    10) Was passiert wenn ich das auf bash ändere für meinen Nutzter root und die bash noch gar nee installiert habe oder sie wieder deinstalliere?
    Habe ich mich dann entgültig ausgesperrt aus meinem System?
    So viele Fragen
    Ich antworte mal nach bestem Wissen und Gewissen.

    1) Durch 3) beantwortet
    2) Durch 3) beantwortet. Man kann halt nicht alles ins Flash packen.
    3) richtig. Mach mal einen "ls -la /bin" und Du wirst sehen, was busybox alles macht.
    4) ist das eine Frage??? Die sh ist mit drin. Alles Andere musst Du die Entwickler von busybox fragen.
    5) siehe http://de.wikipedia.org/wiki/Busybox
    6) Nein. http://de.wikipedia.org/wiki/Busybox
    7) Ja. http://de.wikipedia.org/wiki/Busybox
    8) Ja. Einfach mal /opt/bin/bash aufrufen. Mit exit gehts zurück in die sh.
    9) keine Ahnung...
    10) Klassische Aussperrung. Das ist auch der Grund, warum in der passwd so was wie "/bin/nologin" drinsteht, wenn ein User sich nicht anmelden können soll.

    wengi
    Übersicht aller HowTos --- HowTo Overview (mostly german)
    WL-HDD mit diesem Setup. --- WL-HDD with this setup.
    Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread!
    Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein)

  6. #6
    Join Date
    Nov 2005
    Location
    Germany
    Posts
    423
    Das Problem ist das ich die bash nicht installeiren kann.
    Siehe obige Fehlermeldung.

    Daher mein Versuch das mit der sh zu machen.
    Aber das klappt auch nee.

  7. #7
    Join Date
    Nov 2005
    Location
    Germany
    Posts
    423

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
  •