Hallo, ich habe smartd aufgesetzt und möchte eine Warnung an alle Anwender schicken wenn ein Fehler erkannt wird. Das u.g. Beispiel stammt aus /usr/share/doc/packages/smartmontools/examplescripts/exsample3 (SuSE 9.1). Bisher dachte ich immer das wall nur eine Datei als input akzeptiert, hier sieht es mir nach stdin aus. Ein manueller Aufruf des scripts liefert Fehler auch wenn ich die Variablen setze. Aufruf: wall [Datei] Aufruf: wall [Datei] Wie funktioniert das Skript und wie kann ich dieses mit smartd testen? Ich rufe es mittels -M exec in der smart.conf auf. Schon mal vielen Dank Michael Höller #! /bin/bash # # This is a script from the smartmontools examplescripts/ directory. # It can be used as an argument to the -M exec Directive in # /etc/smartd.conf, in a line like # -m <nomailer> -M exec /path/to/this/file # # Please see man 8 smartd or man 5 smartd.conf for further # information. # # $Id: Example3,v 1.4 2003/08/17 09:15:56 ballen4705 Exp $ # Warn all users of a problem wall 'Problem detected with disk: ' "$SMARTD_DEVICESTRING" wall 'Warning message from smartd is: ' "$SMARTD_MESSAGE" wall 'Shutting down machine in 30 seconds... ' # Wait half a minute sleep 30 # Power down the machine (uncomment the shutdown command if you really # want to do this!) # /sbin/shutdown -hf now -- Encrypted eMail welcome! Get my OpenPGP-Key ID: 0xE9B00731 from: wwwkeys.de.pgp.net
participants (1)
-
MichaelHoeller@t-online.de