Debian avr evtd
From NAS-Central Buffalo - The Linkstation Wiki
(Difference between revisions)
m (→Why not using kuroevtd ?) |
|||
| Line 1: | Line 1: | ||
| - | == Why not | + | == Why you should not use kuroevtd == |
kuroevtd is old and is not working well ! Most people can't switch off their kurobox by pressing the power button, and it's kuroevtd's fault ;) | kuroevtd is old and is not working well ! Most people can't switch off their kurobox by pressing the power button, and it's kuroevtd's fault ;) | ||
kuroevtd's author didn't stopped his project, he just renamed it to avr_evtd as it can runs on the kurobox, but also on linkstation devices ! | kuroevtd's author didn't stopped his project, he just renamed it to avr_evtd as it can runs on the kurobox, but also on linkstation devices ! | ||
| - | == Install avr_evtd | + | == Install avr_evtd == |
* Download avr_evtd from this page : https://sourceforge.net/project/showfiles.php?group_id=167880&package_id=190867 | * Download avr_evtd from this page : https://sourceforge.net/project/showfiles.php?group_id=167880&package_id=190867 | ||
| - | * to | + | * de-tar the file (was called avr_evtd020606.tar.bz2 when writing this guide) |
| + | tar xjf avr_evtd020606.tar.bz2 && cd avr_evtd/usr/src/avr_evtd | ||
| + | * Build the file | ||
| + | make avr_evtd | ||
| + | * Install the file | ||
| + | make install | ||
| + | * Make avr_evtd running at startup and stoping at shutdown | ||
| + | cd /etc/rc0.d/ && ln -s ../init.d/avr_evtd K20avr_evtd | ||
| + | cd /etc/rc1.d/ && ln -s ../init.d/avr_evtd K20avr_evtd | ||
| + | cd /etc/rc2.d/ && ln -s ../init.d/avr_evtd S20avr_evtd | ||
| + | cd /etc/rc3.d/ && ln -s ../init.d/avr_evtd K20avr_evtd | ||
| + | cd /etc/rc4.d/ && ln -s ../init.d/avr_evtd S20avr_evtd | ||
| + | cd /etc/rc5.d/ && ln -s ../init.d/avr_evtd S20avr_evtd | ||
| + | cd /etc/rc6.d/ && ln -s ../init.d/avr_evtd K20avr_evtd | ||
| + | |||
| + | * Edit the start script to allow avr_evtd to run without udev installed | ||
| + | nano /etc/init.d/avr_evtd | ||
| + | and replace | ||
| + | cat /proc/tty/driver/serial | grep 80004500 | grep -q 0: && DEVICE=/dev/ttyS0 || DEVICE=/dev/ttyS1 uname -m | grep -q mips && MIPS=YES | ||
| + | with | ||
| + | if [ -e /dev/AVR00 ]; then | ||
| + | DEVICE=/dev/AVR00 | ||
| + | else | ||
| + | cat /proc/tty/driver/serial | grep 80004500 | grep -q 0: && DEVICE=/dev/ttyS0 || DEVICE=/dev/ttyS1 uname -m | grep -q mips && MIPS=YES | ||
| + | fi | ||
| + | |||
| + | == Remove kuroevtd == | ||
| + | To avoid conflict between 2 applications that have the same goal, you need to remove kuroevtd : | ||
| + | * remove script file | ||
| + | rm /etc/init.d/kuroevtd | ||
| + | * remove start/stop symlinks | ||
| + | rm /etc/rc?.d/K20kuroevtd /etc/rc?.d/S20kuroevtd | ||
| + | * remove configuration files | ||
| + | rm -r /etc/kuroevtd | ||
| + | * remove application | ||
| + | rm /usr/sbin/kuroevtd | ||
== Conclusion == | == Conclusion == | ||
Revision as of 09:14, 22 June 2006
Contents |
Why you should not use kuroevtd
kuroevtd is old and is not working well ! Most people can't switch off their kurobox by pressing the power button, and it's kuroevtd's fault ;) kuroevtd's author didn't stopped his project, he just renamed it to avr_evtd as it can runs on the kurobox, but also on linkstation devices !
Install avr_evtd
- Download avr_evtd from this page : https://sourceforge.net/project/showfiles.php?group_id=167880&package_id=190867
- de-tar the file (was called avr_evtd020606.tar.bz2 when writing this guide)
tar xjf avr_evtd020606.tar.bz2 && cd avr_evtd/usr/src/avr_evtd
- Build the file
make avr_evtd
- Install the file
make install
- Make avr_evtd running at startup and stoping at shutdown
cd /etc/rc0.d/ && ln -s ../init.d/avr_evtd K20avr_evtd cd /etc/rc1.d/ && ln -s ../init.d/avr_evtd K20avr_evtd cd /etc/rc2.d/ && ln -s ../init.d/avr_evtd S20avr_evtd cd /etc/rc3.d/ && ln -s ../init.d/avr_evtd K20avr_evtd cd /etc/rc4.d/ && ln -s ../init.d/avr_evtd S20avr_evtd cd /etc/rc5.d/ && ln -s ../init.d/avr_evtd S20avr_evtd cd /etc/rc6.d/ && ln -s ../init.d/avr_evtd K20avr_evtd
- Edit the start script to allow avr_evtd to run without udev installed
nano /etc/init.d/avr_evtd
and replace
cat /proc/tty/driver/serial | grep 80004500 | grep -q 0: && DEVICE=/dev/ttyS0 || DEVICE=/dev/ttyS1 uname -m | grep -q mips && MIPS=YES
with
if [ -e /dev/AVR00 ]; then DEVICE=/dev/AVR00 else cat /proc/tty/driver/serial | grep 80004500 | grep -q 0: && DEVICE=/dev/ttyS0 || DEVICE=/dev/ttyS1 uname -m | grep -q mips && MIPS=YES fi
Remove kuroevtd
To avoid conflict between 2 applications that have the same goal, you need to remove kuroevtd :
- remove script file
rm /etc/init.d/kuroevtd
- remove start/stop symlinks
rm /etc/rc?.d/K20kuroevtd /etc/rc?.d/S20kuroevtd
- remove configuration files
rm -r /etc/kuroevtd
- remove application
rm /usr/sbin/kuroevtd
Conclusion
Now your power button can be used normaly (yeah !) You can also edit /etc/avr_evtd/EventScript file to assign different actions for a button (sending a message to a network device before shutting down for example, running a backup script when pressing the red button ...) !
--Sylver 14:59, 14 June 2006 (CDT)

