summaryrefslogtreecommitdiff
path: root/packages/nslu2-binary-only
diff options
context:
space:
mode:
Diffstat (limited to 'packages/nslu2-binary-only')
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/maintmode.cgi20
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/maintmode.cgi b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/maintmode.cgi
index e69de29bb2..ca1c037160 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/maintmode.cgi
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/maintmode.cgi
@@ -0,0 +1,20 @@
+#!/bin/sh
+FLAG=.ramdisk
+echo "Content-type: text/html
+
+<HTML> <HEAD> <TITLE>TOGGLING MAINTENANCE MODE</TITLE> </HEAD> <BODY> <H1>"
+if [ -f /$FLAG ] ; then
+ echo "REBOOTING IN NORMAL MODE"
+ mkdir /mnt/maint
+ mount -t jffs2 /dev/mtdblock4 /mnt/maint
+ rm /mnt/maint/$FLAG
+else
+ echo "REBOOTING IN MAINTENANCE MODE"
+ touch /$FLAG
+fi
+echo " </H1> </BODY> </HTML>"
+echo
+
+sleep 2
+
+/usr/sbin/DO_Reboot