summaryrefslogtreecommitdiff
path: root/packages/nslu2-binary-only/unslung-rootfs-2.3r25/maintmode.cgi
blob: 157f6c1b82a38c1df9f39e8fb851de0b2eaa64d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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"
   mount -t jffs2 /dev/mtdblock4 /mnt/repair
   rm /mnt/repair/$FLAG
else
   echo "REBOOTING IN MAINTENANCE MODE"
   touch /$FLAG
fi
echo " </H1> </BODY> </HTML>"
echo

sleep 2

/usr/sbin/DO_Reboot