add new stuff I guess?
This commit is contained in:
parent
7c2acb2a26
commit
5a60d20207
9 changed files with 0 additions and 0 deletions
BIN
etc/frontview/support/inb
Normal file
BIN
etc/frontview/support/inb
Normal file
Binary file not shown.
BIN
etc/frontview/support/inl
Normal file
BIN
etc/frontview/support/inl
Normal file
Binary file not shown.
BIN
etc/frontview/support/inw
Normal file
BIN
etc/frontview/support/inw
Normal file
Binary file not shown.
BIN
etc/frontview/support/outb
Normal file
BIN
etc/frontview/support/outb
Normal file
Binary file not shown.
BIN
etc/frontview/support/outl
Normal file
BIN
etc/frontview/support/outl
Normal file
Binary file not shown.
BIN
etc/frontview/support/outw
Normal file
BIN
etc/frontview/support/outw
Normal file
Binary file not shown.
67
etc/frontview/support/rr4360psu.sh
Normal file
67
etc/frontview/support/rr4360psu.sh
Normal file
|
@ -0,0 +1,67 @@
|
|||
#!/bin/bash
|
||||
# description: RR4360 PSU fix, pre-6.8.0
|
||||
# NETGEAR Proprietary
|
||||
# email: readynassupport@netgear.com
|
||||
# usage: ./scriptname
|
||||
|
||||
|
||||
|
||||
#set variables
|
||||
get_inb="http://ntgr.support/tools/inb"
|
||||
get_outb="http://ntgr.support/tools/outb"
|
||||
inb="/etc/frontview/support/inb"
|
||||
outb="/etc/frontview/support/outb"
|
||||
attempts=0
|
||||
|
||||
echo "This tool attempts to resolve RR4360 PSU issues by resetting the SMBus if necessary. It will try 10 times and if it fails, will need to try and be resolved manually."
|
||||
|
||||
get_tools() {
|
||||
printf "Acquiring tools... "
|
||||
wget -q "$get_inb" -O "$inb"
|
||||
wget -q "$get_outb" -O "$outb"
|
||||
chmod +x "$inb" "$outb"
|
||||
printf " done! \n"
|
||||
}
|
||||
|
||||
check_problem() {
|
||||
printf "Querying the SMBus for its current status..."
|
||||
problem=$($inb 0xf00f)
|
||||
validate_problem
|
||||
}
|
||||
|
||||
validate_problem() {
|
||||
if [[ "$problem" -ne 7 ]]
|
||||
then
|
||||
printf " SMBus reporting invalid value."
|
||||
fix
|
||||
else
|
||||
echo " The SMBus is currently operating as normal. Exiting script."
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
fix() {
|
||||
attempts=$((attempts+1))
|
||||
printf " Attempt %s at fixing the SMBus..." "$attempts"
|
||||
"$outb" 0xf00f 3
|
||||
sleep 1
|
||||
"$outb" 0xf00f 7
|
||||
sleep 1
|
||||
printf " fix applied. \n"
|
||||
verify_fix
|
||||
}
|
||||
verify_fix(){
|
||||
if [[ "$attempts" -lt 10 ]]
|
||||
then
|
||||
check_problem
|
||||
|
||||
else
|
||||
printf "Attempted to recover this %s times... seek alternative recovery method." "$attempts"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
get_tools
|
||||
check_problem
|
|
@ -0,0 +1,5 @@
|
|||
[Unit]
|
||||
Description=RR4360 PSU Fix Service
|
||||
|
||||
[Service]
|
||||
ExecStart=/etc/frontview/support/rr4360psu.sh
|
10
etc/systemd/system/multi-user.target.wants/rr4360psu.timer
Normal file
10
etc/systemd/system/multi-user.target.wants/rr4360psu.timer
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=RR4360 PSU Fix Timer
|
||||
|
||||
[Timer]
|
||||
OnBootSec=0min
|
||||
OnCalendar=hourly
|
||||
Unit=rr4360psu.service
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Add table
Add a link
Reference in a new issue