SSH My Cloud file edit error during revert to previous firmware


following instructions seen on another post, i added the tags to the beginning of lines 256-259 on the sh file for the firmware updated via Putty to SSH.   As seen here:

-but allow 'patch updates" with any version

    if [-z "${update_container}"] && ["${vnew}" -lt "${vnow}"]; then

            error="failed 200 \"invalid firmware package\""

            pre-update_error $error




Prepare for package upgrade

When I ran the command for this sh, I got the following error:

WDMyCloud:~# /usr/local/sbin/ /DataVolume/shares/Public/sq-030401-230-20140415.deb 02:02:10:: ( /DataVolume/shares/Public/sq-030401-230-20140415.deb ) 02:02:10:upgrade start: /DataVolume/shares/Public/sq-030401-230-20140415.deb 02:02:11:check_size=
/usr/local/sbin/ line 235: syntax error near unexpected token ;'
/usr/local/sbin/ line 235:

In the sh, this is line 235 and the semicolon it is referring to (3rd line down):

["${master_package_name}" == "${update_container}"] && update_container=''
uplog "version_current=$version_current"
uplog "version_newfile=$version_newfile"
uplog "package_newfile=$package_newfile"

not sure why there is an error with that semicolon now.  i didn't modify anything other than the tags.

so I didn't modify anything (just left it as originally modified with the tags on lines 256-259), and just tried to re-execute the script, all I got was:

WDMyCloud:~# /usr/local/sbin/ /DataVolume/shares/Public/sq-030401-230-20140415.deb 02:09:58:: ( /DataVolume/shares/Public/sq-030401-230-20140415.deb ) 02:09:58:upgrade start: /DataVolume/shares/Public/sq-030401-230-20140415.deb

and that's it.  no other activity.

Can anyone help?  So close to getting this revert accomplished (I hope).   Tired of the slow / nearly non-existent uploads speeds to the NAS!



btw, the instructions I were using are found here:


That semicolon should not be there at all.  Ya gotta be careful when editing scripts…  ;)

Here’s what that portion of my file looks like…

# extract master package and update-container names
["${master_package_name}" == "${update_container}"] && update_container=''

uplog "version_current=$version_current"
uplog "version_newfile=$version_newfile"
uplog "package_newfile=$package_newfile"
uplog "master_package_name=$master_package_name"
uplog "master_package_new=$master_package_new"
uplog "update_container=$update_container"