#!/bin/sh export DATE="27.8.2007";SCRIPT=${0#/rom} export TITLE="Amministrazione: Riavvio" . ${SCRIPT%/*}/cgi-bin-pre.sh cat<Amministrazione: Riavvio EOF if [ "$REQUEST_METHOD" = "POST" ]; then read QUERY_STRING fi if [ -z "$QUERY_STRING" ]; then ff_firmware= if ! grep -q ff_reset /rom/etc/preinit /etc/preinit>/dev/null 2>&1; then ff_firmware='" DISABLED="DISABLED' fi cat<
Riavvio normale
Riavvia in modalità failsafe
Riavvia in modalità di sola lettura (per aggiornamenti firmware)
Riavvio con inizializzazione ("Formattazione hard disk/JFFS2", Durata: 2 minuti) EOF if [ '"nvram"' = "$(grep mtd3: /proc/mtd|if read line; then set $line;echo $4;fi)" ]; then cat<
Riavvio con i default del boot loader. Questa opzione è testata solo per questi apparati: Linksys WRT54G + WRT54GS! Per il Siemens SE505 salva manualmente le variabili NVRAM et0macaddr e il0macaddr per poterle ripristinare in seguito. EOF fi cat<
 
   
EOF if [ "$(nvram get boot_wait)" != "on" ]; then cat<Nota bene: Il settaggio di configurazione del boot_wait risulta attualmente a "$(nvram get boot_wait)". Per consentire la possibilità di caricare un nuovo firmware via TFTP, al riavvio verrà impostato a "on".

EOF fi if [ -n "$ff_firmware" ]; then cat<Attenzione: L'opzione di riavvio estesa è disponibile solo con il firmware Freifunk.

EOF fi else IFS=\&;set ${QUERY_STRING%%[^%&=+-:@-_a-z~]*};unset IFS;eval $* DIRTY= if [ -n "$post_reset" ]; then if [ "$ff_reset" = "killnvram" ]; then if [ '"nvram"' = "$(grep mtd3: /proc/mtd|if read line; then set $line;echo $4;fi)" ]; then mtd erase /dev/mtd/3 fi else for V in ff_reset boot_wait; do eval "C=\$$V" C=$(httpd -d "$C") if [ "$C" != "$(nvram get $V)" ]; then DIRTY=1 nvram set $V="$C" fi done test -n "$DIRTY" && nvram commit>/dev/null 2>&1 fi cat< L'apparato è in fase di riavvio. Agpettare prego... EOF if [ "$ff_reset" = "failsafe" ]; then cat<

SuggerimentoTip: In modalità failsafe, l'indirizzo IP dell'apparato è sempre 192.168.1.1. Mentre attendete che l'apparatosi completi il riavvio, potete configurare lascheda di rete con un indirizzo IP appropriato, per esempio 192.168.1.2.

EOF elif [ "$ff_reset" = "format" ] || [ "$ff_reset" = "killnvram" ]; then cat< EOF else cat< EOF fi sh -c "sleep 2;reboot">/dev/null 2>&1 & fi fi . ${SCRIPT%/*}/cgi-bin-post.sh