Skip to content

Commit

Permalink
Fix disable on powerup..
Browse files Browse the repository at this point in the history
Bugreport fixes
Submitsystem fixes...
  • Loading branch information
MrMEEE committed Aug 30, 2011
1 parent 6501909 commit ec3ebfc
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
2 changes: 1 addition & 1 deletion conf/ironhide-disablecard-on-powerup
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash


ENABLECARD=/usr/local/bin/ironhide-enablecard ENABLECARD=/usr/local/bin/ironhide-enablecard
DISABLECARD=/usr/local/bin/ironhide-disablecard DISABLECARD=/usr/local/bin/ironhide-disablecard
Expand Down
26 changes: 25 additions & 1 deletion files/ironhide-bugreport
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ BUGREPORTHOST=www.martin-juhl.dk
PIPE=/tmp/pipe PIPE=/tmp/pipe
HEIGHT=500 HEIGHT=500
WIDTH=700 WIDTH=700
github_id=0


# Includes # Includes
source easybashgui source easybashgui
Expand All @@ -50,7 +51,7 @@ WHOAMI=`which whoami`
VGL_DISPLAY=`echo $VGL_DISPLAY | cut -f2 -d:` VGL_DISPLAY=`echo $VGL_DISPLAY | cut -f2 -d:`


# DEBUG? Comment Out... # DEBUG? Comment Out...
exec 6>&2 ; exec 2> /dev/null #exec 6>&2 ; exec 2> /dev/null


if [[ "$HOME" == "/root" ]]; then if [[ "$HOME" == "/root" ]]; then
echo "Do NOT run ironhide-configuration as the root user.." echo "Do NOT run ironhide-configuration as the root user.."
Expand Down Expand Up @@ -80,15 +81,38 @@ x="input -w $WIDTH -h $HEIGHT 1"
${x} "Please enter your name." ${x} "Please enter your name."
username="$(0< "${dir_tmp}/${file_tmp}" )" username="$(0< "${dir_tmp}/${file_tmp}" )"


if [[ $username == "" ]]; then
exit 0
fi

x="message --width $WIDTH --height $HEIGHT" x="message --width $WIDTH --height $HEIGHT"
${x} "Next you will be asked to enter your Github issue number.\n"\ ${x} "Next you will be asked to enter your Github issue number.\n"\
"If you haven't already, please go to: https://github.com/MrMEEE/ironhide/issues\n"\ "If you haven't already, please go to: https://github.com/MrMEEE/ironhide/issues\n"\
"And create an issue.." "And create an issue.."


while [[ $github_id == 0 ]] || [[ $github_id == "Enter Github issue number" ]]; do
x="input -w $WIDTH -h $HEIGHT 1" x="input -w $WIDTH -h $HEIGHT 1"
${x} "Enter Github issue number" ${x} "Enter Github issue number"
github_id="$(0< "${dir_tmp}/${file_tmp}" )" github_id="$(0< "${dir_tmp}/${file_tmp}" )"


if [[ $github_id == "" ]]; then
exit 0
fi

rm /tmp/github
$WGET -O /tmp/github https://github.com/MrMEEE/ironhide/issues/$github_id 1>/dev/null 2>/dev/null
if [[ `cat /tmp/github |grep -nir "state state-open" |wc -l` < 1 ]]; then
github_id=0
fi

if [[ $github_id == 0 ]] || [[ $github_id == "Enter Github issue number" ]]; then
x="alert_message --width $WIDTH --height $HEIGHT"
${x} "Please Enter a valid Github issue number.\n"\
"If you haven't already, please go to: https://github.com/MrMEEE/ironhide/issues\n"\
"And create an issue.."
fi
done

nvidia_log=`cat /var/log/Xorg.$VGL_DISPLAY.log > /tmp/hex && xxd -p /tmp/hex | sed -e ':a;N;$!ba;s/\n//g'` nvidia_log=`cat /var/log/Xorg.$VGL_DISPLAY.log > /tmp/hex && xxd -p /tmp/hex | sed -e ':a;N;$!ba;s/\n//g'`
xorg_conf=`cat /etc/X11/xorg.conf > /tmp/hex && xxd -p /tmp/hex | sed -e ':a;N;$!ba;s/\n//g'` xorg_conf=`cat /etc/X11/xorg.conf > /tmp/hex && xxd -p /tmp/hex | sed -e ':a;N;$!ba;s/\n//g'`
xorg_conf_nvidia=`cat /etc/X11/xorg.conf.nvidia > /tmp/hex && xxd -p /tmp/hex | sed -e ':a;N;$!ba;s/\n//g'` xorg_conf_nvidia=`cat /etc/X11/xorg.conf.nvidia > /tmp/hex && xxd -p /tmp/hex | sed -e ':a;N;$!ba;s/\n//g'`
Expand Down
8 changes: 4 additions & 4 deletions files/ironhide-submitsystem
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ SHUTDOWN=UNAVAILABLE
STARTUPSTATUS=UNAVAILABLE STARTUPSTATUS=UNAVAILABLE
SHUTDOWNSTATUS=UNAVAILABLE SHUTDOWNSTATUS=UNAVAILABLE


if [ -f /usr/local/bin/bumblebee-enablecard ]; then if [ -f /usr/local/bin/ironhide-enablecard ]; then
if [[ `diff /usr/local/bin/bumblebee-enablecard $IRONHIDEHOME/examples/ironhide-enablecard.template` != "" ]]; then if [[ `diff /usr/local/bin/ironhide-enablecard $IRONHIDEHOME/examples/ironhide-enablecard.template` != "" ]]; then
STARTUP=`xxd -p /usr/local/bin/bumblebee-enablecard | sed -e ':a;N;$!ba;s/\n//g'` STARTUP=`xxd -p /usr/local/bin/ironhide-enablecard | sed -e ':a;N;$!ba;s/\n//g'`
SHUTDOWN=`xxd -p /usr/local/bin/bumblebee-disablecard | sed -e ':a;N;$!ba;s/\n//g'` SHUTDOWN=`xxd -p /usr/local/bin/ironhide-disablecard | sed -e ':a;N;$!ba;s/\n//g'`
STARTUPSTATUS=AVAILABLE STARTUPSTATUS=AVAILABLE
SHUTDOWNSTATUS=AVAILABLE SHUTDOWNSTATUS=AVAILABLE
fi fi
Expand Down

0 comments on commit ec3ebfc

Please sign in to comment.