#!/bin/sh #------------------------------------------------------------------------------ # /usr/local/htdocs/unimount/unimount.cgi - mount or dismount volumes, CDs # or shares # # Copyright (c) 2004-2010 Marcus Herleb, herleb(at)herleb(dot)de # Copyright (c) 2011-2018 The Eisfair Team, team(at)eisfair(dot)org # # Creation: 2004-01-01 mh # Last Update: $Id$ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version.. #------------------------------------------------------------------------------ eval "`proccgi $*`" . /etc/config.d/mini_httpd_unimount RTIME=20 myname=`basename $0` tag=`date +%d.%m.%Y` uhr=`date +%T` log='/var/log/log.admin' echo "Content-Type: text/html; charset=iso-8859-1" echo "Cache-control: no-store" # HTTP/1.1 (or no-cache?) echo "Pragma: no-cache" # HTTP/1.0 echo "Expires: `date -Ru`" # Expires now! echo echo "
" echo '' echo "" echo "" echo "' echo '
Name | Device/Volume | Directory | Zugriff | Type | User | Group | Status | ' echo ' | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
${UNIMOUNT_NAME} | ${UNIMOUNT_DEVICE} | ${UNIMOUNT_POINT} | ${UNIMOUNT_OPTION} | " echo "${UNIMOUNT_TYPE} | ${UNIMOUNT_USER} | ${UNIMOUNT_GROUP} | " echo "${action} | " echo "||||||||||
' echo ' | ' echo ' | ||||||||||||||||
Device/Volume | Grösse | Belegt | Verfügbar | Belegt in % | unimount? | ' echo ' | |||||||||||
${Filesystem} | ${Size} | ${Used} | " echo "${Available} | ${Use2} | " idx=1 unimounted=0 while [ ${idx} -le ${UNIMOUNT_N} ] do eval active='$UNIMOUNT_'${idx}'_ACTIVE' if [ "${active}" = "yes" ] then eval device='$UNIMOUNT_'${idx}'_DEVICE' if [ "${Filesystem}" = "${device}" ] then unimounted=1 break fi fi idx=`expr ${idx} + 1` done if [ ${unimounted} -eq 1 ] then image="ongreen.gif" text="durch Unimount gemountet, kann entladen werden" else image="cross.gif" text="ist ein Systemmount" fi echo "" echo ' |