summaryrefslogtreecommitdiff
path: root/packages/nslu2-binary-only/unslung-rootfs-2.3r25/maintmode.cgi
blob: ca1c037160d0c0981b3b36e8d8f18311b1f674c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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