Created
May 20, 2018 17:46
-
-
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"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 (!?!?!)