Skip to content

Instantly share code, notes, and snippets.

@JimHume
Created May 20, 2018 17:46
Show Gist options
  • Save JimHume/08270b1af010dec1fddf79be9ab62715 to your computer and use it in GitHub Desktop.
Save JimHume/08270b1af010dec1fddf79be9ab62715 to your computer and use it in GitHub Desktop.
This gist may help others who have a Netgear Stora that encounters the issue "Error message: at /var/www/admin/update.pm line 346"
#!/bin/bash
# This is the contents of the updated script:
NEW_SCRIPT=$(cat << EOF
package setup_update;
sub process {
return 'success';
}
sub display {
my $vars = shift @_;
my $template = shift @_;
$$vars{'name'} = $name;
die 'Template error: ' . $template->error . "\n" unless $template->process('setup_update.html', $vars);
}
'???';
EOF
)
# Make a backup of the existing file just in case:
cp /var/www/admin/setup_update.pm /var/www/admin/setup_update.pm.bak
# Dump the new script into the old location. Note: this doesn't have to be compiled/turned into bytecode.
# Plain-text perl scripts can be relablled .pm and used as modules.
echo "$NEW_SCRIPT" > /var/www/admin/setup_update.pm
@JimHume
Copy link
Author

JimHume commented May 20, 2018

The update server may go offline, or the update server components (MySql) may fail. As a result, the following error message will appear when attempting to reset the Stora:
Error message: at /var/www/admin/update.pm line 346

The above gist effectively zeroes-out the update check and bypasses the actual scanning of the update server.

I was running into this issue on my own Stora and found a forum post describing the root cause, so I created the above script to (hopefully) help others. Here's a link to the forum thread:
https://community.netgear.com/t5/Stora-Legacy/Stora-Error-Message-on-Setup/m-p/1573609/highlight/false#M9412

@JimHume
Copy link
Author

JimHume commented May 20, 2018

Note to self: if I ever end up needing this again because I've reset my Stora, don't forget to disable uPnP (!) because it's on by default (!?!?!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment