oder hab dass hie schon irgendwo gelesen/überlesen

grüße
Code: Alles auswählen
#!/bin/sh
#echo "Standby ON." >> /tmp/test.txt
# rote LED an
/bin/fp_control -l 2 1 > /dev/null
HDDFOUND=0
for device in `cat /proc/partitions | awk '{print $4}' | grep "^sd[a-z]$"`; do
if [ `cat /sys/block/$device/removable` == "0" ]; then
sleep 90;echo "Standby ON - `sdparm -C stop /dev/$device`" >> /tmp/test.txt
HDDFOUND=1
else
echo "KEIN Standby - `sdparm -i /dev/$device`" >> /tmp/test.txt
fi
done
EMU_STANDBY_OFF=$(grep -i "EMU_STANDBY_OFF=" /var/etc/miscsettings.conf | cut -d "=" -f 2)
if [ "$EMU_STANDBY_OFF" == "1" ]; then
/usr/bin/bpanther 2 stopemu &
fi
# gelbe LED an (wenn eingebaut)
if [ "$HDDFOUND" == "1" ]; then
/bin/fp_control -l 3 1 > /dev/null
fi
# VFD-Wetter ein
if [ -e /var/plugins/vfdwetter ]; then
touch /tmp/.vfdwetter
/var/plugins/vfdwetter &
fi
exit 0
Code: Alles auswählen
#!/bin/sh
#echo "Standby ON." >> /tmp/test.txt
# rote LED an
/bin/fp_control -l 2 1 > /dev/null
HDDFOUND=0
for device in `cat /proc/partitions | awk '{print $4}' | grep "^sd[a-z]$"`; do
if [ `cat /sys/block/$device/removable` == "0" ]; then
(sleep 90;echo "Standby ON - `sdparm -C stop /dev/$device`" >> /tmp/test.txt) &
HDDFOUND=1
else
echo "KEIN Standby - `sdparm -i /dev/$device`" >> /tmp/test.txt
fi
done
EMU_STANDBY_OFF=$(grep -i "EMU_STANDBY_OFF=" /var/etc/miscsettings.conf | cut -d "=" -f 2)
if [ "$EMU_STANDBY_OFF" == "1" ]; then
/usr/bin/bpanther 2 stopemu &
fi
# gelbe LED an (wenn eingebaut)
if [ "$HDDFOUND" == "1" ]; then
/bin/fp_control -l 3 1 > /dev/null
fi
# VFD-Wetter ein
if [ -e /var/plugins/vfdwetter ]; then
touch /tmp/.vfdwetter
/var/plugins/vfdwetter &
fi
exit 0
Code: Alles auswählen
#!/bin/sh
#echo "Standby ON." >> /tmp/test.txt
# rote LED an
/bin/fp_control -l 2 1 > /dev/null
HDDFOUND=0
for device in `cat /proc/partitions | awk '{print $4}' | grep "^sd[a-z]$"`; do
if [ `cat /sys/block/$device/removable` == "0" ]; then
echo "Standby ON - `sdparm -C stop /dev/$device`" >> /tmp/test.txt
hdparm -S 30 /dev/sda
HDDFOUND=1
else
echo "KEIN Standby - `sdparm -i /dev/$device`" >> /tmp/test.txt
fi
done
EMU_STANDBY_OFF=$(grep -i "EMU_STANDBY_OFF=" /var/etc/miscsettings.conf | cut -d "=" -f 2)
if [ "$EMU_STANDBY_OFF" == "1" ]; then
/usr/bin/bpanther 2 stopemu &
fi
# gelbe LED an (wenn eingebaut)
if [ "$HDDFOUND" == "1" ]; then
/bin/fp_control -l 3 1 > /dev/null
fi
# VFD-Wetter ein
if [ -e /var/plugins/vfdwetter ]; then
touch /tmp/.vfdwetter
/var/plugins/vfdwetter &
fi
exit 0
Code: Alles auswählen
#!/bin/sh
#echo "Standby OFF." >> /tmp/test.txt
# rote LED aus
/bin/fp_control -l 2 0 > /dev/null
HDDFOUND=0
for device in `cat /proc/partitions | awk '{print $4}' | grep "^sd[a-z]$"`; do
if [ `cat /sys/block/$device/removable` == "0" ]; then
echo "Standby OFF - `sdparm -C start /dev/$device`" >> /tmp/test.txt
hdparm -S 0 /dev/sda
HDDFOUND=1
else
echo "Ignoriert - `sdparm -i /dev/$device`" >> /tmp/test.txt
fi
done
EMU_STANDBY_OFF=$(grep -i "EMU_STANDBY_OFF=" /var/etc/miscsettings.conf | cut -d "=" -f 2)
if [ "$EMU_STANDBY_OFF" == "1" ]; then
/usr/bin/bpanther 2 startemu
fi
# Update-Check
/usr/bin/updcheck.sh &
# gelbe LED aus (wenn eingebaut)
if [ "$HDDFOUND" == "1" ]; then
/bin/fp_control -l 3 0 > /dev/null
fi
# VFD-Wetter aus
if [ -e /var/plugins/vfdwetter ]; then
rm -f /tmp/.vfdwetter
fi
exit 0