by Fma965 » Thu Mar 07, 2013 4:11 pm
Follow these instructions to get the bottom led to indicate disk access.
$this->bbcode_second_pass_quote('Obihoernchen', 'I')'ve made a systemd service to autostart this blink action

You need iostat so install sysstat:
$this->bbcode_second_pass_code('', 'pacman -S sysstat')
Create a new file called
/usr/lib/systemd/system/blinkled.service$this->bbcode_second_pass_code('', '[Unit]
Description=Blink LED if hard drive is active daemon
[Service]
Type=oneshot
ExecStart=/usr/local/bin/blinkled
ExecStop=/usr/bin/killall iostat
RemainAfterExit=true
[Install]
WantedBy=multi-user.target')
And another one called
/usr/local/bin/blinkled$this->bbcode_second_pass_code('', '#!/bin/bash
/usr/bin/iostat -z -d 3 sda | /usr/bin/sed -u -e '1d' -e 's/Device.*/none/' -e 's/sd.*/heartbeat/' -e '/^$/d' > /sys/class/leds/status\:white\:misc/trigger &')
$this->bbcode_second_pass_quote('Obihoernchen', '
')Make executable:
$this->bbcode_second_pass_code('', 'chmod u+x /usr/local/bin/blinkled')
Now you can use systemctl to control this service

To enable:
$this->bbcode_second_pass_code('', 'systemctl enable blinkled.service')
To start:
$this->bbcode_second_pass_code('', 'systemctl start blinkled')