Reboot from controller script
Posted: Wed Jun 22, 2005 5:57 am
Hello,
My xbox does not have a keyboard or mouse hooked to it. So when ever I want to play games I need to ssh into it and reboot it. So, to alieviate this problem I wrote a simple script that reboots gentoox when i push L,R,Back,Start (look familiar?). My first thought was that the bios would catch this and reboot (without shuting down) but it doesn't.
Unfortunetly if you want to use this script it is going to be a PITA, i didn't make a pretty ebuild for you.
http://netfiles.uiuc.edu/dborello/www/xpadreboot.pl
To install it (as root):
1. cd /usr/bin; wget http://netfiles.uiuc.edu/dborello/www/xpadreboot.pl
2. It needs a module called Linux::Input::Joystick. There is no ebuild for this.
2a. perl -MCPAN -e shell
2b. Answer no to question about setup.
2c. "install Linux::Input::Joystick" Follow directions. If it fails the first time try again.
3. echo "/usr/bin/xpadreboot.pl & 1> /dev/null 2> /dev/null" >> /etc/conf.d/local.start
4. /etc/init.d/local restart
Enjoy
-dan
ps. It only works from the 1st controller port and it has to be plugged in on bootup (i think). I got too lazy to make it work on all contoller ports and I always have a controller in port 1.
[/url]
My xbox does not have a keyboard or mouse hooked to it. So when ever I want to play games I need to ssh into it and reboot it. So, to alieviate this problem I wrote a simple script that reboots gentoox when i push L,R,Back,Start (look familiar?). My first thought was that the bios would catch this and reboot (without shuting down) but it doesn't.
Unfortunetly if you want to use this script it is going to be a PITA, i didn't make a pretty ebuild for you.
http://netfiles.uiuc.edu/dborello/www/xpadreboot.pl
To install it (as root):
1. cd /usr/bin; wget http://netfiles.uiuc.edu/dborello/www/xpadreboot.pl
2. It needs a module called Linux::Input::Joystick. There is no ebuild for this.
2a. perl -MCPAN -e shell
2b. Answer no to question about setup.
2c. "install Linux::Input::Joystick" Follow directions. If it fails the first time try again.
3. echo "/usr/bin/xpadreboot.pl & 1> /dev/null 2> /dev/null" >> /etc/conf.d/local.start
4. /etc/init.d/local restart
Enjoy
-dan
ps. It only works from the 1st controller port and it has to be plugged in on bootup (i think). I got too lazy to make it work on all contoller ports and I always have a controller in port 1.
[/url]