DlinkDsl320bReboot


#!/bin/sh

# This script reboots D-Link DSL-320B and D-Link DSL-321B modems
# invoking wget under Linux.
# The DSL-320B Annex A/L/M ADSL2+ modem here runs the firmware version EU_1.21
# on a hardware version D1.
# The DSL-321B Annex B ADSL2+ modem here runs the firmware version DE_1.03
# on a hardware version D2.
# This script has been tested under Debian Lenny with wget 1.11.4,
# and under DD-WRT v24-presp2-13064 mini on a Linksys WRT54GL v1.1 router
# with wget_1.11-4_mipsel.ipk from http://www.timpinkawa.net/ddwrt/wget.html.
# No write access is necessary.

# This script was written by Stephan Seidl in 2010, no copyright is claimed.
# It is offered as-is, without any warranty.
# This script is in the public domain; do with it what you wish.

unset LANG LC_ALL
LC_ALL=C
export LC_ALL

WGET=/jffs/usr/bin/wget
HOSTNAME=modem.snet

test -x ${WGET} || WGET=wget

cmd="${WGET}"
cmd="${cmd} --tries=1 --timeout=15"
cmd="${cmd} -o /dev/null -O /dev/null"
cmd="${cmd} http://${HOSTNAME}/tools/restore.xgi'?'set/sys/restart=1"
eval "${cmd}" || :


Stephan K.H. Seidl