#!/bin/sh export DATE="1.9.2007";SCRIPT=${0#/rom} export TITLE="Admin: Software 1" . ${SCRIPT%/*}/cgi-bin-pre.sh cat<Admin: Software 1 EOF if [ "(ro)" != "$(mount|grep " / "|if read line; then set $line;echo $6;fi)" ]; then if [ "$REQUEST_METHOD" = "POST" ]; then read QUERY_STRING fi if [ -z "$QUERY_STRING" ]; then TOTMEM=$(grep MemTotal: /proc/meminfo|if read line;then set $line;echo $2;fi) cat<
Software file (*.ipk):
Install automatically Install manually
intro.jpg (main page)
 
   

Manual Install

You may need to install and configure a software file manually. For this, upload the software file first. The installation is then possible with the SSH command line of the Linux operating system. Start an SSH client and connect to root@$(nvram get lan_ipaddr). The password is the same as the password for the administration pages of the Web interface. Tip: Windows users can use the Freeware program PuTTY as SSH client.

Example: The software file beispiel_1.0_mipsel.ipk should be installed. After uploading the ipk file, the manual installation is started on the SSH command line with the following input: ipkg install /tmp/beispiel_1.0_mipsel.ipk [Enter key].

With an active Internet connection, the following commands can be used alternatively:

Commands are entered at the prompt and confirmed with the Enter key. Some of the more useful commands are: ls, cd, cp, rm and vi. Many commands also have a short help accessible via the -h option, for example cp -h. In order to modify a configuration file (e.g. /etc/local.dnsmasq.conf), do the following:

  1. Type the command cd /etc and confirm with [Enter].
  2. The command ls -l loc* to view the contents of the directory.
  3. Enter the command vi local.dnsmasq.conf to view and edit. To make life easier, use the [Tab] key to automatically complete the filename, e.g. enter vi local.d and complete by pressing [Tab].
  4. Use the cursor keys to move to the location where you need to make the modification.
  5. Use the [i] key to enter the insert mode. Now the text may be modified or entered. Use the [Esc] key to exit the insert mode and return to the command mode.
  6. In the command mode, use [d] [d] to delete an entire line.
  7. Using [:] [w] [q] [Enter] you can save your changes and exit the editor.
  8. With [:] [q] [!] [Enter] you leave the editor without storing you modifications.

Note: Many of the configuration files are links to the read-only ROM partition. To modify these files, you need to remove the link first (rm /etc/sample.conf). Then copy the current file from the ROM partion (cp /rom/etc/sample.conf /etc).

EOF elif [ "$QUERY_STRING" != "${QUERY_STRING#install=2}" ]; then echo "
"
ipkg update && ipkg -force-defaults install freifunk-recommended-en 2>&1
echo "
" elif ! eval $(./freifunk-upload -e 2>&1); then cat< $ffout

The software upload was aborted.

EOF elif [ -n "$ffout" ]; then if [ "1" = "$install" ]; then echo "
"
ipkg -force-defaults install "$ffout" 2>&1
rm "$ffout"
echo "
" elif [ "3" = "$install" ]; then echo "
"
set -x
rm -f /www/images/intro.jpg
mv "$ffout" /www/images/intro.jpg
set +x
echo "
" else cat< Install software manually with ipkg install $ffout EOF fi else cat< No software file received. EOF fi else cat< Additional software packages cannot be installed or removed in failsafe mode or in read-only mode. On the Restart page activate the Normal restart option and confirm with Restart. EOF fi . ${SCRIPT%/*}/cgi-bin-post.sh